-
Notifications
You must be signed in to change notification settings - Fork 195
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
Minor fixes to Kafka Source #3174
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,19 +21,16 @@ public class TopicConfig { | |
static final boolean DEFAULT_AUTO_COMMIT = false; | ||
static final Duration DEFAULT_COMMIT_INTERVAL = Duration.ofSeconds(5); | ||
static final Duration DEFAULT_SESSION_TIMEOUT = Duration.ofSeconds(45); | ||
static final int DEFAULT_MAX_RETRY_ATTEMPT = Integer.MAX_VALUE; | ||
static final String DEFAULT_AUTO_OFFSET_RESET = "earliest"; | ||
static final Duration DEFAULT_THREAD_WAITING_TIME = Duration.ofSeconds(5); | ||
static final Duration DEFAULT_MAX_RECORD_FETCH_TIME = Duration.ofSeconds(4); | ||
static final Duration DEFAULT_BUFFER_TIMEOUT = Duration.ofSeconds(5); | ||
static final Duration DEFAULT_MAX_RETRY_DELAY = Duration.ofSeconds(1); | ||
static final Integer DEFAULT_FETCH_MAX_BYTES = 52428800; | ||
static final Integer DEFAULT_FETCH_MAX_WAIT = 500; | ||
static final Integer DEFAULT_FETCH_MIN_BYTES = 1; | ||
static final Duration DEFAULT_RETRY_BACKOFF = Duration.ofSeconds(10); | ||
static final Duration DEFAULT_RECONNECT_BACKOFF = Duration.ofSeconds(10); | ||
static final Integer DEFAULT_MAX_PARTITION_FETCH_BYTES = 1048576; | ||
static final Duration DEFAULT_MAX_POLL_INTERVAL = Duration.ofSeconds(300000); | ||
static final Duration DEFAULT_MAX_POLL_INTERVAL = Duration.ofSeconds(300); | ||
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. Should we set a maximum value on |
||
static final Integer DEFAULT_CONSUMER_MAX_POLL_RECORDS = 500; | ||
static final Integer DEFAULT_NUM_OF_WORKERS = 2; | ||
static final Duration DEFAULT_HEART_BEAT_INTERVAL_DURATION = Duration.ofSeconds(5); | ||
|
@@ -53,16 +50,6 @@ public class TopicConfig { | |
@Size(min = 1, max = 200, message = "Number of worker threads should lies between 1 and 200") | ||
private Integer workers = DEFAULT_NUM_OF_WORKERS; | ||
|
||
@JsonProperty("max_retry_attempts") | ||
@Valid | ||
@Size(min = 1, max = Integer.MAX_VALUE, message = " Max retry attempts should lies between 1 and Integer.MAX_VALUE") | ||
private Integer maxRetryAttempts = DEFAULT_MAX_RETRY_ATTEMPT; | ||
|
||
@JsonProperty("max_retry_delay") | ||
@Valid | ||
@Size(min = 1) | ||
private Duration maxRetryDelay = DEFAULT_MAX_RETRY_DELAY; | ||
|
||
@JsonProperty("serde_format") | ||
private MessageFormat serdeFormat= MessageFormat.PLAINTEXT; | ||
|
||
|
@@ -82,25 +69,12 @@ public class TopicConfig { | |
@JsonProperty("auto_offset_reset") | ||
private String autoOffsetReset = DEFAULT_AUTO_OFFSET_RESET; | ||
|
||
@JsonProperty("group_name") | ||
@Valid | ||
@Size(min = 1, max = 255, message = "size of group name should be between 1 and 255") | ||
private String groupName; | ||
|
||
@JsonProperty("thread_waiting_time") | ||
private Duration threadWaitingTime = DEFAULT_THREAD_WAITING_TIME; | ||
|
||
@JsonProperty("max_record_fetch_time") | ||
private Duration maxRecordFetchTime = DEFAULT_MAX_RECORD_FETCH_TIME; | ||
|
||
@JsonProperty("max_partition_fetch_bytes") | ||
private Integer maxPartitionFetchBytes = DEFAULT_MAX_PARTITION_FETCH_BYTES; | ||
|
||
@JsonProperty("buffer_default_timeout") | ||
@Valid | ||
@Size(min = 1) | ||
private Duration bufferDefaultTimeout = DEFAULT_BUFFER_TIMEOUT; | ||
|
||
@JsonProperty("fetch_max_bytes") | ||
@Valid | ||
@Size(min = 1, max = 52428800) | ||
|
@@ -144,10 +118,6 @@ public void setGroupId(String groupId) { | |
this.groupId = groupId; | ||
} | ||
|
||
public void setMaxRetryAttempts(Integer maxRetryAttempts) { | ||
this.maxRetryAttempts = maxRetryAttempts; | ||
} | ||
|
||
public MessageFormat getSerdeFormat() { | ||
return serdeFormat; | ||
} | ||
|
@@ -176,14 +146,6 @@ public void setAutoOffsetReset(String autoOffsetReset) { | |
this.autoOffsetReset = autoOffsetReset; | ||
} | ||
|
||
public String getGroupName() { | ||
return groupName; | ||
} | ||
|
||
public void setGroupName(String groupName) { | ||
this.groupName = groupName; | ||
} | ||
|
||
public Duration getThreadWaitingTime() { | ||
return threadWaitingTime; | ||
} | ||
|
@@ -192,26 +154,10 @@ public void setThreadWaitingTime(Duration threadWaitingTime) { | |
this.threadWaitingTime = threadWaitingTime; | ||
} | ||
|
||
public Duration getMaxRecordFetchTime() { | ||
return maxRecordFetchTime; | ||
} | ||
|
||
public Integer getMaxPartitionFetchBytes() { | ||
return maxPartitionFetchBytes; | ||
} | ||
|
||
public void setMaxRecordFetchTime(Duration maxRecordFetchTime) { | ||
this.maxRecordFetchTime = maxRecordFetchTime; | ||
} | ||
|
||
public Duration getBufferDefaultTimeout() { | ||
return bufferDefaultTimeout; | ||
} | ||
|
||
public void setBufferDefaultTimeout(Duration bufferDefaultTimeout) { | ||
this.bufferDefaultTimeout = bufferDefaultTimeout; | ||
} | ||
|
||
public Integer getFetchMaxBytes() { | ||
return fetchMaxBytes; | ||
} | ||
|
@@ -264,14 +210,6 @@ public void setWorkers(Integer workers) { | |
this.workers = workers; | ||
} | ||
|
||
public Duration getMaxRetryDelay() { | ||
return maxRetryDelay; | ||
} | ||
|
||
public void setMaxRetryDelay(Duration maxRetryDelay) { | ||
this.maxRetryDelay = maxRetryDelay; | ||
} | ||
|
||
public Duration getHeartBeatInterval() { | ||
return heartBeatInterval; | ||
} | ||
|
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
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.
Take it or leave it: I would recommend deleting this dead code and leave a single like comment instead of commenting it out a large code block with no description for the TODO.