启动hive错误:Exception in thread "main" java.lang.IllegalArgumentException

启动hive错误:Exception in thread "main" java.lang.IllegalArgumentException

2018-03-20 15:19:07 Gethin_H 阅读数 1357更多

分类专栏: Hive

版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。

本文链接:https://blog.csdn.net/Gethin_H/article/details/79626223

启动hive时报错了

报错信息:

Exception in thread "main" java.lang.IllegalArgumentException:
        java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
        at org.apache.hadoop.fs.Path.initialize(Path.java:205)
        at org.apache.hadoop.fs.Path.<init>(Path.java:171)
        at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:659)
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:582)
        at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:549)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:750)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686)
        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: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
        at java.net.URI.checkPath(URI.java:1823)
        at java.net.URI.<init>(URI.java:745)
        at org.apache.hadoop.fs.Path.initialize(Path.java:202)
        ... 12 more
mkdir /home/hadoop/apps/hive-2.3.2/tmp

编辑hive-site.xml,将system:java.io.tmpdir替换成刚刚创建目路径,我搜了下发现有四个地方需要修改

<property>
    <name>hive.exec.local.scratchdir</name>
    <value>${system:java.io.tmpdir}/${system:user.name}</value>
    <description>Local scratch space for Hive jobs</description>
</property>
<property>
    <name>hive.downloaded.resources.dir</name>
    <value>${system:java.io.tmpdir}/${hive.session.id}_resources</value>
    <description>Temporary local directory for added resources in the remote file system.</description>
</property>
<property>
    <name>hive.querylog.location</name>
    <value>${system:java.io.tmpdir}/${system:user.name}</value>
    <description>Location of Hive run time structured log file</description>
</property>
<property>
    <name>hive.server2.logging.operation.log.location</name>
    <value>${system:java.io.tmpdir}/${system:user.name}/operation_logs</value>
    <description>Top level directory where operation logs are stored if logging functionality is enabled</description>
</property>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

修改后的样子

<property>
    <name>hive.exec.local.scratchdir</name>
    <value>/home/hadoop/apps/hive-2.3.2/tmp/${system:user.name}</value>
    <description>Local scratch space for Hive jobs</description>
</property>
<property>
    <name>hive.downloaded.resources.dir</name>
    <value>/home/hadoop/apps/hive-2.3.2/tmp/${hive.session.id}_resources</value>
    <description>Temporary local directory for added resources in the remote file system.</description>
</property>
<property>
    <name>hive.querylog.location</name>
    <value>/home/hadoop/apps/hive-2.3.2/tmp/${system:user.name}</value>
    <description>Location of Hive run time structured log file</description>
</property>
<property>
    <name>hive.server2.logging.operation.log.location</name>
    <value>/home/hadoop/apps/hive-2.3.2/tmp/${system:user.name}/operation_logs</value>
    <description>Top level directory where operation logs are stored if logging functionality is enabled</description>
</property>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

重新启动就可以了

原文地址:https://www.cnblogs.com/flyshaodq/p/11780229.html

时间: 2024-12-14 05:13:43

启动hive错误:Exception in thread "main" java.lang.IllegalArgumentException的相关文章

Exception in thread &quot;main&quot; java.lang.IllegalArgumentException

1.错误描述 Exception in thread "main" java.lang.IllegalArgumentException: Cannot format given Object as a Date at java.text.DateFormat.format(DateFormat.java:301) at java.text.Format.format(Format.java:157) at com.you.util.DateBefore.getMonthBefore(

【异常】Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: Illegal pattern c

在windows上执行的时候,option(“timestampFormat”, “yyyy/MM/dd HH:mm:ss ZZ”)必须带上,不然报错: Exception in thread "main" java.lang.IllegalArgumentException: Illegal pattern component: XX. 使用比如:val df1 = spark.read.format("json").option("timestampF

Spring Boot 启动报错 Exception in thread &quot;main&quot; java.lang.StringIndexOutOfBoundsException: String index out of range: 37

使用命令 java -jar springBoot.jar  启动项目,结果报错如下: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37 at java.lang.String.substring(String.java:1963) at org.springframework.boot.loader.jar.JarFile.create

Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D

问题原因是Hive里面配置的相对路径没有找到,我们可以直接在文件里面修改为绝对路径. 1.在hive下面窗口temp文件夹 cd /opt/hive mkdir temp cd temp 2.查看temp所在路径 pwd temp 3.进入hive-site.xml里面 vim /opt/hive/conf/hive-site.xml 4.搜索system:java.io.tmpdir字样的东西,修改为绝对路径(/opt/hive/apache-hive-2.3.6-bin/temp)就可以了.

Spring报错:Exception in thread &quot;main&quot; java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)

简单搭建了一个Spring Maven工程就报错: 看到网上说是JDK 7 和 Spring3.x :JDK编译级别设置成1.7,仍然没有得到解决,采用版本为  3.2.0.RELEASE <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId>

Exception in thread &quot;main&quot; java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0

me 的 maven 项目, 右键 update dependencies , 出现 错误 Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.la

MyEclipse8.5集成Tomcat7时的启动错误:Exception in thread “main” java.lang.NoClassDefFoundError org/apache/commons/logging/LogFactory

今天,安装Tomcat7.0.21后,单独用D:\apache-tomcat-7.0.21\bin\startup.bat启动web服务正常.但在MyEclipse8.5中集成配置Tomcat7后,在MyEclipse启动Tomcat服务则出现如下错误提示: Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactoryat org.apache.catalina.star

Java中调用c/c++语言出现Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: Test.testPrint(Ljava/lang/String;)V...错误

错误: Exception in thread "main" java.lang.UnsatisfiedLinkError: Test.testPrint(Ljava/lang/String;)V at Test.testPrint(Native Method) at Test.main(Test.java:8) 解决方法: 昨天一天都在想办法解决这个问题,操作步骤按照教程来的,怎么会出错呢?想了半天,觉得还是dll文件生成的不对.所以,最后决定把codeblocks换成visual

使用sqljdbc连接mssql数据库,maven生成jar运行后报&quot;Exception in thread &quot;main&quot; java.lang.SecurityException&quot;错误

错误信息如下: Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes 网上查到,说是需要重新打一下sqljdbc    http://blog.chinaunix.net/uid-26706281-id-3210704.html 把该博客的内容copy下来: 插件打成的jar包运行出现这个异常,异常处理办法 1.