码迷,mamicode.com
首页 > 其他好文 > 详细

hive一些问题

时间:2016-04-20 13:49:31      阅读:261      评论:0      收藏:0      [点我收藏+]

标签:hive一些问题

hive普通用户报错:


一、报错

Booting Derby (version The Apache Software Foundation - Apache Derby - 10.10.1.1 - (1458268)) instance a816c00e-0154-2ed3-cbb2-00000e1ebc98 

on database directory /var/lib/hive/metastore/metastore_db in READ ONLY mode with class loader sun.misc.Launcher$AppClassLoader@7cc355be. 

Loaded fromfile:/usr/hdp/2.2.0.0-2041/hive/lib/derby-10.10.1.1.jar.


问题:明显是metastore数据库read only,没有写权限


解决办法:

# cd /var/lib/hive/metastore/

# chmod -R a+w metastore_db/


二、报错如下,但是hive还是进来了

Booting Derby version The Apache Software Foundation - Apache Derby - 10.10.1.1 - (1458268): instance a816c00e-0154-3155-87b8-00000e0b5a08 

on database directory /var/lib/hive/metastore/metastore_db with class loader sun.misc.Launcher$AppClassLoader@7cc355be 

Loaded from file:/usr/hdp/2.2.0.0-2041/hive/lib/derby-10.10.1.1.jar

java.vendor=Oracle Corporation

java.runtime.version=1.8.0_51-b16

user.dir=/var/lib/hive

os.name=Linux

os.arch=amd64

os.version=2.6.32-573.1.1.el6.x86_64

derby.system.home=null

Database Class Loader started - derby.database.classpath=‘‘

hive> 

   > 

还是权限问题:/var/lib/hive# chown -R hive:hive metastore/



三、运行hive命令

Wed Apr 20 02:24:36 UTC 2016 Thread[main,5,main] java.io.FileNotFoundException: derby.log (Permission denied)

。。。。

Wed Apr 20 02:24:36 UTC 2016:

Booting Derby (version The Apache Software Foundation - Apache Derby - 10.10.1.1 - (1458268)) instance a816c00e-0154-317b-c792-00000dd02ab8 

on database directory /var/lib/hive/metastore/metastore_db in READ ONLY mode with class loader sun.misc.Launcher$AppClassLoader@b4c966a. 

Loaded from file:/usr/hdp/2.2.0.0-2041/hive/lib/derby-10.10.1.1.jar.

java.vendor=Oracle Corporation

java.runtime.version=1.8.0_51-b16

user.dir=/var/lib/hive

os.name=Linux

os.arch=amd64

os.version=3.13.0-77-generic

derby.system.home=null

Database Class Loader started - derby.database.classpath=‘‘


查看权限

amos@az-aacdb01:/var/lib/hive/metastore/metastore_db$ ll

total 196

drwxrwxrwx 5 hive hive   4096 Apr 20 10:24 ./

drwxrwxrwt 3 hive hive   4096 Apr 13 10:16 ../

-rwxrwxrwx 1 hive hive      4 Apr 19 11:27 dbex.lck*

-rw-r--r-- 1 hive hive     38 Apr 20 09:57 db.lck

-rw-rw-r-- 1 hive hive 163077 Apr 20 09:56 derby.log

amos没有写权限


root@az-aacdb01:/var/lib/hive# ll

total 172

drwxr-xr-x  3 hive hive   4096 Apr 20 10:30 ./

drwxr-xr-x 46 root root   4096 Apr 16 02:37 ../

-rw-r--r--  1 root root 163077 Apr 20 10:30 derby.log


添加权限

本文出自 “梅花香自苦寒来!” 博客,请务必保留此出处http://daixuan.blog.51cto.com/5426657/1765675

hive一些问题

标签:hive一些问题

原文地址:http://daixuan.blog.51cto.com/5426657/1765675

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!