2
votes

I'm trying to use the spark riak connector and get an exception when doing a very simple query.

running latest Riak TS 1.4, Spark 1.6.2, Hadoop 2.6, Scala 0.10 (through Google cloud dataproc), spark-riak-collector com.basho.riak:spark-riak-connector_2.10:1.6.0

>>> import pyspark_riak
>>> pyspark_riak.riak_context(sc)
>>> sc.riakBucket("my_bucket", "default").queryBucketKeys("57b6d7585a5d04000100002c").collect()

16/11/26 07:51:23 WARN org.apache.spark.util.ClosureCleaner: Expected a closure; got com.basho.riak.spark.util.python.BatchPickler
16/11/26 07:51:24 WARN org.apache.spark.scheduler.TaskSetManager: Lost task 0.0 in stage 0.0 (TID 0, cluster-1-w-2.c.research-150008.internal): net.razorvine.pickle.PickleException: couldn't introspect javabean: java.lang.IllegalArgumentException: wrong number of arguments
    at net.razorvine.pickle.Pickler.put_javabean(Pickler.java:705)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:323)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at net.razorvine.pickle.Pickler.put_arrayOfObjects(Pickler.java:499)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:205)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at com.basho.riak.spark.util.python.TuplePickler$.pickle(PicklingUtils.scala:120)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:248)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at net.razorvine.pickle.Pickler.put_arrayOfObjects(Pickler.java:493)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:205)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at net.razorvine.pickle.Pickler.dump(Pickler.java:107)
    at net.razorvine.pickle.Pickler.dumps(Pickler.java:92)
    at com.basho.riak.spark.util.python.BatchPickler$$anonfun$apply$1.apply(PicklingUtils.scala:107)
    at com.basho.riak.spark.util.python.BatchPickler$$anonfun$apply$1.apply(PicklingUtils.scala:107)
    at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
    at scala.collection.Iterator$class.foreach(Iterator.scala:727)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
    at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
    at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:103)
    at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:47)
    at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273)
    at scala.collection.AbstractIterator.to(Iterator.scala:1157)
    at scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:265)
    at scala.collection.AbstractIterator.toBuffer(Iterator.scala:1157)
    at scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:252)
    at scala.collection.AbstractIterator.toArray(Iterator.scala:1157)
    at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:927)
    at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:927)
    at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
    at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
    at org.apache.spark.scheduler.Task.run(Task.scala:89)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:227)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

16/11/26 07:51:26 ERROR org.apache.spark.scheduler.TaskSetManager: Task 0 in stage 0.0 failed 4 times; aborting job
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/spark/python/pyspark/rdd.py", line 771, in collect
    port = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/usr/lib/spark/python/lib/py4j-0.9-src.zip/py4j/java_gateway.py", line 813, in __call__
File "/usr/lib/spark/python/pyspark/sql/utils.py", line 45, in deco
    return f(*a, **kw)
File "/usr/lib/spark/python/lib/py4j-0.9-src.zip/py4j/protocol.py", line 308, in get_return_value
py4j.protocol.Py4JJavaError: An error occurred while calling z:org.apache.spark.api.python.PythonRDD.collectAndServe.
: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 0.0 failed 4 times, most recent failure: Lost task 0.3 in stage 0.0 (TID 3, cluster-1-w-3.c.research-150008.internal): net.razorvine.pickle.PickleException: couldn't introspect javabean: java.lang.IllegalArgumentException: wrong number of arguments
    at net.razorvine.pickle.Pickler.put_javabean(Pickler.java:705)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:323)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at net.razorvine.pickle.Pickler.put_arrayOfObjects(Pickler.java:499)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:205)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at com.basho.riak.spark.util.python.TuplePickler$.pickle(PicklingUtils.scala:120)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:248)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at net.razorvine.pickle.Pickler.put_arrayOfObjects(Pickler.java:493)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:205)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at net.razorvine.pickle.Pickler.dump(Pickler.java:107)
    at net.razorvine.pickle.Pickler.dumps(Pickler.java:92)
    at com.basho.riak.spark.util.python.BatchPickler$$anonfun$apply$1.apply(PicklingUtils.scala:107)
    at com.basho.riak.spark.util.python.BatchPickler$$anonfun$apply$1.apply(PicklingUtils.scala:107)
    at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
    at scala.collection.Iterator$class.foreach(Iterator.scala:727)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
    at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
    at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:103)
    at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:47)
    at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273)
    at scala.collection.AbstractIterator.to(Iterator.scala:1157)
    at scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:265)
    at scala.collection.AbstractIterator.toBuffer(Iterator.scala:1157)
    at scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:252)
    at scala.collection.AbstractIterator.toArray(Iterator.scala:1157)
    at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:927)
    at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:927)
    at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
    at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
    at org.apache.spark.scheduler.Task.run(Task.scala:89)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:227)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Driver stacktrace:
    at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$failJobAndIndependentStages(DAGScheduler.scala:1431)
    at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1419)
    at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1418)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
    at org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:1418)
    at org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:799)
    at org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:799)
    at scala.Option.foreach(Option.scala:236)
    at org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:799)
    at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:1640)
    at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1599)
    at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1588)
    at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:48)
    at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:620)
    at org.apache.spark.SparkContext.runJob(SparkContext.scala:1832)
    at org.apache.spark.SparkContext.runJob(SparkContext.scala:1845)
    at org.apache.spark.SparkContext.runJob(SparkContext.scala:1858)
    at org.apache.spark.SparkContext.runJob(SparkContext.scala:1929)
    at org.apache.spark.rdd.RDD$$anonfun$collect$1.apply(RDD.scala:927)
    at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)
    at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:111)
    at org.apache.spark.rdd.RDD.withScope(RDD.scala:316)
    at org.apache.spark.rdd.RDD.collect(RDD.scala:926)
    at org.apache.spark.api.python.PythonRDD$.collectAndServe(PythonRDD.scala:405)
    at org.apache.spark.api.python.PythonRDD.collectAndServe(PythonRDD.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:231)
    at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:381)
    at py4j.Gateway.invoke(Gateway.java:259)
    at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133)
    at py4j.commands.CallCommand.execute(CallCommand.java:79)
    at py4j.GatewayConnection.run(GatewayConnection.java:209)
    at java.lang.Thread.run(Thread.java:745)
Caused by: net.razorvine.pickle.PickleException: couldn't introspect javabean: java.lang.IllegalArgumentException: wrong number of arguments
    at net.razorvine.pickle.Pickler.put_javabean(Pickler.java:705)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:323)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at net.razorvine.pickle.Pickler.put_arrayOfObjects(Pickler.java:499)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:205)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at com.basho.riak.spark.util.python.TuplePickler$.pickle(PicklingUtils.scala:120)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:248)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at net.razorvine.pickle.Pickler.put_arrayOfObjects(Pickler.java:493)
    at net.razorvine.pickle.Pickler.dispatch(Pickler.java:205)
    at net.razorvine.pickle.Pickler.save(Pickler.java:137)
    at net.razorvine.pickle.Pickler.dump(Pickler.java:107)
    at net.razorvine.pickle.Pickler.dumps(Pickler.java:92)
    at com.basho.riak.spark.util.python.BatchPickler$$anonfun$apply$1.apply(PicklingUtils.scala:107)
    at com.basho.riak.spark.util.python.BatchPickler$$anonfun$apply$1.apply(PicklingUtils.scala:107)
    at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
    at scala.collection.Iterator$class.foreach(Iterator.scala:727)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
    at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
    at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:103)
    at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:47)
    at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273)
    at scala.collection.AbstractIterator.to(Iterator.scala:1157)
    at scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:265)
    at scala.collection.AbstractIterator.toBuffer(Iterator.scala:1157)
    at scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:252)
    at scala.collection.AbstractIterator.toArray(Iterator.scala:1157)
    at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:927)
    at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:927)
    at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
    at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
    at org.apache.spark.scheduler.Task.run(Task.scala:89)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:227)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    ... 1 more
1

1 Answers