vanzin commented on a change in pull request #25583: [MINOR][SS] Reuse
KafkaSourceInitialOffsetWriter to deduplicate
URL: https://github.com/apache/spark/pull/25583#discussion_r317830924
##########
File path:
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaSource.scala
##########
@@ -98,37 +98,7 @@ private[kafka010] class KafkaSource(
* `KafkaConsumer.poll` may hang forever (KAFKA-1894).
*/
private lazy val initialPartitionOffsets = {
- val metadataLog =
- new HDFSMetadataLog[KafkaSourceOffset](sqlContext.sparkSession,
metadataPath) {
- override def serialize(metadata: KafkaSourceOffset, out:
OutputStream): Unit = {
- out.write(0) // A zero byte is written to support Spark 2.1.0
(SPARK-19517)
- val writer = new BufferedWriter(new OutputStreamWriter(out,
StandardCharsets.UTF_8))
- writer.write("v" + VERSION + "\n")
Review comment:
The `VERSION` constant later in this file seems unused now.
----------------------------------------------------------------
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]