spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "holdenk (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-4851) "Uninitialized staticmethod object" error in PySpark
Date Sat, 08 Oct 2016 00:03:20 GMT

     [ https://issues.apache.org/jira/browse/SPARK-4851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

holdenk resolved SPARK-4851.
----------------------------
    Resolution: Fixed

The provided repro now runs (although we need to provide it with the correct number of args).

> "Uninitialized staticmethod object" error in PySpark
> ----------------------------------------------------
>
>                 Key: SPARK-4851
>                 URL: https://issues.apache.org/jira/browse/SPARK-4851
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 1.0.2, 1.2.0, 1.3.0
>            Reporter: Nadav Grossug
>            Priority: Minor
>
> *Reproduction:*
> {code}
> class A:
>     @staticmethod
>     def foo(self, x):
>         return x
> sc.parallelize([1]).map(lambda x: A.foo(x)).count()
> {code}
> This gives
> {code}
> : org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage
2.0 failed 1 times, most recent failure: Lost task 0.0 in stage 2.0 (TID 3, localhost): org.apache.spark.api.python.PythonException:
Traceback (most recent call last):
>   File "/Users/joshrosen/Documents/Spark/python/pyspark/worker.py", line 107, in main
>     process()
>   File "/Users/joshrosen/Documents/Spark/python/pyspark/worker.py", line 98, in process
>     serializer.dump_stream(func(split_index, iterator), outfile)
>   File "/Users/joshrosen/Documents/Spark/python/pyspark/rdd.py", line 2070, in pipeline_func
>     return func(split, prev_func(split, iterator))
>   File "/Users/joshrosen/Documents/Spark/python/pyspark/rdd.py", line 2070, in pipeline_func
>     return func(split, prev_func(split, iterator))
>   File "/Users/joshrosen/Documents/Spark/python/pyspark/rdd.py", line 2070, in pipeline_func
>     return func(split, prev_func(split, iterator))
>   File "/Users/joshrosen/Documents/Spark/python/pyspark/rdd.py", line 247, in func
>     return f(iterator)
>   File "/Users/joshrosen/Documents/Spark/python/pyspark/rdd.py", line 818, in <lambda>
>     return self.mapPartitions(lambda i: [sum(1 for _ in i)]).sum()
>   File "/Users/joshrosen/Documents/Spark/python/pyspark/rdd.py", line 818, in <genexpr>
>     return self.mapPartitions(lambda i: [sum(1 for _ in i)]).sum()
>   File "<stdin>", line 1, in <lambda>
> RuntimeError: uninitialized staticmethod object
> 	at org.apache.spark.api.python.PythonRDD$$anon$1.read(PythonRDD.scala:136)
> 	at org.apache.spark.api.python.PythonRDD$$anon$1.<init>(PythonRDD.scala:173)
> 	at org.apache.spark.api.python.PythonRDD.compute(PythonRDD.scala:95)
> 	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:264)
> 	at org.apache.spark.rdd.RDD.iterator(RDD.scala:231)
> 	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:61)
> 	at org.apache.spark.scheduler.Task.run(Task.scala:56)
> 	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:183)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745){code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message