zoukankan      html  css  js  c++  java
  • hadoop-0.20.1+120 hive-0.3.99.1+0 试用hwi(hive web interface

    摘自:http://www.chinacloud.cn/show.aspx?id=3274&cid=12

    [日期:2010-07-04] 来源:淘宝数据平台团队  作者: [字体: ]

    hive迟迟不能支持hadoop 0.20的局面解决了,小试一把。

    闲话少说,得益于cloudera团队的努力,hive在昨天9.21号开始能够支持hadoop 0.20.1,下载测试版本软件。

    http://archive.cloudera.com/cdh/testing/

    http://archive.cloudera.com/cdh/testing/hadoop-0.20.1+120.tar.gz

    http://archive.cloudera.com/cdh/testing/hive-0.3.99.1+0.tar.gz

    非常简单的解压,配置conf即可使用,hadoop的配置见前面的文章。

    hive在使用前注意export   HADOOP_HOME=/home/hadoop/hadoop-0.20.1+120,而不是readme里面的export HADOOP,一味跟着readme,将不能体验hive的强大功能,因为hive命令后就没有输出了,呵呵。

    建立几个测试表使用一下。

    bin/hive
    Hive history file=/tmp/hadoop/hive_job_log_hadoop_200909190325_1929716196.txt
    hive> show tables;
    OK
    invites
    pokes
    Time taken: 5.217 seconds
    hive> select a.* from pokes a limit 3;
    OK
    Time taken: 1.489 seconds
    hive> LOAD DATA LOCAL INPATH ‘./examples/files/kv1.txt’ OVERWRITE INTO TABLE pokes;
    Copying data from file:/home/hadoop/hive-0.3.99.1+0/examples/files/kv1.txt
    Loading data to table pokes
    OK
    Time taken: 0.378 seconds
    hive> select a.* from pokes a limit 3;                                             
    OK
    238 val_238 NULL
    86  val_86 NULL
    311 val_311 NULL
    Time taken: 0.078 seconds

    这些基础前面的文章都介绍过,不多费篇幅了,下面重点体验一下hive的

    HiveWebInterface,也就是hwi如何使用,看来web interface是个趋势,

    只要客户端有个浏览器就能方便的操作和管理hive。

    hwi需要apache ant的支持。

    http://labs.xiaonei.com/apache-mirror/ant/binaries/apache-ant-1.7.1-bin.tar.gz

    解压即可。

    export ANT_LIB=/home/hadoop/apache-ant-1.7.1/lib
    bin/hive --service hwi09/09/19 03:32:03 INFO hwi.HWIServer: HWI is starting up09/09/19 03:32:03 INFO mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog09/09/19 03:32:03 INFO mortbay.log: jetty-6.1.1409/09/19 03:32:03 INFO mortbay.log: Extract jar:file:/home/hadoop/hive-0.3.99.1+0/lib/hive_hwi.war!/ to /tmp/Jetty_0_0_0_0_9999_hive_hwi.war__hwi__bw65n0/webapp09/09/19 03:32:03 INFO mortbay.log: Started SocketConnector@0.0.0.0:9999
    

    hwi服务启动成功,看出来是一个war包。

    配置文件在/home/hadoop/hive-0.3.99.1+0/conf/hive-default.xml, 把默认的 HIVE_HOME替换为真实安装的绝对路径,否则在启动hwi服务的时候会报错。若有其他同学发现解决方法,请不吝回帖共享经验。

    <property>

      <name>hive.hwi.war.file</name>

      <value>/home/hadoop/hive-0.3.99.1+0/lib/hive_hwi.war</value>

      <description>This is the WAR file with the jsp content for Hive Web Interface</description>

    </property>

    image

    image

    image

    image

    image

    image

    image

    image

    image

    hwi的使用一下子拉近了普通user和hadoop hive的距离,使用起来很方便,不用不知道用了才知道。

    另:http://www.cnblogs.com/gpcuster/archive/2010/02/25/1673480.html

  • 相关阅读:
    m113
    无题
    m102 SE赛
    m101 真*sb($huge 全场最瞎$)
    m100 的坑
    m99 然而并没有想出来标题!
    m98 lsc rp-- 赛
    csps2019AFO祭
    csps考前的一些总结(然而可能并没有用)
    低错总结
  • 原文地址:https://www.cnblogs.com/xd502djj/p/3545008.html
Copyright © 2011-2022 走看看