Ao executar o arquivo retorna o seguinte erro:
lmarceloc@pc:~/spark_streaming$ python3 client_twitter.py
/usr/local/lib/python3.10/dist-packages/pyspark/bin/spark-class: line 71: C:\Program Files\Java\jre1.8.0_291/bin/java: No such file or directory
/usr/local/lib/python3.10/dist-packages/pyspark/bin/spark-class: line 97: CMD: bad array subscript
Traceback (most recent call last):
File "/home/lmarceloc/spark_streaming/client_twitter.py", line 3, in <module>
spark = SparkSession.builder.appName('SparkStreaming').getOrCreate()
File "/usr/local/lib/python3.10/dist-packages/pyspark/sql/session.py", line 477, in getOrCreate
sc = SparkContext.getOrCreate(sparkConf)
File "/usr/local/lib/python3.10/dist-packages/pyspark/context.py", line 512, in getOrCreate
SparkContext(conf=conf or SparkConf())
File "/usr/local/lib/python3.10/dist-packages/pyspark/context.py", line 198, in __init__
SparkContext._ensure_initialized(self, gateway=gateway, conf=conf)
File "/usr/local/lib/python3.10/dist-packages/pyspark/context.py", line 432, in _ensure_initialized
SparkContext._gateway = gateway or launch_gateway(conf)
File "/usr/local/lib/python3.10/dist-packages/pyspark/java_gateway.py", line 106, in launch_gateway
raise RuntimeError("Java gateway process exited before sending its port number")
RuntimeError: Java gateway process exited before sending its port number
E não roda, o listener_twitter.py roda tranquilamente