本文主要是介绍/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.propertiesException 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: 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
这篇关于/root路径下启动hive问题RuntimeException: java.lang.NumberFormatException : For input string: 1s的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!