Я пытаюсь прочитать данные из Kinesis в Pyspark, используя KinesisUtils.createStream
, но проблема в том, что я получаю эту ошибку.
Spark Streaming's Kinesis libraries not found in class path. Try one of the following.
1. Include the Kinesis library and its dependencies with in the
spark-submit command as
$ bin/spark-submit --packages org.apache.spark:spark-streaming-kinesis-asl:2.4.4 ...
2. Download the JAR of the artifact from Maven Central http://search.maven.org/,
Group Id = org.apache.spark, Artifact Id = spark-streaming-kinesis-asl-assembly, Version = 2.4.4.
Then, include the jar in the spark-submit command as
$ bin/spark-submit --jars <spark-streaming-kinesis-asl-assembly.jar> ...
________________________________________________________________________________________________
Traceback (most recent call last):
File "/Users/ahmad.muhammad/Desktop/kinesis-reader.py", line 8, in <module>
kinesisStream = KinesisUtils.createStream(ssc,'Ahmad-Kineses','twitter-stream','https://kinesis.us-east-1.amazonaws.com/','us-east-1',InitialPositionInStream.TRIM_HORIZON,20)
File "/Users/Ahmad.Muhammad/opt/apache-spark/spark-2.4.4-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/streaming/kinesis.py", line 84, in createStream
TypeError: 'JavaPackage' object is not callable