虚拟机环境:
32bitUbuntu14.
hadoop2.6
jdk1.8
hive2.3.4
没有安装MySQL使用内置的derby数据库,也就没有配置hive-site.xml文件。
hive可以正常启动,进入shell界面,show tables;问题来了
1.Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
->首先进入hive/bin目录下,执行命令 ./hive --service metastore &
命令行停不下来了
->进入所安装的Hive的conf目录,找到hive-site.xml,(若没修改,则是hive-default.xml.template)。
<property>
<name>hive.metastore.schema.verification</name>
<value>true</value>
把true改为false问题也没有解决
->尝试了一下在bin目录下schematool -dbType derby -initSchema
报错metastore_db cannot be created
给文件增加权限 sudo chmod -R 777 /usr/local/hive
->重试报错Error: FUNCTION 'NUCLEUS_ASCII' already exists.
按照网上教程
进入HIVE_HOME/scripts/metastore/upgrade/derby
注释掉前两句,还会报别的错误,其实bin目录下已存在metastore_db的文件夹,删除后初始化成功
show tables;可以正常运行。