-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: fix, refactor, cleanup * test: fix, refactor, cleanup part2 * upgrade junit minor version * refactor: test for package protohandler (#73) Co-authored-by: kevin.bheda <[email protected]> * refactor: test for package processors.external.pg (#70) * refactor: test for package processors.external.pg * refactor: fix checkstyle whitespace error Co-authored-by: kevin.bheda <[email protected]> * refactor: test for package processors.external.grpc (#69) Co-authored-by: kevin.bheda <[email protected]> * refactor: test for package processors.internal (#71) Co-authored-by: kevin.bheda <[email protected]> * refactor: test for package source and core (#75) * refactor: test for package source and core * refactor: fix test and remove expected exception convention Co-authored-by: kevin.bheda <[email protected]> * refactor: test for package sink (#74) * refactor: test for package sink * refactor: move field to test Co-authored-by: kevin.bheda <[email protected]> * refactor: test for package processors.longbow (#72) * refactor: test for package processors.longbow * refactor: implement todo Co-authored-by: kevin.bheda <[email protected]> * refactor: tests for es package (#68) * refactor: test for package processors.external.es * refactor: fix checkstyle errors in test package * refactor: use asserthrows instead of expectedException Co-authored-by: kevin.bheda <[email protected]> * refactor: test cleanup for package metrics and processors.common (#67) * test: fix, refactor, cleanup for package config * refactor: use asserthrows instead of expectedException Co-authored-by: kevin.bheda <[email protected]> * test: fix, refactor, cleanup for package config (#66) Co-authored-by: kevin.bheda <[email protected]> * refactor: optimize imports * refactor: use static imports for metrics package * remove already implemented todo comment * refactor: implement todo's for processors.common package * refactor: remove todo as the object needs to be mocked * refactor: implement todo for external.grpc package * refactor: implement todo for external.http package * refactor: remove implemented todo * refactor: remove unused rules in package external.pg * refactor: implement todo for external package * refactor: implement todo for telemetry package * refactor: implement todo for transformers package * refactor: implement todo and remove unwanted todos * bump up the version * fix: ignore the failing postgres integration test Co-authored-by: kevin.bheda <[email protected]> Co-authored-by: Gaurav Singhania <[email protected]>
- Loading branch information
1 parent
f00e3c7
commit 028b917
Showing
107 changed files
with
2,067 additions
and
1,753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
...-core/src/main/java/io/odpf/dagger/core/processors/external/es/EsSourceConfigBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
package io.odpf.dagger.core.processors.external.es; | ||
|
||
import io.odpf.dagger.core.processors.common.OutputMapping; | ||
|
||
import java.util.Map; | ||
|
||
public class EsSourceConfigBuilder { | ||
private String host; | ||
private String port; | ||
private String user; | ||
private String password; | ||
private String endpointPattern; | ||
private String endpointVariables; | ||
private String type; | ||
private String capacity; | ||
private String connectTimeout; | ||
private String retryTimeout; | ||
private String socketTimeout; | ||
private String streamTimeout; | ||
private boolean failOnErrors; | ||
private Map<String, OutputMapping> outputMapping; | ||
private String metricId; | ||
private boolean retainResponseType; | ||
|
||
public EsSourceConfigBuilder setHost(String host) { | ||
this.host = host; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setPort(String port) { | ||
this.port = port; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setUser(String user) { | ||
this.user = user; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setPassword(String password) { | ||
this.password = password; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setEndpointPattern(String endpointPattern) { | ||
this.endpointPattern = endpointPattern; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setEndpointVariables(String endpointVariables) { | ||
this.endpointVariables = endpointVariables; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setType(String type) { | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setCapacity(String capacity) { | ||
this.capacity = capacity; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setConnectTimeout(String connectTimeout) { | ||
this.connectTimeout = connectTimeout; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setRetryTimeout(String retryTimeout) { | ||
this.retryTimeout = retryTimeout; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setSocketTimeout(String socketTimeout) { | ||
this.socketTimeout = socketTimeout; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setStreamTimeout(String streamTimeout) { | ||
this.streamTimeout = streamTimeout; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setFailOnErrors(boolean failOnErrors) { | ||
this.failOnErrors = failOnErrors; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setOutputMapping(Map<String, OutputMapping> outputMapping) { | ||
this.outputMapping = outputMapping; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setMetricId(String metricId) { | ||
this.metricId = metricId; | ||
return this; | ||
} | ||
|
||
public EsSourceConfigBuilder setRetainResponseType(boolean retainResponseType) { | ||
this.retainResponseType = retainResponseType; | ||
return this; | ||
} | ||
|
||
public EsSourceConfig createEsSourceConfig() { | ||
return new EsSourceConfig(host, port, user, password, endpointPattern, endpointVariables, type, capacity, connectTimeout, retryTimeout, socketTimeout, streamTimeout, failOnErrors, outputMapping, metricId, retainResponseType); | ||
} | ||
} |
115 changes: 115 additions & 0 deletions
115
...e/src/main/java/io/odpf/dagger/core/processors/external/grpc/GrpcSourceConfigBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
package io.odpf.dagger.core.processors.external.grpc; | ||
|
||
import io.odpf.dagger.core.processors.common.OutputMapping; | ||
|
||
import java.util.Map; | ||
|
||
public class GrpcSourceConfigBuilder { | ||
private String endpoint; | ||
private int servicePort; | ||
private String grpcRequestProtoSchema; | ||
private String grpcResponseProtoSchema; | ||
private String grpcMethodUrl; | ||
private String requestPattern; | ||
private String requestVariables; | ||
private Map<String, OutputMapping> outputMapping; | ||
private String streamTimeout; | ||
private String connectTimeout; | ||
private boolean failOnErrors; | ||
private String grpcStencilUrl; | ||
private String type; | ||
private boolean retainResponseType; | ||
private Map<String, String> headers; | ||
private String metricId; | ||
private int capacity; | ||
|
||
public GrpcSourceConfigBuilder setEndpoint(String endpoint) { | ||
this.endpoint = endpoint; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setServicePort(int servicePort) { | ||
this.servicePort = servicePort; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setGrpcRequestProtoSchema(String grpcRequestProtoSchema) { | ||
this.grpcRequestProtoSchema = grpcRequestProtoSchema; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setGrpcResponseProtoSchema(String grpcResponseProtoSchema) { | ||
this.grpcResponseProtoSchema = grpcResponseProtoSchema; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setGrpcMethodUrl(String grpcMethodUrl) { | ||
this.grpcMethodUrl = grpcMethodUrl; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setRequestPattern(String requestPattern) { | ||
this.requestPattern = requestPattern; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setRequestVariables(String requestVariables) { | ||
this.requestVariables = requestVariables; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setOutputMapping(Map<String, OutputMapping> outputMapping) { | ||
this.outputMapping = outputMapping; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setStreamTimeout(String streamTimeout) { | ||
this.streamTimeout = streamTimeout; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setConnectTimeout(String connectTimeout) { | ||
this.connectTimeout = connectTimeout; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setFailOnErrors(boolean failOnErrors) { | ||
this.failOnErrors = failOnErrors; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setGrpcStencilUrl(String grpcStencilUrl) { | ||
this.grpcStencilUrl = grpcStencilUrl; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setType(String type) { | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setRetainResponseType(boolean retainResponseType) { | ||
this.retainResponseType = retainResponseType; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setHeaders(Map<String, String> headers) { | ||
this.headers = headers; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setMetricId(String metricId) { | ||
this.metricId = metricId; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfigBuilder setCapacity(int capacity) { | ||
this.capacity = capacity; | ||
return this; | ||
} | ||
|
||
public GrpcSourceConfig createGrpcSourceConfig() { | ||
return new GrpcSourceConfig(endpoint, servicePort, grpcRequestProtoSchema, grpcResponseProtoSchema, grpcMethodUrl, requestPattern, requestVariables, | ||
streamTimeout, connectTimeout, failOnErrors, grpcStencilUrl, type, retainResponseType, headers, outputMapping, metricId, capacity); | ||
} | ||
} |
106 changes: 106 additions & 0 deletions
106
...-core/src/main/java/io/odpf/dagger/core/processors/external/pg/PgSourceConfigBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
package io.odpf.dagger.core.processors.external.pg; | ||
|
||
import java.util.Map; | ||
|
||
public class PgSourceConfigBuilder { | ||
private String host; | ||
private String port; | ||
private String user; | ||
private String password; | ||
private String database; | ||
private String type; | ||
private String capacity; | ||
private String streamTimeout; | ||
private Map<String, String> outputMapping; | ||
private String connectTimeout; | ||
private String idleTimeout; | ||
private String queryVariables; | ||
private String queryPattern; | ||
private boolean failOnErrors; | ||
private String metricId; | ||
private boolean retainResponseType; | ||
|
||
public PgSourceConfigBuilder setHost(String host) { | ||
this.host = host; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setPort(String port) { | ||
this.port = port; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setUser(String user) { | ||
this.user = user; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setPassword(String password) { | ||
this.password = password; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setDatabase(String database) { | ||
this.database = database; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setType(String type) { | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setCapacity(String capacity) { | ||
this.capacity = capacity; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setStreamTimeout(String streamTimeout) { | ||
this.streamTimeout = streamTimeout; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setOutputMapping(Map<String, String> outputMapping) { | ||
this.outputMapping = outputMapping; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setConnectTimeout(String connectTimeout) { | ||
this.connectTimeout = connectTimeout; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setIdleTimeout(String idleTimeout) { | ||
this.idleTimeout = idleTimeout; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setQueryVariables(String queryVariables) { | ||
this.queryVariables = queryVariables; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setQueryPattern(String queryPattern) { | ||
this.queryPattern = queryPattern; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setFailOnErrors(boolean failOnErrors) { | ||
this.failOnErrors = failOnErrors; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setMetricId(String metricId) { | ||
this.metricId = metricId; | ||
return this; | ||
} | ||
|
||
public PgSourceConfigBuilder setRetainResponseType(boolean retainResponseType) { | ||
this.retainResponseType = retainResponseType; | ||
return this; | ||
} | ||
|
||
public PgSourceConfig createPgSourceConfig() { | ||
return new PgSourceConfig(host, port, user, password, database, type, capacity, streamTimeout, outputMapping, connectTimeout, idleTimeout, queryVariables, queryPattern, failOnErrors, metricId, retainResponseType); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.