cannot assign instance of scala.collection.immutable.List$SerializationProxy to field org.apache.spark.sql.execution.aggregate.SortAggregateExec.aggregateExpressions of type scala.collection.Seq in instance of org.apache.spark.sql.execution.aggregate.SortAggregateExec
Exception in thread "main" org.apache.spark.SparkException: Job aborted due to stage failure: Task 8 in stage 4.0 failed 4 times, most recent failure: Lost task 8.3 in stage 4.0 (TID 332, 172.16.43.200, executor 1): java.lang.ClassCastException: cannot assign instance of scala.collection.immutable.List$SerializationProxy to field org.apache.spark.sql.execution.aggregate.SortAggregateExec.aggregateExpressions of type scala.collection.Seq in instance of org.apache.spark.sql.execution.aggregate.SortAggregateExec
當只指定了spark集羣的地址,沒有設定setJars這個參數,那麼就會報以上這種錯誤,解決方法就是設置setjars這個參數,以下:java
System.setProperty("hadoop.home.dir", "E:\\winutils") val conf = new SparkConf().setAppName("DetailRatio") .setMaster("spark://172.xx.xx.xx:7077") // .setMaster("local") .setJars(List("E:\\vense_work\\venseData\\out\\artifacts\\DetailRatio_jar\\venseData.jar")) //.set("spark.submit.deployMode", "client")