fuweng11 commented on code in PR #9287:
URL: https://github.com/apache/inlong/pull/9287#discussion_r1396976915
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/source/kafka/KafkaSourceRequest.java:
##########
@@ -62,7 +62,7 @@ public class KafkaSourceRequest extends SourceRequest {
private String timestampMillis;
@ApiModelProperty(value = "The strategy of auto offset reset", notes =
"including earliest, latest (the default), none")
- private String autoOffsetReset;
+ private KafkaOffset autoOffsetReset = KafkaOffset.LATEST;
Review Comment:
This will result in the following error if `autoOffsetReset: "latest"` is
set when saving `kafkaSourceRequest`.
<img width="1636" alt="企业微信截图_f9bd448c-dd87-47bd-929d-87cb7ae41358"
src="https://github.com/apache/inlong/assets/76141879/c76a56ea-69a5-495f-9a2c-2aa638f7647d">
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/source/kafka/KafkaSourceRequest.java:
##########
@@ -62,7 +62,7 @@ public class KafkaSourceRequest extends SourceRequest {
private String timestampMillis;
@ApiModelProperty(value = "The strategy of auto offset reset", notes =
"including earliest, latest (the default), none")
- private String autoOffsetReset;
+ private KafkaOffset autoOffsetReset = KafkaOffset.LATEST;
Review Comment:
And it is best not to set the default value in the request, as this will
cause the default value to be overwritten if you do not want to modify the
`kakfaSource` and pass `autoOffsetReset: null`.
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/source/kafka/KafkaSourceRequest.java:
##########
@@ -62,7 +62,7 @@ public class KafkaSourceRequest extends SourceRequest {
private String timestampMillis;
@ApiModelProperty(value = "The strategy of auto offset reset", notes =
"including earliest, latest (the default), none")
- private String autoOffsetReset;
+ private KafkaOffset autoOffsetReset = KafkaOffset.LATEST;
Review Comment:
This will result in the following error if `autoOffsetReset: "latest"` is
set when saving `kafkaSourceRequest`.
<img width="1636" alt="企业微信截图_f9bd448c-dd87-47bd-929d-87cb7ae41358"
src="https://github.com/apache/inlong/assets/76141879/c76a56ea-69a5-495f-9a2c-2aa638f7647d">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]