/root路径下启动hive问题RuntimeException: java.lang.NumberFormatException : For input string: "1s"

环境:hive0.13.0和Hadoop2.6

具体现象:

[root@master(3.100) ~]# hive

Logging initialized using configuration in file:/work/hadoop/hive/apache-hive-0.13.1-bin/conf/hive-log4j.properties
Exception in thread "main" java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "1s"
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:346)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.NumberFormatException: For input string: "1s"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:492)
        at java.lang.Integer.parseInt(Integer.java:527)
        at org.apache.hadoop.conf.Configuration.getInt(Configuration.java:1214)
        at org.apache.hadoop.hive.conf.HiveConf.getIntVar(HiveConf.java:1211)
        at org.apache.hadoop.hive.conf.HiveConf.getIntVar(HiveConf.java:1220)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:58)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:72)
        at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2453)
        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2465)
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:340)
        ... 8 more
[root@master(3.100) ~]# pwd

/root

其它路径启动正常:

[root@master(3.100) ~]# cd /r/jwb
[root@master(3.100) /r/jwb]# hive
18/05/03 10:11:49,452 WARN conf.HiveConf: DEPRECATED: hive.metastore.ds.retry.* no longer has any effect.  Use hive.hmshandler.retry.* instead
Logging initialized using configuration in file:/work/hadoop/hive/apache-hive-0.13.1-bin/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/work/hadoop/hadoop-2.6.4/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hbase-1.2.4/lib/phoenix-4.8.1-HBase-1.2-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

hive> 


 网上查了说改hive-site.xml,将1s改为1000;我试了,没效,所以报错的1s不是这里直接传过去的字符串。

<property>
  <name>hive.metastore.client.connect.retry.delay</name>
  <value>1s</value>
  <description>Number of seconds for the client to wait between consecutive connection attempts</description>
</property>

我试了下0.14.0的hive版本,没有此问题;

问题归结为,比如你是apache-hadoop-2.5.0可以和apache-hive-0.13.1搭配;

           比如你是apache-hadoop-2.6.0可以和apache-hive-1.0.0  和 apache-hive-1.2.1搭配。

参考:http://www.cnblogs.com/zlslch/p/8228448.html

猜你喜欢

转载自blog.csdn.net/u013303361/article/details/80175949
今日推荐