Github user koeninger commented on a diff in the pull request:
https://github.com/apache/spark/pull/14340#discussion_r72177258
--- Diff:
external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/KafkaUtils.scala
---
@@ -177,3 +182,172 @@ object KafkaUtils extends Logging {
}
}
}
+
+private[kafka010] class KafkaUtilsPythonHelper extends Logging {
+ import KafkaUtilsPythonHelper._
+
+ def createDirectStream(
+ jssc: JavaStreamingContext,
+ locationStrategy: LocationStrategy,
+ consumerStrategy: ConsumerStrategy[Array[Byte], Array[Byte]]
+ ): JavaDStream[Array[Byte]] = {
+ fixKafkaParams(consumerStrategy.executorKafkaParams)
--- End diff --
Good point. I think the reasonable choices here are to wrap the passed in
consumer strategy with a python-specific class that delegates and does the
defensive copy, or to just error if the serializers are not correct. I think
I'm more in favor of just throwing an error, having to specify the correct
serializers isn't any more work than the scala / java api, and it's more
explicit.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]