ThriftServer:类似hiveserver2

  • 本质:Spark中的一个特殊的程序,利用程序的资源运行所有SQL,该程序除非手动关闭,否则一直运行

1、在hive 下修改hive-site.xml

<property>
                <name>hive.metastore.schema.verification</name>
                <value>false</value>
        </property>

2、将hive-site.xml 复制到 spark的conf 下

cp /opt/installs/hive/conf/hive-site.xml /opt/installs/spark/conf

3、接着分发一下:

xsync.sh /opt/installs/spark/conf/hive-site.xml

4、重启thrift服务:

/opt/installs/spark/sbin/start-thriftserver.sh --hiveconf hive.server2.thrift.port=10000  --hiveconf hive.server2.thrift.bind.host=bigdata01 --master yarn --conf spark.sql.shuffle.partitions=2

若hiveServer2 启动过,那么改成10001 是因为 hiveserver2占用了10000

启动服务,该服务不会停止,一直在后台启动,假如启动不了,记得查看日志。

停止服务:
/opt/installs/spark/sbin/stop-thriftserver.sh 

使用datagrip 重新连接一下,记得刷新一下连接。

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐