运行Spark 1.3.1以及1.4.1
时出现以下错误java.lang.NoSuchMethodError:parquet.Preconditions.checkState(ZLjava / lang / String;)V at parquet.schema.Types $ PrimitiveBuilder.build(Types.java:314) at parquet.schema.Types $ PrimitiveBuilder.build(Types.java:232) at parquet.schema.Types $ Builder.named(Types.java:210) 在org.apache.spark.sql.parquet.ParquetTypesConverter $$ anonfun $ fromDataType $ 1.apply(ParquetTypes.scala:314) at org.apache.spark.sql.parquet.ParquetTypesConverter $$ anonfun $ fromDataType $ 1.apply(ParquetTypes.scala:305) 在scala.Option.map(Option.scala:145) at org.apache.spark.sql.parquet.ParquetTypesConverter $ .fromDataType(ParquetTypes.scala:305) 在org.apache.spark.sql.parquet.ParquetTypesConverter $$ anonfun $ 4.apply(ParquetTypes.scala:395) 在org.apache.spark.sql.parquet.ParquetTypesConverter $$ anonfun $ 4.apply(ParquetTypes.scala:394) 在scala.collection.TraversableLike $$ anonfun $ map $ 1.apply(TraversableLike.scala:244) 在scala.collection.TraversableLike $$ anonfun $ map $ 1.apply(TraversableLike.scala:244) 在scala.collection.immutable.List.foreach(List.scala:318) 在scala.collection.TraversableLike $ class.map(TraversableLike.scala:244) 在scala.collection.AbstractTraversable.map(Traversable.scala:105) at org.apache.spark.sql.parquet.ParquetTypesConverter $ .convertFromAttributes(ParquetTypes.scala:393) at org.apache.spark.sql.parquet.ParquetTypesConverter $ .writeMetaData(ParquetTypes.scala:440) at org.apache.spark.sql.parquet.ParquetRelation2 $ MetadataCache.prepareMetadata(newParquet.scala:260) 在org.apache.spark.sql.parquet.ParquetRelation2 $ MetadataCache $$ anonfun $ 6.apply(newParquet.scala:276) 在org.apache.spark.sql.parquet.ParquetRelation2 $ MetadataCache $$ anonfun $ 6.apply(newParquet.scala:269) 在scala.collection.TraversableLike $$ anonfun $ map $ 1.apply(TraversableLike.scala:244) 在scala.collection.TraversableLike $$ anonfun $ map $ 1.apply(TraversableLike.scala:244) 在scala.collection.immutable.List.foreach(List.scala:318) 在scala.collection.TraversableLike $ class.map(TraversableLike.scala:244) 在scala.collection.AbstractTraversable.map(Traversable.scala:105) 在org.apache.spark.sql.parquet.ParquetRelation2 $ MetadataCache.refresh(newParquet.scala:269) 在org.apache.spark.sql.parquet.ParquetRelation2。(newParquet.scala:391) 在org.apache.spark.sql.parquet.DefaultSource.createRelation(newParquet.scala:98) 在org.apache.spark.sql.parquet.DefaultSource.createRelation(newParquet.scala:128) at org.apache.spark.sql.sources.ResolvedDataSource $ .apply(ddl.scala:240) 在org.apache.spark.sql.hive.execution.CreateMetastoreDataSourceAsSelect.run(commands.scala:218) 在org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult $ lzycompute(commands.scala:54) 在org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult(commands.scala:54) 在org.apache.spark.sql.execution.ExecutedCommand.execute(commands.scala:64) at org.apache.spark.sql.SQLContext $ QueryExecution.toRdd $ lzycompute(SQLContext.scala:1099) at org.apache.spark.sql.SQLContext $ QueryExecution.toRdd(SQLContext.scala:1099) 在org.apache.spark.sql.DataFrame.saveAsTable(DataFrame.scala:1121) 在org.apache.spark.sql.DataFrame.saveAsTable(DataFrame.scala:1071) 在org.apache.spark.sql.DataFrame.saveAsTable(DataFrame.scala:1037) 在org.apache.spark.sql.DataFrame.saveAsTable(DataFrame.scala:1015) 在com.xurmo.ai.spark.SparkClient.dataFrameToHiveTable(SparkClient.java:128) 在com.xurmo.ai.xflow.operation.sink.DataFrameToPlatformSink.push(DataFrameToPlatformSink.java:79) 在com.xurmo.ai.xflow.operation.sink.ASink.operate(ASink.java:24) 在com.xurmo.ai.xflow.operation.AOperation.process(AOperation.java:121) 在com.xurmo.ai.xflow.flow.executor.ExecutableOp.call(ExecutableOp.java:26) 在com.xurmo.ai.xflow.flow.executor.ExecutableOp.call(ExecutableOp.java:15) at java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:603) 在java.lang.Thread.run(Thread.java:722)
从日志中可以看出,类加载器正在加载此类的其他版本。 有人可以告诉我这个类有哪些其他jar包吗?
答案 0 :(得分:1)
我有同样的问题。 lib目录中有两个包含Precondition Class
的jar文件1.parquet-hadoop-bundle-1.6.0rc3.jar
2.parequet-hadooop-bundle-***.jar (which does not contain checkState method)
我只将其删除
parequet-hadooop-bundle-***.jar
来自lib目录的文件,现在它正在为我工作。