This repository was archived by the owner on Jan 12, 2026. It is now read-only.
WIP: [BitSail][Connector] Support ElasticSearch Source connector#336
Open
liuxiaocs7 wants to merge 9 commits intobytedance:masterfrom
Open
WIP: [BitSail][Connector] Support ElasticSearch Source connector#336liuxiaocs7 wants to merge 9 commits intobytedance:masterfrom
liuxiaocs7 wants to merge 9 commits intobytedance:masterfrom
Conversation
Contributor
Author
|
@BlockLiu PTAL, thx. |
This was referenced Jan 17, 2023
Contributor
Author
07:40:59.746 [main] ERROR o.t.d.DockerClientProviderStrategy - As no valid configuration was found, execution cannot continue
07:40:59.746 [main] ERROR c.b.b.t.c.t.t.e.ElasticsearchCluster - failed to initialize Elasticsearch container.
org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.elastic.co/elasticsearch/elasticsearch:7.10.2, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@768f9097)
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1371)
at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:651)
at org.testcontainers.elasticsearch.ElasticsearchContainer.<init>(ElasticsearchContainer.java:98)
at com.bytedance.bitsail.test.connector.test.testcontainers.elasticsearch.ElasticsearchCluster.startService(ElasticsearchCluster.java:52)
at com.bytedance.bitsail.connector.elasticsearch.rest.source.EsSourceRequestTest.setup(EsSourceRequestTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)it works fine locally, i'll re-trigger to try. |
hk-lrzy
reviewed
Jan 18, 2023
...bitsail/connector/elasticsearch/source/reader/deserializer/ElasticsearchRowDeserializer.java
Outdated
Show resolved
Hide resolved
| row.setField(i, convert(typeInfo, value.toString())); | ||
| } catch (ParseException e) { | ||
| LOG.error("Parse value {} with type {} failed.", value, typeInfo); | ||
| throw new RuntimeException(e); |
Collaborator
There was a problem hiding this comment.
Could be replace to bitsail exception, so bitsail will make this row as dirty record.
| try { | ||
| row.setField(i, convert(typeInfo, value.toString())); | ||
| } catch (ParseException e) { | ||
| LOG.error("Parse value {} with type {} failed.", value, typeInfo); |
Collaborator
There was a problem hiding this comment.
Log should be sample in sometimes, it will caused many exception log when the type not correct.
| return false; | ||
| } | ||
|
|
||
| private Object convert(TypeInfo<?> typeInfo, String value) throws ParseException { |
Collaborator
There was a problem hiding this comment.
i proposal to have a new class to store the common logic like convert, maybe we can process this proposal in next issue.
hk-lrzy
reviewed
Jan 18, 2023
| @@ -46,7 +49,13 @@ public class EsRestClientBuilder { | |||
| private final RestClientBuilder builder; | |||
|
|
|||
| public EsRestClientBuilder(BitSailConfiguration jobConf) { | |||
Collaborator
There was a problem hiding this comment.
Should we make a new interface for the class EsRestClientBuilder. i just want to make it more flexible between the difference elasticsearch version.
healchow
reviewed
Jan 20, 2023
...arch/src/main/java/com/bytedance/bitsail/connector/elasticsearch/utils/SplitStringUtils.java
Outdated
Show resolved
Hide resolved
...arch/src/test/java/com/bytedance/bitsail/connector/elasticsearch/utils/SourceSetupUtils.java
Outdated
Show resolved
Hide resolved
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by:
Pre-Checklist
Note: Please complete ALL items in the following checklist.
Purpose
Some description about what this PR wants to do.
Approaches
Some description about how this PR achives the purpose.
Related Issues
Close #146
New Behavior (screenshots if needed)
N/A