HeartSaVioR commented on a change in pull request #22138: [SPARK-25151][SS] 
Apply Apache Commons Pool to KafkaDataConsumer
URL: https://github.com/apache/spark/pull/22138#discussion_r318327913
 
 

 ##########
 File path: 
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaDataConsumer.scala
 ##########
 @@ -266,12 +293,9 @@ private[kafka010] case class InternalKafkaConsumer(
         }
       } catch {
         case e: OffsetOutOfRangeException =>
-          // When there is some error thrown, it's better to use a new 
consumer to drop all cached
-          // states in the old consumer. We don't need to worry about the 
performance because this
-          // is not a common path.
-          resetConsumer()
 
 Review comment:
   OffsetOutOfRangeException doesn't seem to indicate consumer itself is 
corrupted so I feel consumer is not strictly necessary to be reset, but as we 
don't know the case of delegation token it would be safer to get new consumer. 
I'll address 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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to