hive 客户端编程 配置hiveserver2

1.eclipse创建项目

2.引入hive jar包

     将hive/lib下的所有jar包引入

3.修改Hive-site.xml配置

     使用OS操作系统的认证方式

[hive-site.xml]
<!-- 调度Yarn的时候是否以Hive用户身份,false已Hive默认用户身份,true以访问用户 -->
<!-- 为true时报错 -->
<property>
    <name>hive.server2.enable.doAs</name>
    <value>false</value>
    <description>
      Setting this property to true will have HiveServer2 execute
      Hive operations as the user making the calls to it.
    </description>
  </property>
  <!-- hive元数据验证 -->
  <property>
    <name>hive.metastore.sasl.enabled</name>
    <value>false</value>
    <description>If true, the metastore Thrift interface will be secured with SASL. Clients must authenticate with Kerberos.</description>
  </property>
  <!-- hive验证方式 -->
  <property>
    <name>hive.server2.authentication</name>
    <value>NONE
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据提供的引用内容,`hive - nofile 1024000`是一个命令,它的作用是将Hive进程能够打开的最大文件数设置为1024000。这个命令可以在Linux系统中使用,通过设置nofile参数来增加Hive进程的最大文件打开数,从而提高系统的并行处理能力。 示例代码如下: ``` hive --hiveconf hive.server2.transport.mode=binary --hiveconf hive.server2.thrift.port=10000 --hiveconf hive.server2.thrift.bind.host=0.0.0.0 --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2.thrift.http.path=cliservice -n hive -p hive --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.authentication=NOSASL --hiveconf hive.server2.enable.doAs=false --hiveconf hive.server2.thrift.http.port=10001 --hiveconf hive.server2

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值