[Improve] StarRocksSourceReader use the existing client #6480
Merged
Conversation
Hisoka-X
reviewed
Mar 11, 2024
| @Override | ||
| public void open() throws Exception {} | ||
| public void open() throws Exception { | ||
| clientsPools = new LinkedHashMap<>(5); |
Member
There was a problem hiding this comment.
Just HashMap enough.
Suggested change
| clientsPools = new LinkedHashMap<>(5); | |
| clientsPools = new HashMap<>(); |
Comment on lines
+119
to
+133
| if (!clientsPools.isEmpty()) { | ||
| clientsPools.values().forEach(StarRocksBeReadClient::close); | ||
| } |
Member
There was a problem hiding this comment.
Please add try catch in forEach. We should make sure all client will be invoked close method.
Contributor
Author
There was a problem hiding this comment.
Please add try catch in
forEach. We should make sure all client will be invoked close method.
done, please recheck at your convenience.
Member
|
cc @531651225 |
Hisoka-X
reviewed
Mar 11, 2024
Comment on lines
+131
to
+132
| throw new StarRocksConnectorException( | ||
| CLOSE_BE_READER_FAILED, e); |
Member
There was a problem hiding this comment.
Do not throw exception. It will break logic of close other client. Just log.error.
Contributor
Author
There was a problem hiding this comment.
done, please recheck at your convenience.
Member
Contributor
Author
Hisoka-X
approved these changes
Mar 12, 2024
hailin0
approved these changes
Mar 12, 2024
chaorongzhi
pushed a commit
to chaorongzhi/seatunnel
that referenced
this pull request
Aug 21, 2024
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Purpose of this pull request
StarRocksSourceReader reads partition data using the existing client instead of re-establishing a connection for each partition.
Does this PR introduce any user-facing change?
no
How was this patch tested?
exist tests.
Check list
New License Guide
release-note.