ITPub博客

首页 > 大数据 > Hadoop > HIVE随手记——Hive命令(?$HIVE_HOME/bin/hive)

HIVE随手记——Hive命令(?$HIVE_HOME/bin/hive)

原创 Hadoop 作者:呆呆笨笨的鱼 时间:2015-01-20 15:01:10 0 删除 编辑
HIVE版本:0.14.0

$HIVE_HOME/bin/hive 这个shell 命令是通向包括命令行界面(CLI)等Hive服务的通道。注意,是Hive服务的通道。

用户可以将$HIVE_HOME/bin加入到环境变量 PATH中。

使用 hive --help 命令查询帮助选项(这里列出了相关的语法和参数)

点击(此处)折叠或打开

  1. [zhang@namenode bin]$ pwd
  2. /home/zhang/hive/bin
  3. [zhang@namenode bin]$ hive --help
  4. Usage ./hive --service serviceName
  5. Service List: beeline cli help hiveburninclient hiveserver2 hiveserver hwi jar lineage metastore metatool orcfiledump rcfilecat schemaTool version
  6. Parameters parsed:
  7. --auxpath : Auxillary jars
  8. --config : Hive configuration directory
  9. --service : Starts specific service/component. cli is default
  10. Parameters used:
  11. HADOOP_HOME or HADOOP_PREFIX : Hadoop install directory
  12. HIVE_OPT : Hive options
  13. For help on a particular service:
  14. ./hive --service serviceName --help
  15. Debug help: ./hive --debug --help
如上上面打印结果
Service List 后面列出了一些服务名(servicename),其中包括了,部署hive时候启动hive的服务hiveserver,以及我们常用的命令行界面CLI。


HIVE命令使用:
(1)启动hive thrift 服务
    ./hive --service hiveserver

(2)进入CLI
    ./hive --service cli   (其实,直接用hive,会默认进入cli,作用相同)

点击(此处)折叠或打开

  1. Debug help: ./hive --debug --help
  2. [zhang@namenode bin]$ hive --service cli
  3. 15/01/19 22:38:43 WARN conf.HiveConf: DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
  4. 15/01/19 22:38:43 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist
  5. Logging initialized using configuration in jar:file:/home/zhang/hive/lib/hive-common-0.14.0.jar!/hive-log4j.properties
  6. SLF4J: Class path contains multiple SLF4J bindings.
  7. SLF4J: Found binding in [jar:file:/home/zhang/hadoop-2.5.2/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  8. SLF4J: Found binding in [jar:file:/home/zhang/hive/lib/hive-jdbc-0.14.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  9. SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  10. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
  11. hive>
(3)hwi  HIVE WEB 界面
        是一个可以执行查询语句和其他命令的简单Web界面,这样可以不用登陆到集群中的某台及其上使用CLI来进行查询。
        详细请见: http://blog.itpub.net/28929558/viewspace-1408291/
(4)jar
    hadoop jar 命令的一个扩展,这样可以执行需要的hive环境的应用

(5)metastore
    启动一个扩展的hive元数据服务,可以提供多客户端使用.
(6)rcfilecat 
    一个可以打印出RCFile格式文件内容的工具





来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28929558/viewspace-1408132/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-04-17

  • 博文量
    62
  • 访问量
    939480