scala - cannot assign instance of java.lang.invoke.SerializedLambda -
i have tried 2 ways make jar file. first way make jar idea throws exception
"java.lang.noclassdeffounderror: not initialize class org.elasticsearch.common.network.networkservice"
so tried second way mvn-shade-plugin
, throws exception
"java.lang.classcastexception: cannot assign instance of java.lang.invoke.serializedlambda field org.apache.spark.api.java.javapairrdd$$anonfun$toscalafunction$1.fun$1 of type org.apache.spark.api.java.function.function in instance of org.apache.spark.api.java.javapairrdd$$anonfun$toscalafunction$1".
i have check spark cluster use same java version 1.8.0_144 idea , use setjars,but throws exception.anyone can me suggestion?
sparksession.builder() // .config(new sparkconf().setjars(list[string]("target\\spark-searcher-1.0-snapshot.jar"))) .config(new sparkconf().setjars(list[string]("out\\artifacts\\spark_searcher_jar\\spark-searcher.jar"))) .appname(appname) .master(master) .config("spark.cores.max",cores) .config("spark.executor.memory",memory) .config("spark.debug.maxtostringfields",1000) .getorcreate()
Comments
Post a Comment