Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Merge #1
Changes from 1 commit
27d0c3f42050c34080c4b8c8016aabc88de4a89fa1c764dd6ff3a737252b6cfa9ae262f7cc695076186e93ac4e181b6f113e26492c7c6b643be574189bad26e2c4787051e691a838dbdfe4bee876bc9db51d35097a2ea58f725d47655356ec08bc37d22768a0c40b94d50f6e6c38f4594513f1cda7e5c47c85968cb72b10b8b67ae81de9d37c02c14fff2e84b3e9be4d75588ce650f8feef3abbd8b0914a36a72358989cde07cbbea1b90bf21db2f86a4235ab8b59d6c8159c766c9dc3a1213d58beb736d3679a9103de969f3c821bdc4943cd04607570525fada3ad3aed7ff3bd28e8e4dd0066cc852d44bffcf5fda0e6e420abb4233c214d72f398ece421394946e42409320816771467d5b9b31700111d4b2f0df286713ea9d68dd92e15989b0c728b8383101839039eb79a76791b8e1ea806a0b3d7ad841b33bd031c20cf2f48a4601cb0cd436be1388012ec3265c6938ea3b1674cf2ead4d85dafab9a84fae730a17851d6ba7e44d191178a1f340485f4ee66890858bf762bc3fff7aca0dd854a0f74e0e4e56b5e0e26f68769aedf0908fabbab0f48aaf8b71e5491747bd93289b5275e044eecef7520ee2f5130e9ae228b1eadf22535855671080afc797c5db4577510c65a512e8932e26118b7ad2ea8b5dfbd213a02399134b103449f0534fb64fe82bd2f21b056a3bebcb501777d80aa5ffddfc8948a6e8ef1e8494e6d31fde360e90da667db3eba2969b0cc12d871adee83d09a927f1ac97b3edba4d413fa95a5c3b0bca44d93fb7cc7493f7ba16ff6edabebe9461042b3c3796390f02beb8d2f8136295aa1acfe3a7126c8b62399f302c2ee94abd7b5b1b69782a94dd193248abba53e9e12c94148cd26ef8152567e1360ef6dce2da576a7cfcaf52ba0456281915dae696c3652186afa42d894bfa09cfff9fcd51f1443e9407fba857f109a988aaf89159669ac4b2d2e28622322ec0b4ecbdbb39d53d302c5b4f95de93b51f10ede00344e93e71e657edb42eb8c4209dacdd35a482e7d11cbf26d4cc7b8eb8f74fda4070239ee3f4b902d3dc0bc7af800fa32f0a38c100fc5878bdcfa00347a3901ff928616109ec5d69878b0cbeef4c29856926806f8c001dba673f743514639af51dc3a0d0277fe8a89e42c529a3dcca23f45f14cfce3ee4b4a352437878ab92e174a6005c0f65b49f4d5aa45b4d917e99a9f75fc363b31a5dea6ffec5eeef11babb4400cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
… available ### What changes were proposed in this pull request? Kafka consumers are cached. If delegation token is used and the token is expired, then exception is thrown. Such case new consumer is created in a Task retry with the latest delegation token. This can be enhanced by detecting the existence of a new delegation token. In this PR I'm detecting whether the token in the consumer is the same as the latest stored in the `UGI` (`targetServersRegex` must match not to create a consumer with another cluster's token). ### Why are the changes needed? It would be good to avoid Task retry to pick up the latest delegation token. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Existing + new unit tests. Additionally executed the following code snippet to measure `ensureConsumerHasLatestToken` time consumption: ``` val startTimeNs = System.nanoTime() for (i <- 0 until 10000) { consumer.ensureConsumerHasLatestToken() } logInfo(s"It took ${TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTimeNs)} ms" + " to call ensureConsumerHasLatestToken 10000 times") ``` And here are the results: ``` 19/09/11 14:58:22 INFO KafkaDataConsumerSuite: It took 1058 ms to call ensureConsumerHasLatestToken 10000 times ... 19/09/11 14:58:23 INFO KafkaDataConsumerSuite: It took 780 ms to call ensureConsumerHasLatestToken 10000 times ... 19/09/11 15:12:11 INFO KafkaDataConsumerSuite: It took 1032 ms to call ensureConsumerHasLatestToken 10000 times ... 19/09/11 15:12:11 INFO KafkaDataConsumerSuite: It took 679 ms to call ensureConsumerHasLatestToken 10000 times ``` Closes apache#25760 from gaborgsomogyi/SPARK-29054. Authored-by: Gabor Somogyi <[email protected]> Signed-off-by: Marcelo Vanzin <[email protected]>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.