Skip to content

Conversation

@gaborgsomogyi
Copy link
Contributor

What changes were proposed in this pull request?

The Kafka offset reader which uses AdminClient still uses UninterruptibleThread to call it. Since there is no evidence that AdminClient suffers from similar issues like KAFKA-1894 I'm removing UninterruptibleThread usage. In order to put the AdminClient under stress and make sure it works I've created the following standalone application: https://github.com/gaborgsomogyi/kafka-admin-interruption

What this PR contains:

  • Removed UninterruptibleThread from KafkaOffsetReaderAdmin
  • Removed/modified comments which are not true
  • Adapted KafkaRelationSuite
  • Renamed partitionsAssignedToConsumer to partitionsAssignedToAdmin

Why are the changes needed?

KafkaOffsetReaderAdmin doesn't need UninterruptibleThread usage.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing unit tests + manually with simple Kafka to Kafka query.

val (topic, timestamps) = prepareTimestampRelatedUnitTest

val e = intercept[SparkException] {
// KafkaOffsetReaderConsumer and KafkaOffsetReaderAdmin both throws AssertionError
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to help reviewers I've created a small extract how the exception difference look like.
With UninterruptibleThread test execution:

org.apache.spark.SparkException(Exception thrown in awaitResult: )
java.util.concurrent.ExecutionException(Boxed Error)
java.lang.AssertionError(assertion failed: No offset matched from request of topic-partition topic-0-2 and timestamp 9223372036854775807.)

Without UninterruptibleThread test execution:

java.lang.AssertionError(assertion failed: No offset matched from request of topic-partition topic-0-2 and timestamp 9223372036854775807.)

@SparkQA
Copy link

SparkQA commented Dec 8, 2020

Test build #132418 has finished for PR 30668 at commit b4547a0.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gaborgsomogyi
Copy link
Contributor Author

@SparkQA
Copy link

SparkQA commented Dec 8, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37018/

@SparkQA
Copy link

SparkQA commented Dec 8, 2020

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

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me

Copy link
Contributor

@HeartSaVioR HeartSaVioR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

I'll wait for a couple of days to see whether there's additional review comment, and merge once there's no further comment.

Copy link
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@xuanyuanking xuanyuanking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HeartSaVioR
Copy link
Contributor

retest this, please

@HeartSaVioR
Copy link
Contributor

Will merge either Jenkins or Github Action passes.

@SparkQA
Copy link

SparkQA commented Dec 11, 2020

Test build #132622 has finished for PR 30668 at commit b4547a0.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor

Thanks @gaborgsomogyi for the contribution! Merged into master (3.2.0).

@SparkQA
Copy link

SparkQA commented Dec 11, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37224/

@SparkQA
Copy link

SparkQA commented Dec 11, 2020

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

@gaborgsomogyi
Copy link
Contributor Author

Extremely small step for the community but huge step for me. This was my 100th commit, thank you all! 🙂

@HyukjinKwon
Copy link
Member

@gaborgsomogyi it's a extremely large step for the community :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants