当前位置首页 > Apache知识

org.apache.hadoop.hdfs.server.namenode.SafeModeException:Cannotc

阅读次数:232 次  来源:admin  发布时间:
FAILED: Error in metadata: MetaException(message:Got exception: org.apache.hadoop.ipc.RemoteException org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /user/hive/warehouse/page_view. Name node is in safe mode.

在安装hive mysql in hadoop 的时候报了错

bin/hadoop dfsadmin -safemode leave

开启调机模式:

cp conf/hive-default.xml.template conf/hive-set.xml

vim conf/hive-set.xml 添加
    <property>
      <name>javax.jdo.option.ConnectionURL</name>
      <value>jdbc:mysql://localhost:3306/hive?characterEncoding=UTF-8</value>
    </property>
    <property>
       <name>javax.jdo.option.ConnectionDriverName</name>
       <value>com.mysql.jdbc.Driver</value>
   </property>
   <property>
       <name>javax.jdo.option.ConnectionUserName</name>
       <value>hive</value>
   </property>
   <property>
       <name>javax.jdo.option.ConnectionPassword</name>
       <value>hive</value>
   </property>
进入mysql 创建帐号:
mysql -uroot -p
grant all privileges on *.* to 'hive'@localhost identified by 'hive';
flush privileges;#刷新权限

et name utf8

create database hive;#创建数据库

cd ${HIVE_HOME}/bin

./hive -hiveconf hive.root.logger=DEBUG,console #开启调机模式

hive> show tables;
hive>create table page_view(viewTime int,userid bigint,page_url string,referrer_url string,ip string comment 'IP_Address of the User')comment 'This is the page view table';
上一篇:phpstudy安装选择,iis+php组合,如何设置伪静态
下一篇:debian下使用MTP(USB)连接手机