HeartSaVioR edited a comment on issue #22282: [SPARK-23539][SS] Add support for Kafka headers in Structured Streaming URL: https://github.com/apache/spark/pull/22282#issuecomment-523827720 The fix wouldn't work since KafkaOffsetReader will be shared across tasks in same JVM (since it's a singleton `object`) and `UnsafeProjection` instances being created via `UnsafeProjection.create` are not thread-safe. That's the reason why UTs fail. You may either make them `ThreadLocal` (though it may grow incrementally so don't recommend), or just follow the previous approach of `KafkaRecordToUnsafeRowConverter` and initialize per caller (would be each task).
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org