我正在使用:hadoop 2.6.0-cdh5.14.2 spark2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101
当我从kafkautils启动directstream时,出现了一个错误:
File "/home/ale/amazon_fuse_ds/bin/hdp_amazon_fuse_aggreagation.py", line 91, in setupContexts
kafka_stream = KafkaUtils.createDirectStream( self.spark_streaming_context, [ self.kafka_topicin ], kafka_configuration )
File "/opt/cloudera/parcels/SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101/lib/spark2/python/lib/pyspark.zip/pyspark/streaming/kafka.py", line 145, in createDirectStream
AttributeError: 'SparkSession' object has no attribute '_jssc'
我看到sparksession有jsc方法,但是jssc。
1条答案
按热度按时间nxowjjhe1#
你经过的物体是
SparkSession
,你为什么要通过StreamingContext
.