`
chenchangqun
  • 浏览: 53984 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

hive 安装 bug汇总

阅读更多
一  Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
1  hive配置文件的问题
   初学者只要使用数据库连接的属性就可以啦
<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:mysql://127.0.0.1:3306/metastore_db?createDatabaseIfNotExist=true</value>
  <description>JDBC connect string for a JDBC metastore</description>
</property>

<property>
  <name>javax.jdo.option.ConnectionDriverName</name>
  <value>com.mysql.jdbc.Driver</value>
  <description>Driver class name for a JDBC metastore</description>
</property>

<property>
  <name>javax.jdo.option.ConnectionUserName</name>
  <value>hive</value>
  <description>username to use against metastore database</description>
</property>

<property>
  <name>javax.jdo.option.ConnectionPassword</name>
  <value>a123</value>
  <description>password to use against metastore database</description>
</property>

  参考:http://bo-hai.iteye.com/blog/1880930
2 连接不上数据库
   这里有多种原因,我列举几条
   (1) 连接数据库的username和password不正确。
   (2)usernam的权限不够
   (3)端口号写错数据库名(我写了数据库名)


FAILED: Error in metadata: javax.jdo.JDODataStoreException: Error(s) were found while auto-creating/validating the datastore for classes. The errors are printed in the log, and are attached to this exception.
NestedThrowables:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

解决的方法是到mysql中的hive数据库里执行 alter database hive character set latin1;改变hive元数据库的字符集,问题就可以解决!

参考:http://www.cnblogs.com/Blueren/archive/2011/06/29/Sir_001.html


show tables; 正常
创建表,抛出异常

Cannot create directory /user/hive/warehouse/test. Name node is in safe mode.

google找到

your NN is not coming out of safemode. it should do that automatically after a few seconds. use this command to come out of it manually :
bin/hadoop dfsadmin -safemode leave
then retry with your command.

使用   bin/hadoop dfsadmin -safemode leave  就可以解决
分享到:
评论
1 楼 381573578 2014-05-23  
Ended Job = job_1400812181187_0049 with exception 'java.io.IOException(java.net.ConnectException: Call From hadoop236.tadu.cn/192.168.1.236 to 0.0.0.0:10020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused)'  这种错是什么原因

相关推荐

Global site tag (gtag.js) - Google Analytics