You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/10/29 08:18:56 UTC

[GitHub] [flink] ruanhang1993 opened a new pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

ruanhang1993 opened a new pull request #17601:
URL: https://github.com/apache/flink/pull/17601


   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
    
   This PR provides the way to change the 'auto.offset.reset' for kafka table source when use 'group-offsets' startup mode .
   
   When 'auto.offset.reset' is set, the 'group-offsets' startup mode will use the provided auto offset reset strategy, or else 'none' reset strategy in order to be consistent with the DataStream API.
   
   ## Brief change log
   
     - When 'auto.offset.reset' is set, the 'group-offsets' startup mode will use the provided auto offset reset strategy, or else 'none' reset strategy as default
   
   
   ## Verifying this change
   
     - Added test that validates that the 'auto.offset.reset' is set for kafka consumers
   
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   * f75205b826071098291c54e42f612d2954ed0f0f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] fapaul commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
fapaul commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r786811633



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -679,106 +729,165 @@ private void verifyEncoderSubject(
 
     @Test
     public void testSourceTableWithTopicAndTopicPattern() {
-        thrown.expect(ValidationException.class);
-        thrown.expect(
-                containsCause(
-                        new ValidationException(
-                                "Option 'topic' and 'topic-pattern' shouldn't be set together.")));
-
-        final Map<String, String> modifiedOptions =
-                getModifiedOptions(
-                        getBasicSourceOptions(),
-                        options -> {
-                            options.put("topic", TOPICS);
-                            options.put("topic-pattern", TOPIC_REGEX);
-                        });
-
-        createTableSource(SCHEMA, modifiedOptions);
+        assertThatThrownBy(
+                        () -> {
+                            final Map<String, String> modifiedOptions =
+                                    getModifiedOptions(
+                                            getBasicSourceOptions(),
+                                            options -> {
+                                                options.put("topic", TOPICS);
+                                                options.put("topic-pattern", TOPIC_REGEX);
+                                            });
+
+                            createTableSource(SCHEMA, modifiedOptions);
+                        })
+                .isInstanceOf(ValidationException.class)
+                .satisfies(
+                        throwable ->
+                                assertThatChainOfCauses(throwable)
+                                        .anySatisfy(
+                                                cause ->
+                                                        assertThat(cause)
+                                                                .isInstanceOf(
+                                                                        ValidationException.class)
+                                                                .hasMessage(
+                                                                        "Option 'topic' and 'topic-pattern' shouldn't be set together.")));

Review comment:
       For the nested exceptions, you can use Flink's util `ExceptionUtils#findThrowable` or `FlinkAssertions.anyCauseMatches()`

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableTestUtils.java
##########
@@ -74,23 +77,40 @@
     }
 
     public static void waitingExpectedResults(
-            String sinkName, List<String> expected, Duration timeout) throws InterruptedException {
-        long now = System.currentTimeMillis();
-        long stop = now + timeout.toMillis();
+            String sinkName, List<String> expected, Duration timeout)
+            throws InterruptedException, TimeoutException {
         Collections.sort(expected);
-        while (System.currentTimeMillis() < stop) {
-            List<String> actual = TestValuesTableFactory.getResults(sinkName);
-            Collections.sort(actual);
-            if (expected.equals(actual)) {
-                return;
-            }
-            Thread.sleep(100);
-        }
+        CommonTestUtils.waitUtil(
+                () -> {
+                    List<String> actual = TestValuesTableFactory.getResults(sinkName);
+                    Collections.sort(actual);
+                    return expected.equals(actual);
+                },
+                timeout,
+                "Can not get the expected result.");
+    }
 
-        // timeout, assert again
-        List<String> actual = TestValuesTableFactory.getResults(sinkName);
-        Collections.sort(actual);
-        assertEquals(expected, actual);
+    public static void checkReturnEmptyResults(String sinkName, Duration timeout)
+            throws InterruptedException, TimeoutException {
+        CommonTestUtils.waitUtil(
+                new Supplier<Boolean>() {

Review comment:
       I am not the biggest fan of anonymous classes including complex logic, can you extract it? WDYT about adding a common helper to `CommonTestUtils` that combines `waitUntil` and your count-based logic?
   
   




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683",
       "triggerID" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691",
       "triggerID" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 124c7893234b31fc1a3ce5b3b29aff32e3b7847d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683) 
   * 7667bd94a9d0af29b443a1b07f6e7077f5b9cce6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] fapaul commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
fapaul commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r784796744



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,27 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(
+                                ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,
+                                OffsetResetStrategy.NONE.name());
+                OffsetResetStrategy offsetResetStrategy =
+                        Arrays.stream(OffsetResetStrategy.values())
+                                .filter(
+                                        ors ->
+                                                ors.name()
+                                                        .equals(
+                                                                offsetResetConfig.toUpperCase(
+                                                                        Locale.ROOT)))
+                                .findAny()
+                                .orElse(null);
+                Preconditions.checkArgument(

Review comment:
       Nit: you can immediately throw the `IllegalArgumentException` with `.orElseThrow()`

##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,27 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(
+                                ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,
+                                OffsetResetStrategy.NONE.name());
+                OffsetResetStrategy offsetResetStrategy =
+                        Arrays.stream(OffsetResetStrategy.values())
+                                .filter(
+                                        ors ->
+                                                ors.name()
+                                                        .equals(
+                                                                offsetResetConfig.toUpperCase(
+                                                                        Locale.ROOT)))

Review comment:
       Nit: This is a bit hard to read maybe extract a method.

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableITCase.java
##########
@@ -821,6 +826,175 @@ public void testPerPartitionWatermarkWithIdleSource() throws Exception {
         deleteTestTopic(topic);
     }
 
+    @Test
+    public void testStartFromGroupOffsetsLatest() throws Exception {
+        testStartFromGroupOffsets("latest", Collections.emptyList());
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsEarliest() throws Exception {
+        final List<String> expected =
+                Arrays.asList(
+                        "+I[0, 0]", "+I[0, 1]", "+I[0, 2]", "+I[1, 3]", "+I[1, 4]", "+I[1, 5]");
+        testStartFromGroupOffsets("earliest", expected);
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsNone() {
+        try {
+            testStartFromGroupOffsetsWithException("none", Collections.emptyList());
+            fail("None offset reset error.");
+        } catch (Exception e) {
+            Throwable rootCause = ExceptionUtils.getRootCause(e);
+            assertTrue(rootCause instanceof NoOffsetForPartitionException);
+        }
+    }
+
+    private void testStartFromGroupOffsets(String reset, List<String> expected)

Review comment:
       The two methods `testStartFromGroupOffset` and `testStartFromGroupOffset` look like largely duplicated code. Can you extract the common parts into a method?

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableITCase.java
##########
@@ -821,6 +826,175 @@ public void testPerPartitionWatermarkWithIdleSource() throws Exception {
         deleteTestTopic(topic);
     }
 
+    @Test
+    public void testStartFromGroupOffsetsLatest() throws Exception {
+        testStartFromGroupOffsets("latest", Collections.emptyList());
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsEarliest() throws Exception {
+        final List<String> expected =
+                Arrays.asList(
+                        "+I[0, 0]", "+I[0, 1]", "+I[0, 2]", "+I[1, 3]", "+I[1, 4]", "+I[1, 5]");
+        testStartFromGroupOffsets("earliest", expected);
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsNone() {
+        try {
+            testStartFromGroupOffsetsWithException("none", Collections.emptyList());
+            fail("None offset reset error.");
+        } catch (Exception e) {
+            Throwable rootCause = ExceptionUtils.getRootCause(e);
+            assertTrue(rootCause instanceof NoOffsetForPartitionException);
+        }
+    }
+
+    private void testStartFromGroupOffsets(String reset, List<String> expected)
+            throws ExecutionException, InterruptedException {
+        // we always use a different topic name for each parameterized topic,
+        // in order to make sure the topic can be created.
+        final String tableName = "Table" + format + reset;
+        final String topic = "groupOffset_" + format + reset;
+        createTestTopic(topic, 4, 1);
+
+        // ---------- Produce an event time stream into Kafka -------------------
+        String groupId = format + reset;
+        String bootstraps = getBootstrapServers();
+        tEnv.getConfig()
+                .getConfiguration()
+                .set(TABLE_EXEC_SOURCE_IDLE_TIMEOUT, Duration.ofMillis(100));
+
+        final String createTableSql =
+                "CREATE TABLE %s (\n"
+                        + "  `partition_id` INT,\n"
+                        + "  `value` INT\n"
+                        + ") WITH (\n"
+                        + "  'connector' = 'kafka',\n"
+                        + "  'topic' = '%s',\n"
+                        + "  'properties.bootstrap.servers' = '%s',\n"
+                        + "  'properties.group.id' = '%s',\n"
+                        + "  'scan.startup.mode' = 'group-offsets',\n"
+                        + "  'properties.auto.offset.reset' = '%s',\n"
+                        + "  'format' = '%s'\n"
+                        + ")";
+        tEnv.executeSql(
+                String.format(
+                        createTableSql, tableName, topic, bootstraps, groupId, reset, format));
+
+        String initialValues =
+                "INSERT INTO "
+                        + tableName
+                        + "\n"
+                        + "VALUES\n"
+                        + " (0, 0),\n"
+                        + " (0, 1),\n"
+                        + " (0, 2),\n"
+                        + " (1, 3),\n"
+                        + " (1, 4),\n"
+                        + " (1, 5)\n";
+        tEnv.executeSql(initialValues).await();
+
+        // ---------- Consume stream from Kafka -------------------
+
+        env.setParallelism(1);
+        String sinkName = "mySink" + format + reset;
+        String createSink =
+                "CREATE TABLE "
+                        + sinkName
+                        + "(\n"
+                        + "  `partition_id` INT,\n"
+                        + "  `value` INT\n"
+                        + ") WITH (\n"
+                        + "  'connector' = 'values'\n"
+                        + ")";
+        tEnv.executeSql(createSink);
+
+        TableResult tableResult =
+                tEnv.executeSql("INSERT INTO " + sinkName + " SELECT * FROM " + tableName);
+
+        if (expected.size() == 0) {
+            KafkaTableTestUtils.waitingEmptyResults(sinkName, Duration.ofSeconds(5));

Review comment:
       I am not sure if it is a good idea to introduce another test util for waiting. We already have `CommonTestUtils#waitUntil` can you take a look at that?

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +389,53 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @ParameterizedTest
+    @MethodSource("offsetResetStrategy")
+    public void testTableSourceSetOffsetReset(final String strategyName) {
+        testSetOffsetResetForStartFromGroupOffsets(strategyName);
+    }
+
+    @Test
+    public void testTableSourceSetOffsetResetWithException() {
+        String errorStrategy = "errorStrategy";
+        Assertions.assertThatThrownBy(() -> testTableSourceSetOffsetReset(errorStrategy))
+                .isInstanceOf(IllegalArgumentException.class)
+                .hasMessage(
+                        String.format(
+                                "%s can not be set to %s. Valid values: [latest, earliest, none]",
+                                ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, errorStrategy));
+    }
+
+    private void testSetOffsetResetForStartFromGroupOffsets(String value) {
+        final Map<String, String> modifiedOptions =
+                getModifiedOptions(
+                        getBasicSourceOptions(),
+                        options -> {
+                            options.remove("scan.startup.mode");
+                            if (value != null) {
+                                options.put(
+                                        PROPERTIES_PREFIX + ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,
+                                        value);
+                            }
+                        });
+        final DynamicTableSource tableSource = createTableSource(SCHEMA, modifiedOptions);
+        assertThat(tableSource, instanceOf(KafkaDynamicSource.class));

Review comment:
       Please use for all the new assertions assertJ.

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +381,44 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @Test
+    public void testTableSourceSetOffsetReset() {
+        testSetOffsetResetForStartFromGroupOffsets(null);
+        testSetOffsetResetForStartFromGroupOffsets("none");
+        testSetOffsetResetForStartFromGroupOffsets("earliest");
+        testSetOffsetResetForStartFromGroupOffsets("latest");
+    }
+
+    private void testSetOffsetResetForStartFromGroupOffsets(String value) {
+        final Map<String, String> modifiedOptions =
+                getModifiedOptions(
+                        getBasicSourceOptions(),
+                        options -> {
+                            options.remove("scan.startup.mode");
+                            if (value != null) {

Review comment:
       Nit: Personally, I am a big fan of handling all cases explicitly
   
   ```java
   if (value == null) {
       return;
   }
   ...
   ```
   it makes the code often more readable

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +389,53 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @ParameterizedTest

Review comment:
       Can you also quickly migrate all the other tests to use junit 5 because mixing them in the same class causes problems? It would be nice to do it as a separate commit.
     

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +389,53 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @ParameterizedTest
+    @MethodSource("offsetResetStrategy")

Review comment:
       I do not think the method source is necessary here you can use the following:
   
   ```java
       @ValueSource(strings = {"none", "earliest", "latest"})
       @NullSource
   ```

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableITCase.java
##########
@@ -821,6 +826,175 @@ public void testPerPartitionWatermarkWithIdleSource() throws Exception {
         deleteTestTopic(topic);
     }
 
+    @Test
+    public void testStartFromGroupOffsetsLatest() throws Exception {
+        testStartFromGroupOffsets("latest", Collections.emptyList());
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsEarliest() throws Exception {
+        final List<String> expected =
+                Arrays.asList(
+                        "+I[0, 0]", "+I[0, 1]", "+I[0, 2]", "+I[1, 3]", "+I[1, 4]", "+I[1, 5]");
+        testStartFromGroupOffsets("earliest", expected);
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsNone() {
+        try {
+            testStartFromGroupOffsetsWithException("none", Collections.emptyList());
+            fail("None offset reset error.");
+        } catch (Exception e) {

Review comment:
       Why do you not only catch the `ExecutionException`? Currently afaict the `fail` call is also caught and handeled.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   * 493bad4a9158fd2e5e83b6a0eb416cc96633be05 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4ea3c9f8fd437a0e6d183bfb62101f54f89de34e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219) 
   * a65b12ce87fe15a5474b0a740e9a054e7685941d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r786444064



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +389,53 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @ParameterizedTest

Review comment:
       fixed




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 26b6b9c6159d8bc45e892462f7104f2c37c33cc8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978






-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] PatrickRen commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
PatrickRen commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r739070733



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +381,44 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @Test
+    public void testTableSourceSetOffsetReset() {

Review comment:
       NIT: We can use parameterized test here after migrating to JUnit 5 😄 

##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -392,7 +394,15 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
+                if (offsetResetConfig == null) {
+                    kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                } else {
+                    kafkaSourceBuilder.setStartingOffsets(
+                            OffsetsInitializer.committedOffsets(
+                                    getOffsetResetStrategy(offsetResetConfig)));

Review comment:
       What about using `OffsetResetStrategy.valueOf(offsetResetConfig.toUpperCase(Locale.ROOT))` ?




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779325869



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,16 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
+                if (offsetResetConfig == null) {
+                    kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                } else {
+                    kafkaSourceBuilder.setStartingOffsets(
+                            OffsetsInitializer.committedOffsets(
+                                    OffsetResetStrategy.valueOf(
+                                            offsetResetConfig.toUpperCase(Locale.ROOT))));

Review comment:
       fixed




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   * f75205b826071098291c54e42f612d2954ed0f0f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-1007225106






-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 removed a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 removed a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-1007225106


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954548519


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 9c400a2e2f502fcedbf4ed773e497c44e23f0ecf (Fri Oct 29 08:23:08 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-24697).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-961592246


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26b6b9c6159d8bc45e892462f7104f2c37c33cc8 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695) 
   * 3b77ef5449acad53555add69956a0cb884f0adf8 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 493bad4a9158fd2e5e83b6a0eb416cc96633be05 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214) 
   * 4ea3c9f8fd437a0e6d183bfb62101f54f89de34e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r786443847



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,27 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(
+                                ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,
+                                OffsetResetStrategy.NONE.name());
+                OffsetResetStrategy offsetResetStrategy =
+                        Arrays.stream(OffsetResetStrategy.values())
+                                .filter(
+                                        ors ->
+                                                ors.name()
+                                                        .equals(
+                                                                offsetResetConfig.toUpperCase(
+                                                                        Locale.ROOT)))
+                                .findAny()
+                                .orElse(null);
+                Preconditions.checkArgument(

Review comment:
       fixed

##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,27 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(
+                                ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,
+                                OffsetResetStrategy.NONE.name());
+                OffsetResetStrategy offsetResetStrategy =
+                        Arrays.stream(OffsetResetStrategy.values())
+                                .filter(
+                                        ors ->
+                                                ors.name()
+                                                        .equals(
+                                                                offsetResetConfig.toUpperCase(
+                                                                        Locale.ROOT)))

Review comment:
       fixed

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +389,53 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @ParameterizedTest
+    @MethodSource("offsetResetStrategy")

Review comment:
       fixed




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683",
       "triggerID" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a65b12ce87fe15a5474b0a740e9a054e7685941d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612) 
   * 124c7893234b31fc1a3ce5b3b29aff32e3b7847d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683) 
   * 7667bd94a9d0af29b443a1b07f6e7077f5b9cce6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683",
       "triggerID" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691",
       "triggerID" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7667bd94a9d0af29b443a1b07f6e7077f5b9cce6 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] OneCricketeer commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
OneCricketeer commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r787846057



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -417,6 +426,19 @@ public int hashCode() {
         return kafkaSourceBuilder.build();
     }
 
+    private OffsetResetStrategy getResetStrategy(String offsetResetConfig) {
+        return Arrays.stream(OffsetResetStrategy.values())
+                .filter(ors -> ors.name().equals(offsetResetConfig.toUpperCase(Locale.ROOT)))
+                .findAny()
+                .orElseThrow(
+                        () ->
+                                new IllegalArgumentException(
+                                        String.format(
+                                                "%s can not be set to %s. Valid values: [latest, earliest, none]",

Review comment:
       Rather than type out the valid values, why not re-use the `OffsetResetStrategy.values()` enum name strings?




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] OneCricketeer commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
OneCricketeer commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r787847957



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -417,6 +426,19 @@ public int hashCode() {
         return kafkaSourceBuilder.build();
     }
 
+    private OffsetResetStrategy getResetStrategy(String offsetResetConfig) {
+        return Arrays.stream(OffsetResetStrategy.values())
+                .filter(ors -> ors.name().equals(offsetResetConfig.toUpperCase(Locale.ROOT)))
+                .findAny()
+                .orElseThrow(
+                        () ->
+                                new IllegalArgumentException(
+                                        String.format(
+                                                "%s can not be set to %s. Valid values: [latest, earliest, none]",

Review comment:
       e.g. `Arrays.stream(OffsetResetStrategy.values()).map(Enum::name).map(String::toLowerCase())`




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 26b6b9c6159d8bc45e892462f7104f2c37c33cc8 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683",
       "triggerID" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691",
       "triggerID" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f4d3b629b942a7a11ac0e818b970fc8bc3e5317f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29749",
       "triggerID" : "f4d3b629b942a7a11ac0e818b970fc8bc3e5317f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7667bd94a9d0af29b443a1b07f6e7077f5b9cce6 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691) 
   * f4d3b629b942a7a11ac0e818b970fc8bc3e5317f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29749) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r788329906



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -417,6 +426,19 @@ public int hashCode() {
         return kafkaSourceBuilder.build();
     }
 
+    private OffsetResetStrategy getResetStrategy(String offsetResetConfig) {
+        return Arrays.stream(OffsetResetStrategy.values())
+                .filter(ors -> ors.name().equals(offsetResetConfig.toUpperCase(Locale.ROOT)))
+                .findAny()
+                .orElseThrow(
+                        () ->
+                                new IllegalArgumentException(
+                                        String.format(
+                                                "%s can not be set to %s. Valid values: [latest, earliest, none]",

Review comment:
       fixed




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] hanwei-36 commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
hanwei-36 commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-1002839382


   When to merge this PR?


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779323094



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,16 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
+                if (offsetResetConfig == null) {

Review comment:
       Yeah, I get your point.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779278210



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,16 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
+                if (offsetResetConfig == null) {

Review comment:
       > Maybe you can get a default value `none` and avoid judging null.
   
   The properties for the Kafka client are not from fixed table options. So we have no way to set a default value.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779533287



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,27 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(
+                                ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,
+                                OffsetResetStrategy.NONE.name());
+                OffsetResetStrategy offsetResetStrategy =
+                        Arrays.stream(OffsetResetStrategy.values())
+                                .filter(
+                                        ors ->
+                                                ors.name()
+                                                        .equals(
+                                                                offsetResetConfig.toUpperCase(
+                                                                        Locale.ROOT)))
+                                .findAny()
+                                .orElse(null);
+                Preconditions.checkArgument(
+                        offsetResetStrategy != null,

Review comment:
       > Can use `Preconditions.checkNotNull()`
   
   I think this place should throw an IllegalArgumentException instead of a NPE, so I use the `Preconditions. checkArgument`. WDYT?




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779325949



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,16 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
+                if (offsetResetConfig == null) {

Review comment:
       fixed




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   * 493bad4a9158fd2e5e83b6a0eb416cc96633be05 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214) 
   * 4ea3c9f8fd437a0e6d183bfb62101f54f89de34e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   * 493bad4a9158fd2e5e83b6a0eb416cc96633be05 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4ea3c9f8fd437a0e6d183bfb62101f54f89de34e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 26b6b9c6159d8bc45e892462f7104f2c37c33cc8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a65b12ce87fe15a5474b0a740e9a054e7685941d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] fapaul commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
fapaul commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r787954460



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -417,6 +426,19 @@ public int hashCode() {
         return kafkaSourceBuilder.build();
     }
 
+    private OffsetResetStrategy getResetStrategy(String offsetResetConfig) {
+        return Arrays.stream(OffsetResetStrategy.values())
+                .filter(ors -> ors.name().equals(offsetResetConfig.toUpperCase(Locale.ROOT)))
+                .findAny()
+                .orElseThrow(
+                        () ->
+                                new IllegalArgumentException(
+                                        String.format(
+                                                "%s can not be set to %s. Valid values: [latest, earliest, none]",

Review comment:
       Looks like a nice addition.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9c400a2e2f502fcedbf4ed773e497c44e23f0ecf Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954548519


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 3b77ef5449acad53555add69956a0cb884f0adf8 (Tue Dec 14 09:06:45 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-24697).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9c400a2e2f502fcedbf4ed773e497c44e23f0ecf Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26b6b9c6159d8bc45e892462f7104f2c37c33cc8 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-961592246


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978






-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4ea3c9f8fd437a0e6d183bfb62101f54f89de34e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219) 
   * a65b12ce87fe15a5474b0a740e9a054e7685941d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r786445498



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableITCase.java
##########
@@ -821,6 +826,175 @@ public void testPerPartitionWatermarkWithIdleSource() throws Exception {
         deleteTestTopic(topic);
     }
 
+    @Test
+    public void testStartFromGroupOffsetsLatest() throws Exception {
+        testStartFromGroupOffsets("latest", Collections.emptyList());
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsEarliest() throws Exception {
+        final List<String> expected =
+                Arrays.asList(
+                        "+I[0, 0]", "+I[0, 1]", "+I[0, 2]", "+I[1, 3]", "+I[1, 4]", "+I[1, 5]");
+        testStartFromGroupOffsets("earliest", expected);
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsNone() {
+        try {
+            testStartFromGroupOffsetsWithException("none", Collections.emptyList());
+            fail("None offset reset error.");
+        } catch (Exception e) {
+            Throwable rootCause = ExceptionUtils.getRootCause(e);
+            assertTrue(rootCause instanceof NoOffsetForPartitionException);
+        }
+    }
+
+    private void testStartFromGroupOffsets(String reset, List<String> expected)

Review comment:
       I have fixed it.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683",
       "triggerID" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691",
       "triggerID" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f4d3b629b942a7a11ac0e818b970fc8bc3e5317f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29749",
       "triggerID" : "f4d3b629b942a7a11ac0e818b970fc8bc3e5317f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f4d3b629b942a7a11ac0e818b970fc8bc3e5317f Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29749) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9c400a2e2f502fcedbf4ed773e497c44e23f0ecf Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626) 
   * 26b6b9c6159d8bc45e892462f7104f2c37c33cc8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ashulin commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ashulin commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779278711



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,16 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
+                if (offsetResetConfig == null) {

Review comment:
       properties.getProperty(key, defaultValue);




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   * f75205b826071098291c54e42f612d2954ed0f0f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   * f75205b826071098291c54e42f612d2954ed0f0f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-1007232090


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   * f75205b826071098291c54e42f612d2954ed0f0f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-1007225106


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683",
       "triggerID" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691",
       "triggerID" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a65b12ce87fe15a5474b0a740e9a054e7685941d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612) 
   * 124c7893234b31fc1a3ce5b3b29aff32e3b7847d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683) 
   * 7667bd94a9d0af29b443a1b07f6e7077f5b9cce6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683",
       "triggerID" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a65b12ce87fe15a5474b0a740e9a054e7685941d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612) 
   * 124c7893234b31fc1a3ce5b3b29aff32e3b7847d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-961592246


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9c400a2e2f502fcedbf4ed773e497c44e23f0ecf UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9c400a2e2f502fcedbf4ed773e497c44e23f0ecf Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626) 
   * 26b6b9c6159d8bc45e892462f7104f2c37c33cc8 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978






-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   * 493bad4a9158fd2e5e83b6a0eb416cc96633be05 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214) 
   * 4ea3c9f8fd437a0e6d183bfb62101f54f89de34e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 removed a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 removed a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-1007225106


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r787369372



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableTestUtils.java
##########
@@ -74,23 +77,40 @@
     }
 
     public static void waitingExpectedResults(
-            String sinkName, List<String> expected, Duration timeout) throws InterruptedException {
-        long now = System.currentTimeMillis();
-        long stop = now + timeout.toMillis();
+            String sinkName, List<String> expected, Duration timeout)
+            throws InterruptedException, TimeoutException {
         Collections.sort(expected);
-        while (System.currentTimeMillis() < stop) {
-            List<String> actual = TestValuesTableFactory.getResults(sinkName);
-            Collections.sort(actual);
-            if (expected.equals(actual)) {
-                return;
-            }
-            Thread.sleep(100);
-        }
+        CommonTestUtils.waitUtil(
+                () -> {
+                    List<String> actual = TestValuesTableFactory.getResults(sinkName);
+                    Collections.sort(actual);
+                    return expected.equals(actual);
+                },
+                timeout,
+                "Can not get the expected result.");
+    }
 
-        // timeout, assert again
-        List<String> actual = TestValuesTableFactory.getResults(sinkName);
-        Collections.sort(actual);
-        assertEquals(expected, actual);
+    public static void checkReturnEmptyResults(String sinkName, Duration timeout)
+            throws InterruptedException, TimeoutException {
+        CommonTestUtils.waitUtil(
+                new Supplier<Boolean>() {

Review comment:
       Yes, I do not think waiting and checking the empty result is a good way to test this situation. I have changed the test to write some data after the job started, and check the new data to make sure we read from latest offsets.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r786445231



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableITCase.java
##########
@@ -821,6 +826,175 @@ public void testPerPartitionWatermarkWithIdleSource() throws Exception {
         deleteTestTopic(topic);
     }
 
+    @Test
+    public void testStartFromGroupOffsetsLatest() throws Exception {
+        testStartFromGroupOffsets("latest", Collections.emptyList());
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsEarliest() throws Exception {
+        final List<String> expected =
+                Arrays.asList(
+                        "+I[0, 0]", "+I[0, 1]", "+I[0, 2]", "+I[1, 3]", "+I[1, 4]", "+I[1, 5]");
+        testStartFromGroupOffsets("earliest", expected);
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsNone() {
+        try {
+            testStartFromGroupOffsetsWithException("none", Collections.emptyList());
+            fail("None offset reset error.");
+        } catch (Exception e) {
+            Throwable rootCause = ExceptionUtils.getRootCause(e);
+            assertTrue(rootCause instanceof NoOffsetForPartitionException);
+        }
+    }
+
+    private void testStartFromGroupOffsets(String reset, List<String> expected)
+            throws ExecutionException, InterruptedException {
+        // we always use a different topic name for each parameterized topic,
+        // in order to make sure the topic can be created.
+        final String tableName = "Table" + format + reset;
+        final String topic = "groupOffset_" + format + reset;
+        createTestTopic(topic, 4, 1);
+
+        // ---------- Produce an event time stream into Kafka -------------------
+        String groupId = format + reset;
+        String bootstraps = getBootstrapServers();
+        tEnv.getConfig()
+                .getConfiguration()
+                .set(TABLE_EXEC_SOURCE_IDLE_TIMEOUT, Duration.ofMillis(100));
+
+        final String createTableSql =
+                "CREATE TABLE %s (\n"
+                        + "  `partition_id` INT,\n"
+                        + "  `value` INT\n"
+                        + ") WITH (\n"
+                        + "  'connector' = 'kafka',\n"
+                        + "  'topic' = '%s',\n"
+                        + "  'properties.bootstrap.servers' = '%s',\n"
+                        + "  'properties.group.id' = '%s',\n"
+                        + "  'scan.startup.mode' = 'group-offsets',\n"
+                        + "  'properties.auto.offset.reset' = '%s',\n"
+                        + "  'format' = '%s'\n"
+                        + ")";
+        tEnv.executeSql(
+                String.format(
+                        createTableSql, tableName, topic, bootstraps, groupId, reset, format));
+
+        String initialValues =
+                "INSERT INTO "
+                        + tableName
+                        + "\n"
+                        + "VALUES\n"
+                        + " (0, 0),\n"
+                        + " (0, 1),\n"
+                        + " (0, 2),\n"
+                        + " (1, 3),\n"
+                        + " (1, 4),\n"
+                        + " (1, 5)\n";
+        tEnv.executeSql(initialValues).await();
+
+        // ---------- Consume stream from Kafka -------------------
+
+        env.setParallelism(1);
+        String sinkName = "mySink" + format + reset;
+        String createSink =
+                "CREATE TABLE "
+                        + sinkName
+                        + "(\n"
+                        + "  `partition_id` INT,\n"
+                        + "  `value` INT\n"
+                        + ") WITH (\n"
+                        + "  'connector' = 'values'\n"
+                        + ")";
+        tEnv.executeSql(createSink);
+
+        TableResult tableResult =
+                tEnv.executeSql("INSERT INTO " + sinkName + " SELECT * FROM " + tableName);
+
+        if (expected.size() == 0) {
+            KafkaTableTestUtils.waitingEmptyResults(sinkName, Duration.ofSeconds(5));

Review comment:
       fixed. I have refactored them with the `CommonTestUtils#waitUntil`.
   This code aims to make sure that we will not get any result from the test. I have reimplemented it with `CommonTestUtils#waitUntil` and give it a more meaningful name.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779320247



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +381,44 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @Test
+    public void testTableSourceSetOffsetReset() {
+        testSetOffsetResetForStartFromGroupOffsets(null);
+        testSetOffsetResetForStartFromGroupOffsets("none");
+        testSetOffsetResetForStartFromGroupOffsets("earliest");
+        testSetOffsetResetForStartFromGroupOffsets("latest");
+    }
+
+    private void testSetOffsetResetForStartFromGroupOffsets(String value) {
+        final Map<String, String> modifiedOptions =
+                getModifiedOptions(
+                        getBasicSourceOptions(),
+                        options -> {
+                            options.remove("scan.startup.mode");
+                            if (value != null) {

Review comment:
       The properties for the Kafka client are not from fixed table options. So we have no way to set a default value. And we have to test the null value.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29683",
       "triggerID" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691",
       "triggerID" : "7667bd94a9d0af29b443a1b07f6e7077f5b9cce6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f4d3b629b942a7a11ac0e818b970fc8bc3e5317f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f4d3b629b942a7a11ac0e818b970fc8bc3e5317f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7667bd94a9d0af29b443a1b07f6e7077f5b9cce6 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29691) 
   * f4d3b629b942a7a11ac0e818b970fc8bc3e5317f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] fapaul merged pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
fapaul merged pull request #17601:
URL: https://github.com/apache/flink/pull/17601


   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007225106",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1007232090",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "1008494542",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29214",
       "triggerID" : "493bad4a9158fd2e5e83b6a0eb416cc96633be05",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29219",
       "triggerID" : "4ea3c9f8fd437a0e6d183bfb62101f54f89de34e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612",
       "triggerID" : "a65b12ce87fe15a5474b0a740e9a054e7685941d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "124c7893234b31fc1a3ce5b3b29aff32e3b7847d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a65b12ce87fe15a5474b0a740e9a054e7685941d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29612) 
   * 124c7893234b31fc1a3ce5b3b29aff32e3b7847d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r787338430



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -679,106 +729,165 @@ private void verifyEncoderSubject(
 
     @Test
     public void testSourceTableWithTopicAndTopicPattern() {
-        thrown.expect(ValidationException.class);
-        thrown.expect(
-                containsCause(
-                        new ValidationException(
-                                "Option 'topic' and 'topic-pattern' shouldn't be set together.")));
-
-        final Map<String, String> modifiedOptions =
-                getModifiedOptions(
-                        getBasicSourceOptions(),
-                        options -> {
-                            options.put("topic", TOPICS);
-                            options.put("topic-pattern", TOPIC_REGEX);
-                        });
-
-        createTableSource(SCHEMA, modifiedOptions);
+        assertThatThrownBy(
+                        () -> {
+                            final Map<String, String> modifiedOptions =
+                                    getModifiedOptions(
+                                            getBasicSourceOptions(),
+                                            options -> {
+                                                options.put("topic", TOPICS);
+                                                options.put("topic-pattern", TOPIC_REGEX);
+                                            });
+
+                            createTableSource(SCHEMA, modifiedOptions);
+                        })
+                .isInstanceOf(ValidationException.class)
+                .satisfies(
+                        throwable ->
+                                assertThatChainOfCauses(throwable)
+                                        .anySatisfy(
+                                                cause ->
+                                                        assertThat(cause)
+                                                                .isInstanceOf(
+                                                                        ValidationException.class)
+                                                                .hasMessage(
+                                                                        "Option 'topic' and 'topic-pattern' shouldn't be set together.")));

Review comment:
       `FlinkAssertions.anyCauseMatches()` uses `hasMessageContaining` to check the error message. We need to check with `hasMessage` here.
   I will add a new method `containsCause` to `FlinkAssertions` to fix it.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26b6b9c6159d8bc45e892462f7104f2c37c33cc8 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695) 
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-1004565845


   @fapaul Could you help to review this PR?
   By the way, please assign this ticket to me in the JIRA.


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   * f75205b826071098291c54e42f612d2954ed0f0f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779320247



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +381,44 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @Test
+    public void testTableSourceSetOffsetReset() {
+        testSetOffsetResetForStartFromGroupOffsets(null);
+        testSetOffsetResetForStartFromGroupOffsets("none");
+        testSetOffsetResetForStartFromGroupOffsets("earliest");
+        testSetOffsetResetForStartFromGroupOffsets("latest");
+    }
+
+    private void testSetOffsetResetForStartFromGroupOffsets(String value) {
+        final Map<String, String> modifiedOptions =
+                getModifiedOptions(
+                        getBasicSourceOptions(),
+                        options -> {
+                            options.remove("scan.startup.mode");
+                            if (value != null) {

Review comment:
       I do not think we should ignore the null value here. The null value should be tested as it could be provided by users.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-954546978


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25626",
       "triggerID" : "9c400a2e2f502fcedbf4ed773e497c44e23f0ecf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26b6b9c6159d8bc45e892462f7104f2c37c33cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25695",
       "triggerID" : "961592246",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024",
       "triggerID" : "3b77ef5449acad53555add69956a0cb884f0adf8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006",
       "triggerID" : "71cf12577cbfca363b452d2c6c2634ef1616fae6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011",
       "triggerID" : "f75205b826071098291c54e42f612d2954ed0f0f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b77ef5449acad53555add69956a0cb884f0adf8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28024) 
   * 71cf12577cbfca363b452d2c6c2634ef1616fae6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29006) 
   * f75205b826071098291c54e42f612d2954ed0f0f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29011) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ashulin commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ashulin commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779394364



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,27 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(
+                                ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,
+                                OffsetResetStrategy.NONE.name());
+                OffsetResetStrategy offsetResetStrategy =
+                        Arrays.stream(OffsetResetStrategy.values())
+                                .filter(
+                                        ors ->
+                                                ors.name()
+                                                        .equals(
+                                                                offsetResetConfig.toUpperCase(
+                                                                        Locale.ROOT)))
+                                .findAny()
+                                .orElse(null);
+                Preconditions.checkArgument(
+                        offsetResetStrategy != null,

Review comment:
       Can use `Preconditions.checkNotNull()`




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ashulin commented on a change in pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ashulin commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r777856618



##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,16 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
+                if (offsetResetConfig == null) {

Review comment:
       Maybe you can get a default value `none` and avoid judging null.

##########
File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java
##########
@@ -393,7 +396,16 @@ public int hashCode() {
                 kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.latest());
                 break;
             case GROUP_OFFSETS:
-                kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                String offsetResetConfig =
+                        properties.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
+                if (offsetResetConfig == null) {
+                    kafkaSourceBuilder.setStartingOffsets(OffsetsInitializer.committedOffsets());
+                } else {
+                    kafkaSourceBuilder.setStartingOffsets(
+                            OffsetsInitializer.committedOffsets(
+                                    OffsetResetStrategy.valueOf(
+                                            offsetResetConfig.toUpperCase(Locale.ROOT))));

Review comment:
       `offsetResetConfig` may be a wrong value and needs to be verified.

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +381,44 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @Test
+    public void testTableSourceSetOffsetReset() {
+        testSetOffsetResetForStartFromGroupOffsets(null);
+        testSetOffsetResetForStartFromGroupOffsets("none");
+        testSetOffsetResetForStartFromGroupOffsets("earliest");
+        testSetOffsetResetForStartFromGroupOffsets("latest");
+    }
+
+    private void testSetOffsetResetForStartFromGroupOffsets(String value) {
+        final Map<String, String> modifiedOptions =
+                getModifiedOptions(
+                        getBasicSourceOptions(),
+                        options -> {
+                            options.remove("scan.startup.mode");
+                            if (value != null) {

Review comment:
       Like the code above, null judgment can be avoided.

##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +381,44 @@ public void testTableSourceCommitOnCheckpointDisabled() {
                                 .noDefaultValue()));
     }
 
+    @Test
+    public void testTableSourceSetOffsetReset() {

Review comment:
       > NIT: We can use parameterized test here after migrating to JUnit 5 😄
   
   The current version of junit-jupiter is 5.8.1, which supports parameterized testing.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on pull request #17601: [FLINK-24697][flink-connectors-kafka] add auto.offset.reset configuration for group-offsets startup mode

Posted by GitBox <gi...@apache.org>.
ruanhang1993 commented on pull request #17601:
URL: https://github.com/apache/flink/pull/17601#issuecomment-1008494542


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org