Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/7410#discussion_r35553059
--- Diff: python/pyspark/streaming/kafka.py ---
@@ -347,3 +369,43 @@ def _jdstream(self):
dstream =
self._sc._jvm.PythonTransformedDStream(self.prev._jdstream.dstream(), jfunc)
self._jdstream_val = dstream.asJavaDStream()
return self._jdstream_val
+
+
+class KafkaMessageAndMetadata(object):
+ """
+ Kafka message and metadata information. Including topic, partition,
offset and message
+ """
+
+ def __init__(self, topic, partition, offset, key, message):
--- End diff --
Could you add docs for `__init__`? So that the user can find the type
information of these fields.
---
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]