Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ex2 reduceByKey()算子运行报错 #41

Open
VisionofPolaris opened this issue Oct 19, 2022 · 0 comments
Open

ex2 reduceByKey()算子运行报错 #41

VisionofPolaris opened this issue Oct 19, 2022 · 0 comments

Comments

@VisionofPolaris
Copy link

按ex1的实验手册安装了3.3.0版本的spark和3.6.8版本的python,运行试验2的时候出现问题,reduceByKey()算子运行报错,部分错误信息:

22/10/18 15:11:56 ERROR executor.Executor: Exception in task 0.0 in stage 1.0 (TID 2)
org.apache.spark.api.python.PythonException: Traceback (most recent call last):
  File "/usr/local/spark/python/lib/pyspark.zip/pyspark/worker.py", line 668, in main
    func, profiler, deserializer, serializer = read_command(pickleSer, infile)
  File "/usr/local/spark/python/lib/pyspark.zip/pyspark/worker.py", line 85, in read_command
    command = serializer._read_with_length(file)
  File "/usr/local/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 173, in _read_with_length
    return self.loads(obj)
  File "/usr/local/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 452, in loads
    return pickle.loads(obj, encoding=encoding)
  File "/usr/local/spark/python/lib/pyspark.zip/pyspark/cloudpickle/cloudpickle.py", line 590, in _create_parametrized_type_hint
    return origin[args]
  File "/usr/lib64/python3.6/typing.py", line 682, in inner
    return func(*args, **kwds)
  File "/usr/lib64/python3.6/typing.py", line 1131, in __getitem__
    _check_generic(self, params)
  File "/usr/local/lib/python3.6/site-packages/typing_extensions.py", line 113, in _check_generic
    raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for {cls};"
TypeError: Too many parameters for typing.Iterable; actual 2, expected 1

最终改用3.7.2版本的python解决了该问题。

@VisionofPolaris VisionofPolaris changed the title 试验2 reduceByKey()算子运行报错 Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant