-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Feature][connector-elasticsearch] elasticsearch source support PIT #9150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
hailin0
merged 7 commits into
apache:dev
from
CosmosNi:feature_elasticsearch_source_PIT
Apr 16, 2025
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4050dcd
[Feature][connector-elasticsearch] elasticsearch source support PIT
CosmosNi 7d34224
[Feature][connector-elasticsearch] elasticsearch source support PIT
CosmosNi 25b647f
[Feature][connector-elasticsearch] elasticsearch source support PIT
CosmosNi 1bb296f
[Feature][connector-elasticsearch] elasticsearch source support PIT
CosmosNi 3969e90
[Feature][connector-elasticsearch] elasticsearch source support PIT
CosmosNi 856cd10
[Feature][connector-elasticsearch] elasticsearch source support PIT
CosmosNi 9e05e92
Merge remote-tracking branch 'upstream/dev' into feature_elasticsearc…
CosmosNi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
@Getter | ||
@Setter | ||
|
@@ -87,4 +88,25 @@ public class ElasticsearchSourceOptions extends ElasticsearchBaseOptions { | |
Collections.singletonMap("match_all", new HashMap<String, String>())) | ||
.withDescription( | ||
"Elasticsearch query language. You can control the range of data read"); | ||
|
||
public static final Option<Boolean> USE_PIT = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about add new enum type named There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Get |
||
Options.key("use_pit") | ||
.booleanType() | ||
.defaultValue(false) | ||
.withDescription( | ||
"Whether to use Point-in-Time (PIT) API instead of scroll API. PIT API is more efficient and is the recommended approach in newer Elasticsearch versions (7.10+)."); | ||
|
||
public static final Option<Long> PIT_KEEP_ALIVE = | ||
Options.key("pit_keep_alive") | ||
.longType() | ||
.defaultValue(TimeUnit.MINUTES.toMillis(1)) // 1 minute in milliseconds | ||
.withDescription( | ||
"The amount of time (in milliseconds) for which the PIT should be kept alive. Default is 1 minute."); | ||
|
||
public static final Option<Integer> PIT_BATCH_SIZE = | ||
Options.key("pit_batch_size") | ||
.intType() | ||
.defaultValue(100) | ||
.withDescription( | ||
"Maximum number of hits to be returned with each PIT search request. Similar to scroll_size but for PIT API."); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'sortField' is assigned but never used; consider removing it to clean up the code.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CosmosNi