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

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端口已经被连接

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值