Github user holdenk commented on a diff in the pull request:
https://github.com/apache/bahir/pull/10#discussion_r71425100
--- Diff: streaming-mqtt/python/mqtt.py ---
@@ -38,19 +38,26 @@ def createStream(ssc, brokerUrl, topic,
:param storageLevel: RDD storage level.
:return: A DStream object
"""
+ jlevel = ssc._sc._getJavaStorageLevel(storageLevel)
+
try:
- helper =
ssc._jvm.org.apache.spark.streaming.mqtt.MQTTUtilsPythonHelper()
- except TypeError as e:
- if str(e) == "'JavaPackage' object is not callable":
+ helperClass =
ssc._jvm.java.lang.Thread.currentThread().getContextClassLoader() \
--- End diff --
After 07cb323e7a128b87ef265ddc66f033365d9de463 in Spark you _should_ be
able to skip this hack and instead replace with the standard _jvm reference and
then in your exception replace the search for classnotfoundexception with
"'JavaPackage' object is not callable" inside of TypeError exception.
---
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.
---