Hive入门学习之三:Hive客户端的连接

来源:互联网 发布:腾讯云mysql 快吗 编辑:程序博客网 时间:2024/06/06 08:35
Hive入门学习之二:Hive 的部署中讲述了如何搭建一个Hive的环境,本文主要讲解基于metastore启动多个client的方法
  1. 要求说明
    centos01中已经配置好了hive环境,需要在该机器上启动metastore服务,接下来需要在centos02,centos03中启动客户端
  2. 具体步骤
  3. 拷贝centos01的hive环境到centos02,centos03
    scp -r apache-hive-1.2.1-bin root@centos03:/opt/cloud/
    scp -r apache-hive-1.2.1-bin root@centos03:/opt/cloud/
  4. 修改centos02,centos03的hive-size.xml文件如下
    <property>
     <name>hive.metastore.uris</name>
      <value>thrift://centos01:9083</value>
    <description>Thrift uri for the remote metastore. Used by metastore client to connect to remote metastore.</description>
    </property>
  5. 在centos01上后台运行metastore服务
    nohup bin/hive --service metastore > metastore.log 2>&1 &
  6. 在centos02,centos03上运行hive服务

  7. 在centos01上发现9083端口已经被连接

0 0
原创粉丝点击