zoukankan      html  css  js  c++  java
  • org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /user/hive/warehouse/page_view. Name node is in safe mode

    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;#刷新权限
    set 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';
  • 相关阅读:
    Java反射理解
    Object的wait和Thread的sleep
    Android媒体解码MediaCodec,MediaExtractor
    图片加载AsyncTask并发问题
    LruCache缓存机制
    Android高效加载大图
    Android Studio编写运行测试纯java代码可带main()函数
    APP支付宝登录第三方授权如何签约入口在哪里
    Xcode使用HTTP配置
    OC编码问题输出中文
  • 原文地址:https://www.cnblogs.com/jackluo/p/3528382.html
Copyright © 2011-2022 走看看