gaborgsomogyi opened a new pull request #23906: [SPARK-27002][SS] Get kafka 
delegation tokens right before consumer/producer created
URL: https://github.com/apache/spark/pull/23906
 
 
   ## What changes were proposed in this pull request?
   
   Spark not always picking up the latest Kafka delegation tokens even if a new 
one properly obtained.
   In the PR I'm setting delegation tokens right before `KafkaConsumer` and 
`KafkaProducer` creation to be on the safe side.
   
   ## How was this patch tested?
   
   Long running Kafka to Kafka tests on 4 node cluster with randomly thrown 
artificial exceptions.
   
   Test scenario:
   * 4 node cluster
   * Yarn
   * Kafka broker version 2.1.0
   * security.protocol = SASL_SSL
   * sasl.mechanism = SCRAM-SHA-512
   
   Kafka broker settings:
   * delegation.token.expiry.time.ms=600000 (10 min)
   * delegation.token.max.lifetime.ms=1200000 (20 min)
   * delegation.token.expiry.check.interval.ms=300000 (5 min)
   
   After each 7.5 minutes new delegation token obtained from Kafka broker (10 
min * 0.75).
   But when token expired after 10 minutes (Spark obtains new one the doesn't 
renew the old), the brokers expiring thread comes after each 5 minutes 
(invalidates expired tokens) and artificial exception has been thrown inside 
the Spark application (such case Spark closes connection), then the latest 
delegation token not always picked up.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to