snappydata icon indicating copy to clipboard operation
snappydata copied to clipboard

java.lang.ClassFormatError: org/apache/spark/sql/catalyst/expressions/GeneratedClass$GeneratedIterator

Open subhendusa opened this issue 6 years ago • 10 comments

Using SnappyData 1.0.1 community release. Getting below error during execution:-

2018-05-15 04:08:12,936 ERROR | Executor task launch worker for task 1913 | org.apache.spark.executor.Executor | Exception in task 1.0 in stage 239.0 (TID 1913) java.lang.ClassFormatError: org/apache/spark/sql/catalyst/expressions/GeneratedClass$GeneratedIterator at org.apache.spark.sql.catalyst.expressions.GeneratedClass.generate(Unknown Source) at org.apache.spark.sql.execution.WholeStageCodegenRDD.computeInternal(WholeStageCodegenExec.scala:555) at org.apache.spark.sql.execution.WholeStageCodegenRDD$$anon$1.(WholeStageCodegenExec.scala:504) at org.apache.spark.sql.execution.WholeStageCodegenRDD.compute(WholeStageCodegenExec.scala:503) at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324) at org.apache.spark.rdd.RDD.iterator(RDD.scala:288) at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:41) at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324) at org.apache.spark.rdd.RDD.iterator(RDD.scala:288) at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:103) at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:58) at org.apache.spark.scheduler.Task.run(Task.scala:126)

subhendusa avatar May 16 '18 08:05 subhendusa

What's the jdk version?

sumwale avatar May 16 '18 09:05 sumwale

And also the query that failed.

sumwale avatar May 16 '18 09:05 sumwale

jdk 1.8

subhendusa avatar May 16 '18 09:05 subhendusa

Full version will be helpful (java -version). And also the query/task that failed.

sumwale avatar May 16 '18 09:05 sumwale

jdk-1.8.0_60_x64 The query is too big to put in comment and not allowed to put it as a file.

subhendusa avatar May 16 '18 11:05 subhendusa

== Optimized Logical Plan == Aggregate [RECORD_NO#652, DEL_REC_TRADE_NO#653, TRADE_REF#654, ACCT_ID#655, POSITION_TYPE_CD#656, TRADE_MODEL_CD#657, PROCESS_CD#658, OPERATION_CD#659, VERSION_NUM#660, STATUS#661, ENTRY_TS#662, AMEND_TS#663, TRADE_DT#664, CANCEL_BR_DT#665, FORWARD_CASH_DT#666, SETTLE_DT#667, MATURITY_DT#668, PROCESS_BR_DT#669, INSTR_PROCESS_DT#670, APPROVAL_AVAIL_DT#671, PRI_INSTR_ID#672, PRI_QTY#673, PRI_OPEN_QTY#674, PRI_SETTLE_STATUS#675, ... 142 more fields], [RECORD_NO#652, DEL_REC_TRADE_NO#653, TRADE_REF#654, ACCT_ID#655, POSITION_TYPE_CD#656, TRADE_MODEL_CD#657, PROCESS_CD#658, OPERATION_CD#659, VERSION_NUM#660, STATUS#661, ENTRY_TS#662, AMEND_TS#663, TRADE_DT#664, CANCEL_BR_DT#665, FORWARD_CASH_DT#666, SETTLE_DT#667, MATURITY_DT#668, PROCESS_BR_DT#669, INSTR_PROCESS_DT#670, APPROVAL_AVAIL_DT#671, PRI_INSTR_ID#672, PRI_QTY#673, PRI_OPEN_QTY#674, PRI_SETTLE_STATUS#675, ... 142 more fields] +- Project [RECORD_NO#652, DEL_REC_TRADE_NO#653, TRADE_REF#654, ACCT_ID#655, POSITION_TYPE_CD#656, TRADE_MODEL_CD#657, PROCESS_CD#658, OPERATION_CD#659, VERSION_NUM#660, STATUS#661, ENTRY_TS#662, AMEND_TS#663, TRADE_DT#664, CANCEL_BR_DT#665, FORWARD_CASH_DT#666, SETTLE_DT#667, MATURITY_DT#668, PROCESS_BR_DT#669, INSTR_PROCESS_DT#670, APPROVAL_AVAIL_DT#671, PRI_INSTR_ID#672, PRI_QTY#673, PRI_OPEN_QTY#674, PRI_SETTLE_STATUS#675, ... 142 more fields] +- Join LeftOuter, (trim(acct_id#655) = trim(ams_amr_id#2589)) :- Relation[RECORD_NO#652,DEL_REC_TRADE_NO#653,TRADE_REF#654,ACCT_ID#655,POSITION_TYPE_CD#656,TRADE_MODEL_CD#657,PROCESS_CD#658,OPERATION_CD#659,VERSION_NUM#660,STATUS#661,ENTRY_TS#662,AMEND_TS#663,TRADE_DT#664,CANCEL_BR_DT#665,FORWARD_CASH_DT#666,SETTLE_DT#667,MATURITY_DT#668,PROCESS_BR_DT#669,INSTR_PROCESS_DT#670,APPROVAL_AVAIL_DT#671,PRI_INSTR_ID#672,PRI_QTY#673,PRI_OPEN_QTY#674,PRI_SETTLE_STATUS#675,... 133 more fields] ColumnFormatRelation[APP.TRANSACTIONS] +- Project [acct_no#2601, source_acct_id#2603, acct_id#2605 AS cadm_acct_id#3530, acct_source_system_cd#2607, ams_amr_id#2589, acct_mandate_cd#2609, acct_schema_cd#2611, acct_base_currency_cd#2613, below_the_line_cd#2615] +- InMemoryRelation [acct_no#2601, source_acct_id#2603, acct_id#2605, acct_source_system_cd#2607, ams_amr_id#2589, acct_mandate_cd#2609, acct_schema_cd#2611, acct_base_currency_cd#2613, below_the_line_cd#2615], true, 10000, StorageLevel(disk, memory, deserialized, 1 replicas) +- *CachedPlanHelper +- *SnappyHashAggregate(keys=[ams_amr_id#2589], modes=Final, functions=[first(acct_no#1609, false), first(source_acct_id#1608, false), first(acct_id#1606, false), first(acct_source_system_cd#1607, false), first(acct_mandate_cd#1639, false), first(acct_schema_cd#1644, false), first(acct_base_currency_cd#1620, false), first(below_the_line_cd#1645, false)], output=[acct_no#2601, source_acct_id#2603, acct_id#2605, acct_source_system_cd#2607, ams_amr_id#2589, acct_mandate_cd#2609, acct_schema_cd#2611, acct_base_currency_cd#2613, below_the_line_cd#2615]) +- Exchange hashpartitioning(ams_amr_id#2589, 8) +- *CachedPlanHelper +- *SnappyHashAggregate(keys=[ams_amr_id#2589], modes=Partial, functions=[partial_first(acct_no#1609, false), partial_first(source_acct_id#1608, false), partial_first(acct_id#1606, false), partial_first(acct_source_system_cd#1607, false), partial_first(acct_mandate_cd#1639, false), partial_first(acct_schema_cd#1644, false), partial_first(acct_base_currency_cd#1620, false), partial_first(below_the_line_cd#1645, false)], output=[ams_amr_id#2589, first#2633, valueSet#2634, first#2635, valueSet#2636, first#2637, valueSet#2638, first#2639, valueSet#2640, first#2641, valueSet#2642, first#2643, valueSet#2644, first#2645, valueSet#2646, first#2647, valueSet#2648]) +- *Project [acct_no#1609, source_acct_id#1608, acct_id#1606, acct_source_system_cd#1607, ams_id#1673 AS ams_amr_id#2589, acct_mandate_cd#1639, acct_schema_cd#1644, acct_base_currency_cd#1620, below_the_line_cd#1645] +- *BroadcastHashJoin [trim(ams_id#1673), trim(ams_premise_cd#1672)], [trim(acct_id#655), trim(source_name#801)], Inner, BuildRight :- *Partitioned Scan ColumnFormatRelation[APP.ACCOUNTS] , Requested Columns = [ACCT_ID#1606,ACCT_SOURCE_SYSTEM_CD#1607,SOURCE_ACCT_ID#1608,ACCT_NO#1609,ACCT_BASE_CURRENCY_CD#1620,ACCT_MANDATE_CD#1639,ACCT_SCHEMA_CD#1644,BELOW_THE_LINE_CD#1645,AMS_PREMISE_CD#1672,AMS_ID#1673] partitionColumns = [] numBuckets= 8 numPartitions= 8 +- BroadcastExchange HashedRelationBroadcastMode(List(trim(input[0, string, true]), trim(input[1, string, false]))) +- *CachedPlanHelper +- *Partitioned Scan ColumnFormatRelation[APP.TRANSACTIONS] , Requested Columns = [ACCT_ID#655,SOURCE_NAME#801] partitionColumns = [] numBuckets= 8 numPartitions= 8

subhendusa avatar May 16 '18 16:05 subhendusa

if you aren't necessarily doing a perf benchmark/test, you could try turning off code generation using snappySession.conf.set("spark.sql.codegen.wholeStage", false) or using SQL set spark.sql.codegen.wholeStage=false .... until we resolve this.

jramnara avatar May 16 '18 16:05 jramnara

Yes, tried that option by setting the conf.set("spark.sql.codegen.wholeStage", "false"). That caused another exception, Exception in thread "main" java.lang.ClassCastException: org.apache.spark.sql.execution.exchange.ShuffleExchange cannot be cast to org.apache.spark.sql.execution.CodegenSupport at org.apache.spark.sql.execution.aggregate.SnappyHashAggregateExec.doProduceWithKeys(SnappyHashAggregateExec.scala:534)

subhendusa avatar May 17 '18 08:05 subhendusa

@subhendusa I am Using SnappyData 1.0.1 community release too and get the same issue, did you solve it?

zhouzach avatar Apr 08 '19 02:04 zhouzach

if you aren't necessarily doing a perf benchmark/test, you could try turning off code generation using snappySession.conf.set("spark.sql.codegen.wholeStage", false) or using SQL set spark.sql.codegen.wholeStage=false .... until we resolve this.

@jramnara @subhendusa So, i want to ask whether you resovled the issue or not now. I also met this problem when i used spark sql.

ora-mayadong avatar Apr 18 '19 03:04 ora-mayadong