我用的hadoop 是2.6.0 版本 ,hive 是 2.1.1版本
进入;/home/zkpk/apache-hive-2.1.1-bin/
执行hive 后报错:

(1)Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException:

java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

MetaException(message:Version information not found in metastore. )
Caused by: java.lang.RuntimeException: Unable to instantiate

org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

分析:需要在hive中首先启动 metastore:
使用:

apache-hive-2.1.1-bin/bin/hive --service metastore &

(2)然后报错:
message:Version information not found in metastore.

分析 在hive配置中吧schema设置为不验证:

message:Version information not found in metastore. )”
修改conf/hive-site.xml 中的 “hive.metastore.schema.verification” 值为 false 即可解决 “Caused by: MetaException

(message:Version information not found in metastore. )”
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
<description>
Enforce metastore schema version consistency.
True: Verify that version information stored in metastore matches with one from Hive jars. Also disable automatic
schema migration attempt. Users are required to manully migrate schema after Hive upgrade which ensures
proper metastore schema migration. (Default)
False: Warn if the version information stored in metastore doesn't match with one from in Hive jars.
</description>
</property>

3 执行hive.继续报错误:

MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema

-dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database

in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))

分析: 需要 使用 schematool工具初始化hive的 元素:

# 进入指定的目录
cd apache-hive-2.1.1-bin/bin/

# 初始化,如果是mysql则derby可以直接替换成mysql
./schematool -initSchema -dbType mysql

然后执行:[root@master bin]# hive
报错:: Permission denied: user=root, access=EXECUTE, inode="/tmp":zkpk:supergroup:drwx------
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkFsPermission(FSPermissionChecker.java:271)

分析:
我一直用zkpk用户部署hive,看来是权限不对

切换账户:
su zkpk
执行::/home/zkpk/apache-hive-2.1.1-bin/bin/hive 正常启动:

hive> show tables;
OK
Time taken: 1.993 seconds
hive>
搞定;

最新文章

  1. TODO:数据库优化之分页
  2. stm32定时器实现60秒定时秒表
  3. Lex使用指南
  4. InnoDB杂记
  5. flume安装及配置介绍(二)
  6. 共享onload事件
  7. Oracle 11g 下载|Oracle 11g 官网下载|Oracle 11g 官网下载 带登录用户和密码
  8. 看大众点评V9新版如何为O2O止血 带领行业下半场回归理性
  9. 关于ios导航控制器的知识总结
  10. C#中的值类型(value type)与引用类型(reference type)的区别
  11. Codeforces 543C Remembering Strings(DP)
  12. 关于data-xxx属性大小写不敏感,不识别大写的几点总结
  13. GirdView分页
  14. AngularJS 动画总结
  15. 使用fabric解决百度BMR的spark集群各节点的部署问题
  16. I Hate It(线段树点修改区间查询)
  17. iOS 隐藏导航条分割线
  18. 第54节:Java当中的IO流(中)
  19. 表表达式,Substring, CharIndex, 多行数据变同一行的用法
  20. python的几个小程序

热门文章

  1. cmp(x,y)
  2. 洛谷 P4478 [BJWC2018]上学路线
  3. restful_framework之视图组件
  4. python之shutil模块详解
  5. 我用 Python 爬取微信好友,最后发现一个大秘密
  6. 从轻测到上线,WeTest与《一起来捉妖》测试方案大公开
  7. 简单字典实现(KV问题)
  8. Docker创建数据卷容器
  9. CDN的基本原理和基础架构
  10. ubuntu HackRF One相关环境搭建