zoukankan      html  css  js  c++  java
  • Hbase初体验

    搭建local模式搭建,

    官网:http://hbase.apache.org

    API:http://hbase.apache.org/apidocs/index.html

    download:http://www.apache.org/dyn/closer.cgi/hbase/

    启动报错,提示javahome未设置,修改文件:/jason/hbase-0.98.5-hadoop2/bin/hbase-config.sh 

    export JAVA_HOME=/jason/jdk
    export PATH=$JAVA_HOME/bin:$PATH

    如图:

    启动hbase:

     ./start-hbase.sh 

    执行hbase  shell

    ./hbase  shell

    2014-09-04 11:03:34,508 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
    HBase Shell; enter 'help<RETURN>' for list of supported commands.
    Type "exit<RETURN>" to leave the HBase Shell
    Version 0.98.5-hadoop2, rUnknown, Mon Aug  4 23:58:06 PDT 2014
    
    hbase(main):001:0> status
    2014-09-04 11:03:46,570 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
    1 servers, 0 dead, 2.0000 average load
    
    hbase(main):002:0> create 'testtable','colfam1'
    0 row(s) in 0.4120 seconds
    
    => Hbase::Table - testtable
    hbase(main):003:0> list 'testtable'
    TABLE                                                                                                                                                                              
    testtable                                                                                                                                                                          
    1 row(s) in 0.0400 seconds
    
    => ["testtable"]
    hbase(main):004:0> put 'testtable','myrow-1','colfam1','value-1'
    0 row(s) in 0.1550 seconds
    

     

    hbase(main):008:0> scan 'testtable'
    ROW COLUMN+CELL
    myrow-1 column=colfam1:, timestamp=1409809952315, value=value-1
    1 row(s) in 0.0560 seconds

  • 相关阅读:
    9 Fizz Buzz 问题
    2 尾部的零
    1 A+B问题
    递归
    互斥同步
    垃圾收集器与内存分配策略---垃圾收集算法
    10.矩形覆盖
    9.变态跳台阶
    8.跳台阶
    9.path Sum III(路径和 III)
  • 原文地址:https://www.cnblogs.com/bokun-wang/p/3956248.html
Copyright © 2011-2022 走看看