zoukankan      html  css  js  c++  java
  • hive的两种使用方式

    hive的两种使用方式

    1,hive shell的方式

    启动命令:

    bin/hive

    2.beeline客户端方式

    首先在一个机器上启动hive thrift服务

    bin/hiveserver2
    

      在其他机器或在该机器节点启动beeline客户端

    方式一:先启动beeline,再连接服务
    bin/beeline 连接服务 beeline>!connect jdbc:hive2://localhost:10000  scan complete in 114ms  Connecting to jdbc:hive2://localhost:10000  Enter username for jdbc:hive2://localhost:10000: admin //此处设置的用户是你启动hadoop的Linux用户  Enter password for jdbc:hive2://localhost:10000:     //没有密码,为空
    方式二:启动beeline的时候直接连接
    bin/beeline -u jdbc:hive2://localhost:10000 -n admin

    解释:localhost是启动hive服务的那台机器的ip,我是直接在同一台机器启动,所以是localhost连接成功以后使用方式和hive shell一样,除了在客户端输出日志外,hive服务端也会输出运行日志

  • 相关阅读:
    div弹出层
    经典SQL语句
    sql连接及操作
    给flash加上连接
    在c#中图片原比例缩放
    悬浮提示筐
    拖动板块
    IFrame自适应高度
    SQL语句中的日期计算
    注意Request.Cookies["UserID"]的用法
  • 原文地址:https://www.cnblogs.com/qinglanmei/p/8994012.html
Copyright © 2011-2022 走看看