-
- Downloads
[SPARK-9812] [STREAMING] Fix Python 3 compatibility issue in PySpark Streaming and some docs
This PR includes the following fixes: 1. Use `range` instead of `xrange` in `queue_stream.py` to support Python 3. 2. Fix the issue that `utf8_decoder` will return `bytes` rather than `str` when receiving an empty `bytes` in Python 3. 3. Fix the commands in docs so that the user can copy them directly to the command line. The previous commands was broken in the middle of a path, so when copying to the command line, the path would be split to two parts by the extra spaces, which forces the user to fix it manually. Author: zsxwing <zsxwing@gmail.com> Closes #8315 from zsxwing/SPARK-9812.
Showing
- examples/src/main/python/streaming/direct_kafka_wordcount.py 3 additions, 3 deletionsexamples/src/main/python/streaming/direct_kafka_wordcount.py
- examples/src/main/python/streaming/flume_wordcount.py 3 additions, 2 deletionsexamples/src/main/python/streaming/flume_wordcount.py
- examples/src/main/python/streaming/kafka_wordcount.py 3 additions, 2 deletionsexamples/src/main/python/streaming/kafka_wordcount.py
- examples/src/main/python/streaming/mqtt_wordcount.py 3 additions, 2 deletionsexamples/src/main/python/streaming/mqtt_wordcount.py
- examples/src/main/python/streaming/queue_stream.py 2 additions, 2 deletionsexamples/src/main/python/streaming/queue_stream.py
- python/pyspark/streaming/flume.py 3 additions, 1 deletionpython/pyspark/streaming/flume.py
- python/pyspark/streaming/kafka.py 3 additions, 1 deletionpython/pyspark/streaming/kafka.py
- python/pyspark/streaming/kinesis.py 3 additions, 1 deletionpython/pyspark/streaming/kinesis.py
Please register or sign in to comment