67,513
社区成员
发帖
与我相关
我的任务
分享
org.apache.spark.rdd.RDD.collect(RDD.scala:904)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:525)
Job aborted due to stage failure: Task 30 in stage 126.0 failed 4 times, most recent failure: Lost task 30.3 in stage 126.0 (TID 6544, rz-data-hdp-dn2882.rz.sankuai.com): java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
/**
* Return an array that contains all of the elements in this RDD.
*/
def collect(): Array[T] = withScope {
val results = sc.runJob(this, (iter: Iterator[T]) => iter.toArray)
Array.concat(results: _*)
}