Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 0a7a94e

Browse files
jerluctdas
authored andcommitted
[SPARK-7621] [STREAMING] Report Kafka errors to StreamingListeners
PR per [SPARK-7621](https://issues.apache.org/jira/browse/SPARK-7621), which makes both `KafkaReceiver` and `ReliableKafkaReceiver` report its errors to the `ReceiverTracker`, which in turn will add the events to the bus to fire off any registered `StreamingListener`s. Author: jerluc <[email protected]> Closes apache#6204 from jerluc/master and squashes the following commits: 82439a5 [jerluc] [SPARK-7621] [STREAMING] Report Kafka errors to StreamingListeners
1 parent 4fb52f9 commit 0a7a94e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

external/kafka/src/main/scala/org/apache/spark/streaming/kafka/KafkaInputDStream.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class KafkaReceiver[
135135
store((msgAndMetadata.key, msgAndMetadata.message))
136136
}
137137
} catch {
138-
case e: Throwable => logError("Error handling message; exiting", e)
138+
case e: Throwable => reportError("Error handling message; exiting", e)
139139
}
140140
}
141141
}

external/kafka/src/main/scala/org/apache/spark/streaming/kafka/ReliableKafkaReceiver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class ReliableKafkaReceiver[
267267
}
268268
} catch {
269269
case e: Exception =>
270-
logError("Error handling message", e)
270+
reportError("Error handling message", e)
271271
}
272272
}
273273
}

0 commit comments

Comments
 (0)