zoukankan      html  css  js  c++  java
  • SQuirrel SQL Client安装及连接hive配置

    SQuirrel SQL Client安装及连接hive配置

    2019年04月14日 11:22:48 wisdom_power 阅读数 158更多

    分类专栏: 大数据相关

    版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。

    本文链接:https://blog.csdn.net/DH2442897094/article/details/89293817

    网上有很多SQuirrel SQL Client安装配置及连接hive配置文档,但大部分文档都没有提到3个比较坑的地方:

    (1)连接前先开启hiveserver2服务;

    (2)hive连接附加jar类不完整导致成功连接后执行sql报错;

    (3)修改hadoop和hive的配置文件;

    1、下载客户端

    SQuirrel SQL Client的官网及下载地址为:http://squirrel-sql.sourceforge.net/

    下载最新版版本,下载后是如下形式的jar包  ssquirrel-sql-3.9.1-standard.jar

    2、安装:

     java -jar  ssquirrel-sql-3.9.1-standard.jar

    3、安装数据库插件,可多选点:

    4、在连接hive直接之前,确保hiveserver2服务已经打开

    开启hiveserver2服务并测试可用:网上大部分安装教程都漏了这一步,坑的很

    5、配置客户端连接hive:

    添加hive连接需要的jar包:

    名字:随便起一个

    地址示例:jdbc:hive2://192.168.47.132:10000

    附加类路径:这个附加类必须要选全,不能加漏了,否则连接hive,执行SQL等会报错。csdn上有完整的jar包。

    类名:org.apache.hive.jdbc.HiveDriver

    6、编辑Hadoop和hive的配置文件:

    
     
    1. 编辑Hadoop的 core-site.xml文件:

    2. 在配置文件末尾加上以下内容

    3.  
    4.   <property>

    5.     <name>hadoop.proxyuser.hadoopuser.hosts</name>

    6.     <value>root</value>

    7.   </property>

    8.   <property>

    9.     <name>hadoop.proxyuser.hadoopuser.groups</name>

    10.     <value>123123</value>

    11.   </property>

    12.  
    13. 其中,hadoopuser为上面提到的运行Hadoop namenode进程的用户名。

    14.  
    15. 编辑Hive的hive-site.xml

    16. 在配置文件末尾加上以下内容

    17.  
    18.   <property>

    19.     <!-- hiveserver2用户名 -->

    20.     <name>beeline.hs2.connection.user</name>

    21.     <value>hive2</value>

    22.   </property>

    23.  
    24.   <property>

    25.     <!-- hiveserver2密码 -->

    26.     <name>beeline.hs2.connection.password</name>

    27.     <value>hive2</value>

    28.   </property>

    29.  
    30.   <property>

    31.      <!-- hiveserver2端口 -->

    32.     <name>beeline.hs2.connection.hosts</name>

    33.     <value>192.168.47.132:10000</value>

    34.   </property>

    7、SQuirrel SQL Client基本操作:

    右键,别名属性,可配置加载方案和保持连接

    会话,会话属性,SQL,字体,可调整字体大小:

    8、乱码问题:

  • 相关阅读:
    【crontab】误删crontab及其恢复
    New Concept English there (7)
    New Concept English there (6)
    New Concept English there (5)
    New Concept English there (4)
    New Concept English there (3)
    New Concept English there (2)Typing speed exercise
    New Concept English there (1)Typing speed exercise
    New Concept English Two 34 game over
    New Concept English Two 33 94
  • 原文地址:https://www.cnblogs.com/grj001/p/12224207.html
Copyright © 2011-2022 走看看