美文网首页
Hive搭建之remote分开

Hive搭建之remote分开

作者: 叶落_海布里 | 来源:发表于2017-03-22 17:44 被阅读0次

    Mysql:node1
    MetaStore Server:node3
    Hive:node4

    • 1 在node1上安装mysql

    -yum install mysql-server –y
    

    修改mysql的权限

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123' WITH GRANT OPTION;
    

    删除多余的权限

    delete from user where host != '%';
    

    刷新权限

    flush privileges;
    
    • 2 搭建服务端(node3)

    修改Hive配置文件

    cp hive-default.xml.template hive-site.xml
    
    <property>  
      <name>hive.metastore.warehouse.dir</name>  
      <value>/user/hive/warehouse</value>  
    </property>  
       
    <property>  
      <name>javax.jdo.option.ConnectionURL</name>  
      <value>jdbc:mysql://node1:3306/hive?createDatabaseIfNotExist=true</value>  
    </property>  
       
    <property>  
      <name>javax.jdo.option.ConnectionDriverName</name>  
      <value>com.mysql.jdbc.Driver</value>  
    </property>  
       
    <property>  
      <name>javax.jdo.option.ConnectionUserName</name>  
      <value>root</value>  
    </property>  
       
    <property>  
      <name>javax.jdo.option.ConnectionPassword</name>  
      <value>123</value>  
    </property> 
    
    

    导入mysql的驱动包

    cp /root/mysql-connector-java-5.1.32-bin.jar /home/hive-1.2.1/lib/
    

    启动服务端

    hive --service metastore
    
    • 2.3 搭建客户端(node4)

    修改Hive配置文件

    cp hive-default.xml.template hive-site.xml
    
    <property>  
      <name>hive.metastore.warehouse.dir</name>  
      <value>/user/hive/warehouse</value>  
    </property>  
       
    <property>  
      <name>hive.metastore.local</name>  
      <value>false</value>  
    </property>  
      
    <property>  
      <name>hive.metastore.uris</name>  
      <value>thrift://node3:9083</value>  
    </property>  
    

    修改hadoop的jline版本

    cp /home/hive-1.2.1/lib/jline-2.12.jar /home/hadoop-2.5.1/share/hadoop/yarn/lib/
    

    相关文章

      网友评论

          本文标题:Hive搭建之remote分开

          本文链接:https://www.haomeiwen.com/subject/uemonttx.html