You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/21 07:40:52 UTC

[GitHub] [spark] viirya opened a new pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

viirya opened a new pull request #31275:
URL: https://github.com/apache/spark/pull/31275


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   This patch uses the available offset range obtained during polling Kafka records to do offset validation check.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   We support non-consecutive offsets for Kafka since 2.4.0. In `fetchRecord`, we do offset validation by checking if the offset is in available offset range. But currently we obtain latest available offset range to do the check. It looks not correct as the available offset range could be changed during the batch, so the available offset range is different than the one when we polling the records from Kafka.
   
   It is possible that an offset is valid when polling, but at the time we do the above check, it is out of latest available offset range. We will wrongly consider it as data loss case and fail the query or drop the record.
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   No
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   
   This should pass existing unit tests.
   
   This is hard to have unit test as the Kafka producer and the consumer is asynchronous. Further, we also need to make the offset out of new available offset range.


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764486136


   **[Test build #134314 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134314/testReport)** for PR 31275 at commit [`3494e18`](https://github.com/apache/spark/commit/3494e18f25375c7e1ba6b353a992553b07b48311).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766416771


   **[Test build #134414 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134414/testReport)** for PR 31275 at commit [`8716a16`](https://github.com/apache/spark/commit/8716a16f054dba69865ea4bd845d16241eb2eab9).


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764462277






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764871795


   **[Test build #134340 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134340/testReport)** for PR 31275 at commit [`81c52e5`](https://github.com/apache/spark/commit/81c52e5c49ee9a39572cbad736572c779d10a4e5).


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764462277


   **[Test build #134314 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134314/testReport)** for PR 31275 at commit [`3494e18`](https://github.com/apache/spark/commit/3494e18f25375c7e1ba6b353a992553b07b48311).


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764871795


   **[Test build #134340 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134340/testReport)** for PR 31275 at commit [`81c52e5`](https://github.com/apache/spark/commit/81c52e5c49ee9a39572cbad736572c779d10a4e5).


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764655747


   cc @HeartSaVioR @gaborgsomogyi @xuanyuanking 


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764524405


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/38901/
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun closed pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #31275:
URL: https://github.com/apache/spark/pull/31275


   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766411298


   > Given your assessment, could you make it as a correctness issue, @viirya ?
   
   Done. Thanks.
   
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] jaceklaskowski commented on a change in pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
jaceklaskowski commented on a change in pull request #31275:
URL: https://github.com/apache/spark/pull/31275#discussion_r561802357



##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/KafkaDataConsumer.scala
##########
@@ -192,6 +197,13 @@ private[consumer] case class FetchedData(
    * Returns the next offset to poll after draining the pre-fetched records.
    */
   def offsetAfterPoll: Long = _offsetAfterPoll
+
+  /**
+   * Returns the tuple of earliest and latest offset that are the available offset range when

Review comment:
       nit: offsets (plural) and s/that are/that is (singular)




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] jaceklaskowski commented on a change in pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
jaceklaskowski commented on a change in pull request #31275:
URL: https://github.com/apache/spark/pull/31275#discussion_r561802357



##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/KafkaDataConsumer.scala
##########
@@ -192,6 +197,13 @@ private[consumer] case class FetchedData(
    * Returns the next offset to poll after draining the pre-fetched records.
    */
   def offsetAfterPoll: Long = _offsetAfterPoll
+
+  /**
+   * Returns the tuple of earliest and latest offset that are the available offset range when

Review comment:
       nit: offsets (plural) and s/that are/that is (singular)




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764897919


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38927/
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764905154






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] jaceklaskowski commented on a change in pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
jaceklaskowski commented on a change in pull request #31275:
URL: https://github.com/apache/spark/pull/31275#discussion_r562548358



##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/KafkaDataConsumer.scala
##########
@@ -192,6 +197,13 @@ private[consumer] case class FetchedData(
    * Returns the next offset to poll after draining the pre-fetched records.
    */
   def offsetAfterPoll: Long = _offsetAfterPoll
+
+  /**
+   * Returns the tuple of earliest and latest offsets that is the available offset range when

Review comment:
       nit: Use `@returns` annotation.
   
   Sorry for being late with this, but I've just noticed 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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766433955


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39000/
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HeartSaVioR commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
HeartSaVioR commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-767204682


   Nice finding, and thanks for the fix!


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766420622


   Thank you for update, @viirya .


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766411298






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on a change in pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #31275:
URL: https://github.com/apache/spark/pull/31275#discussion_r563331257



##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/KafkaDataConsumer.scala
##########
@@ -192,6 +197,13 @@ private[consumer] case class FetchedData(
    * Returns the next offset to poll after draining the pre-fetched records.
    */
   def offsetAfterPoll: Long = _offsetAfterPoll
+
+  /**
+   * Returns the tuple of earliest and latest offsets that is the available offset range when

Review comment:
       Hm, I think this just follows other methods above and below.

##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/FetchedDataPool.scala
##########
@@ -170,11 +170,14 @@ private[consumer] object FetchedDataPool {
   }
 
   private object CachedFetchedData {
+    import KafkaDataConsumer.AvailableOffsetRange

Review comment:
       Moved. Thanks.




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun closed pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #31275:
URL: https://github.com/apache/spark/pull/31275


   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766425117






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766416771






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766416771


   **[Test build #134414 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134414/testReport)** for PR 31275 at commit [`8716a16`](https://github.com/apache/spark/commit/8716a16f054dba69865ea4bd845d16241eb2eab9).


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764905155






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766420622






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766425117






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766422547


   **[Test build #134414 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134414/testReport)** for PR 31275 at commit [`8716a16`](https://github.com/apache/spark/commit/8716a16f054dba69865ea4bd845d16241eb2eab9).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766425139


   Thanks @dongjoon-hyun. Will file backport later.


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on a change in pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #31275:
URL: https://github.com/apache/spark/pull/31275#discussion_r563333453



##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/FetchedDataPool.scala
##########
@@ -170,11 +170,14 @@ private[consumer] object FetchedDataPool {
   }
 
   private object CachedFetchedData {
+    import KafkaDataConsumer.AvailableOffsetRange

Review comment:
       Moved. Thanks.




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766425117






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766420956


   Merged to master/3.1. Could you make a backport to 3.0/2.4?


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764489443






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764462277


   **[Test build #134314 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134314/testReport)** for PR 31275 at commit [`3494e18`](https://github.com/apache/spark/commit/3494e18f25375c7e1ba6b353a992553b07b48311).


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766425117


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134414/
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764462277






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-766416771


   **[Test build #134414 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134414/testReport)** for PR 31275 at commit [`8716a16`](https://github.com/apache/spark/commit/8716a16f054dba69865ea4bd845d16241eb2eab9).


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764489443


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134314/
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764524405


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/38901/
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HeartSaVioR commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
HeartSaVioR commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-767204682


   Nice finding, and thanks for the fix!


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764489443






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #31275:
URL: https://github.com/apache/spark/pull/31275#discussion_r563324752



##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/FetchedDataPool.scala
##########
@@ -170,11 +170,14 @@ private[consumer] object FetchedDataPool {
   }
 
   private object CachedFetchedData {
+    import KafkaDataConsumer.AvailableOffsetRange

Review comment:
       Shall we move this to line 31?




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764895429






----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764489443


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134314/
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #31275:
URL: https://github.com/apache/spark/pull/31275#issuecomment-764655747


   cc @HeartSaVioR @gaborgsomogyi @xuanyuanking 


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on a change in pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #31275:
URL: https://github.com/apache/spark/pull/31275#discussion_r563331257



##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/KafkaDataConsumer.scala
##########
@@ -192,6 +197,13 @@ private[consumer] case class FetchedData(
    * Returns the next offset to poll after draining the pre-fetched records.
    */
   def offsetAfterPoll: Long = _offsetAfterPoll
+
+  /**
+   * Returns the tuple of earliest and latest offsets that is the available offset range when

Review comment:
       Hm, I think this just follows other methods above and below.




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #31275: [SPARK-34187][SS] Use available offset range obtained during polling when checking offset validation

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #31275:
URL: https://github.com/apache/spark/pull/31275#discussion_r563324752



##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/FetchedDataPool.scala
##########
@@ -170,11 +170,14 @@ private[consumer] object FetchedDataPool {
   }
 
   private object CachedFetchedData {
+    import KafkaDataConsumer.AvailableOffsetRange

Review comment:
       Shall we move this to line 31?




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org