首页 > 编程语言 >【Spark】java.lang.NoSuchMethodException: org.apache.hadoop.hive.ql.metadata.Hive.loadPartition

【Spark】java.lang.NoSuchMethodException: org.apache.hadoop.hive.ql.metadata.Hive.loadPartition

时间:2022-11-14 19:12:53浏览次数:42  
标签:lang loadPartition java scala hive sql apache org spark

2/11/14 19:02:23 ERROR [main] SparkUncaughtExceptionHandler: Uncaught exception in thread Thread[main,5,main]
java.lang.NoSuchMethodException: org.apache.hadoop.hive.ql.metadata.Hive.loadPartition(org.apache.hadoop.fs.Path, java.lang.String, java.util.Map, boolean, boolean, boolean, boolean, boolean, boolean)
        at java.lang.Class.getMethod(Class.java:1786)
        at org.apache.spark.sql.hive.client.Shim.findMethod(HiveShim.scala:175)
        at org.apache.spark.sql.hive.client.Shim_v2_1.loadPartitionMethod$lzycompute(HiveShim.scala:1129)
        at org.apache.spark.sql.hive.client.Shim_v2_1.loadPartitionMethod(HiveShim.scala:1128)
        at org.apache.spark.sql.hive.client.Shim_v2_1.loadPartition(HiveShim.scala:1225)
        at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$loadPartition$1.apply$mcV$sp(HiveClientImpl.scala:956)
        at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$loadPartition$1.apply(HiveClientImpl.scala:954)
        at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$loadPartition$1.apply(HiveClientImpl.scala:954)
        at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$withHiveState$1.apply(HiveClientImpl.scala:326)
        at org.apache.spark.sql.hive.client.HiveClientImpl.liftedTree1$1(HiveClientImpl.scala:257)
        at org.apache.spark.sql.hive.client.HiveClientImpl.retryLocked(HiveClientImpl.scala:256)
        at org.apache.spark.sql.hive.client.HiveClientImpl.withHiveState(HiveClientImpl.scala:309)
        at org.apache.spark.sql.hive.client.HiveClientImpl.loadPartition(HiveClientImpl.scala:954)
        at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$loadPartition$1.apply$mcV$sp(HiveExternalCatalog.scala:914)
        at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$loadPartition$1.apply(HiveExternalCatalog.scala:902)
        at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$loadPartition$1.apply(HiveExternalCatalog.scala:902)
        at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:102)
        at org.apache.spark.sql.hive.HiveExternalCatalog.loadPartition(HiveExternalCatalog.scala:902)
        at org.apache.spark.sql.catalyst.catalog.ExternalCatalogWithListener.loadPartition(ExternalCatalogWithListener.scala:185)
        at org.apache.spark.sql.hive.execution.InsertIntoHiveTable.processInsert(InsertIntoHiveTable.scala:318)
        at org.apache.spark.sql.hive.execution.InsertIntoHiveTable.run(InsertIntoHiveTable.scala:100)
        at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult$lzycompute(commands.scala:104)
        at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult(commands.scala:102)
        at org.apache.spark.sql.execution.command.DataWritingCommandExec.executeCollect(commands.scala:115)
        at org.apache.spark.sql.execution.adaptive.QueryStage.executeCollect(QueryStage.scala:243)
        at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:195)
        at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:195)
        at org.apache.spark.sql.Dataset$$anonfun$52.apply(Dataset.scala:3441)
        at org.apache.spark.sql.execution.SQLExecution$$anonfun$withNewExecutionId$1.apply(SQLExecution.scala:92)
        at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:139)
        at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:87)
        at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$withAction(Dataset.scala:3440)
        at org.apache.spark.sql.Dataset.<init>(Dataset.scala:195)
        at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:80)
        at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:652)
        at com.kering.etl.runner.BaozunOdsBatchEtl$.sink(BaozunOdsBatchEtl.scala:62)
        at com.kering.etl.runner.BaozunOdsBatchEtl$.execute(BaozunOdsBatchEtl.scala:134)
        at com.kering.etl.runner.BaozunOdsBatchEtl$.main(BaozunOdsBatchEtl.scala:138)
        at com.kering.etl.runner.BaozunOdsBatchEtl.main(BaozunOdsBatchEtl.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
        at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)
        at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)
        at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)
        at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
        at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:920)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

解决办法:检查插入的字段数据类型和表字段类型是否一致。

 

标签:lang,loadPartition,java,scala,hive,sql,apache,org,spark
From: https://www.cnblogs.com/144823836yj/p/16890072.html

相关文章

  • 5.golang变量的数据类型
    1.基本数据类型数值型 a.整数类型              A.各整数类型分“有符号和无符号,intun......
  • Java:String、StringBuilder、StringJoiner学习笔记
    String创建的俩种方式1.直接赋值Stringstr="HelloWorld!";        当使用直接赋值的方式去创建字符串的时候,虚拟机会去串池里去检查字符串是否存在,如果......
  • IEEE-754浮点数标准与JavaScript中的number
    1、概述如何使用8个字节表示特定的数字(整数或小数),其中要满足精度足够高,和表示的数字尽可能的大。聪明的你肯定想到使用科学计数法来表示,其中64位中,需要包含确定正负的符号......
  • Java学习——11.14
    将近4天没更新啊,为什么呢,主要是面向过程太难太抽象了,不过好在我用四天还是将他理解了。1.封装(关键字:private)保护私有的方法和属性。set直接修改private  ......
  • Java高并发处理优惠券防超卖接口!
    问题抛出在近期的项目里面有一个功能是领取优惠券的功能。问题描述:每一个优惠券一共发行多少张,每个用户可以领取多少张:如:A优惠券一共发行120张,每一个用户可以领取140张,当一......
  • Golang写时复制是否是原子性的?
    建议先阅读下Go汇编语言的入门教程​​​https://go.dev/doc/asm​​先说一下我这边的一个简化场景吧,有一个定时任务定时从数据库获取数据,也就是对应实例代码中的getNewPro......
  • 解决android java.lang.ClassCastException android.app.Application
    定义类DemoApp,结果Activity调用始终报类错郁闷呀!classDemoAppextendsApplication{}  下面的配置注意:   <applicationandroid:icon="@drawable/icon......
  • java 通用 post 请求
    java 实现 Http的 Post 请求 用 Json 为参数调用://_http_url_cdr为//"http://10.10.10.243:15642/call/upload/ctiCdrUpload"//eventJson为//{"callid":"1......
  • Java + POI导出富文本的内容到word文档
    一、需求:当创建使用富文本编辑器,操作完的数据,传输到后台都是带有html标签的。如:<h1>标题头</h1><h2>第二个标题</h2><ahref="www.baidu.com">百度搜索</a>我们想把富文......
  • Java json 字符串转化 JSONObject
    json字符串转化JSONObjectStrings="{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"bizTypeList\":[{\"bizname\":\"测试一\"},{\"bizname\":\"测试二\"},{\&q......