weixin_43862760
为之岂有难易乎
采纳率0%
2018-11-30 09:42

hive+mongodb报错IllegalAccessError

用hive+mongodb,

  CREATE EXTERNAL TABLE test
      ( 
        id string,
        test string

      )
      STORED BY 'com.mongodb.hadoop.hive.MongoStorageHandler' 
      WITH SERDEPROPERTIES('mongo.columns.mapping'='{"id":"_id","test":"test"}') 
      TBLPROPERTIES('mongo.uri'='mongodb://root:root@127.0.0.1:27017/test.test');

创建成功过后,执行查询会报一下错误,不知道谁能帮忙看看

 Exception in thread "main" java.lang.IllegalAccessError: tried to access field org.apache.hadoop.hive.ql.io.HiveInputFormat.LOG from class com.mongodb.hadoop.hive.input.HiveMongoInputFormat
        at com.mongodb.hadoop.hive.input.HiveMongoInputFormat.getSplits(HiveMongoInputFormat.java:81)
        at com.mongodb.hadoop.hive.input.HiveMongoInputFormat.getSplits(HiveMongoInputFormat.java:44)
        at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextSplits(FetchOperator.java:363)
        at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:295)
        at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:446)
        at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:415)
        at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:140)
        at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1693)
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:233)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:736)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

相关推荐