上海古都建筑设计集团,上海办公室装修设计公司,上海装修公司高质量的内容分享社区,上海装修公司我们不是内容生产者,我们只是上海办公室装修设计公司内容的搬运工平台

解决一些hive中的一些错误和解决方式

guduadmin11天前

报错【Hive启动】_Exception in thread “main“ java.lang.NoSuchMethodError: 

1. 触发报错

    1.  hive 启动 

    2. 初始化元数据库(derby)   bin/schematool -dbType derby -initSchema

2. 报错信息

    Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V

3. 解决

  hadoop和hive的两个guava.jar版本不一致

  两个位置分别位于下面两个目录:

  - /usr/local/hive/lib/

  - /usr/local/hadoop/share/hadoop/common/lib/

4. 报错原因

  删除低版本的那个,将高版本的复制到低版本目录下

java.io.IOException: org.apache.hadoop.yarn.exceptions.YarnException: Failed to submit application_1533616024453_0004 to YARN : Application application_1533616024453_0004 submitted by user hyxy to unknown queue: defualt

在Hive中创建一个表然后想向表中插入数据,每次插入数据都会出现如下异常;

java.io.IOException: org.apache.hadoop.yarn.exceptions.YarnException: Failed to submit application_1533616024453_0004 to YARN : Application application_1533616024453_0004 submitted by user hyxy to unknown queue: defualt

    at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:306)

    at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:240)

    at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)

    at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)

    at java.security.AccessController.doPrivileged(Native Method)

    at javax.security.auth.Subject.doAs(Subject.java:422)

    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698)

    at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)

    at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:575)

    at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:570)

    at java.security.AccessController.doPrivileged(Native Method)

    at javax.security.auth.Subject.doAs(Subject.java:422)

    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698)

    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:570)

    at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:561)

    at org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(ExecDriver.java:431)

    at org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(MapRedTask.java:137)

    at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:160)

    at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:88)

    at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1653)

    at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1412)

    at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1195)

    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)

    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1049)

    at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:213)

    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)

    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)

    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.hadoop.util.RunJar.run(RunJar.java:221)

    at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

Caused by: org.apache.hadoop.yarn.exceptions.YarnException: Failed to submit application_1533616024453_0004 to YARN : Application application_1533616024453_0004 submitted by user hyxy to unknown queue: defualt

    at org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.submitApplication(YarnClientImpl.java:270)

    at org.apache.hadoop.mapred.ResourceMgrDelegate.submitApplication(ResourceMgrDelegate.java:290)

    at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:290)

    ... 35 more

Job Submission failed with exception 'java.io.IOException(org.apache.hadoop.yarn.exceptions.YarnException: Failed to submit application_1533616024453_0004 to YARN : Application application_1533616024453_0004 submitted by user hyxy to unknown queue: defualt)'

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

 报错的原因是找不到队列user hyxy to unknown queue: defualt,因为之前在yarn中设置了队列,而hive语句最终走的底层是MapReduce,所以任然需要资源调度,我们设置一个队列就好了:

hive> set mapreduce.job.queuename=max;

设置上此操作后就能正常插入数据了

Error: Could not open client transport with JDBC Uri: jdbc:hive2://node1:10000: 

Failed to open new session: java.lang.RuntimeException:

在使用beeline上使用!connect jdbc://hive2://node1:10000出现报错 

修改hadoop中core-site.xml

先关闭hadoop集群再修改:

#core-site.xml的配置
	
     		hadoop.proxyuser.root.hosts
     		*
	
	
     		hadoop.proxyuser.root.groups
     		*
	

root为当前我操作hive的用户名,如果操作的用户名不是root需要修改用户名。

由于我之前没有修改用户名导致出现现在的错误,改成我操作的用户root就成功了

配置文件功能是使当前用户可以操作任何主机和用户组

网友评论

搜索
最新文章
热门文章
热门标签