设为首页 收藏本站
查看: 845|回复: 0

[经验分享] Hadoop 2.6.0 HIVE 2.1.1配置

[复制链接]

尚未签到

发表于 2017-12-17 12:15:00 | 显示全部楼层 |阅读模式
  我用的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
  然后执行:[iyunv@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、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-424993-1-1.html 上篇帖子: hadoop 2.7.3 (hadoop2.x)使用ant制作eclipse插件hadoop-eclipse 下篇帖子: hadoop hue切换中文版
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表