hive 常用服务

    xiaoxiao2021-03-26  34

    1、metastore

    默认情况下,metastore和Hive服务运行在同一个进程里。使用这个服务,可以让metastore作为一个单独的(远程)进程运行。通过设置METASTORE_PORT环境变量可以指定服务器监听的商品号。

    启动metastore:

    bin/Hive --service metastore

    后台启动:

    bin/hive --service metastore 2>&1 >> /var/log.log &

    后台启动,关闭shell连接依然存在:

    nohup bin/hive --service metastore 2>&1 >> /var/log.log &

    2、Hiveserver

    让Hive以提供Trift服务的服务器形式运行,允许用不同语言编写的客户端进行访问。使用Trift、JDBC和ODBC连接器的客户端需要运行Hive服务器来和Hive进行通信。通过设置HIVE_PORT环境变量来指明服务器所监听的商品号(默认为10000)。

    启动方式, hive –service hiveserver2  & 

    可以自己指定端口 hive --service hiveserver2 -p 50000 &  (&表示后台运行)

    转载请注明原文地址: https://ju.6miu.com/read-659776.html

    最新回复(0)