zoukankan      html  css  js  c++  java
  • HBase 建表新增数据记录

    login as: root
    root@192.168.12.23's password: *********
    Last login: Wed Aug 20 00:41:17 2014 from 192.168.12.67
    [root@testHostName1 ~]# create 'testTable','testColumn'
    -bash: create: command not found
    [root@testHostName1 ~]# hbase shell
    HBase Shell; enter 'help<RETURN>' for list of supported commands.
    Type "exit<RETURN>" to leave the HBase Shell
    Version 0.94.7, r1471806, Wed Apr 24 18:44:36 PDT 2013
    
    hbase(main):001:0> create 'testTable','testColumn'
    0 row(s) in 2.1450 seconds
    
    hbase(main):002:0> put 'testTable','row1','testColumn:a','value1'
    0 row(s) in 0.1360 seconds
    
    hbase(main):003:0> put 'testTable','row2','testColumn:b','value2'
    0 row(s) in 0.0270 seconds
    
    hbase(main):004:0> put 'testTable','row3','testColumn:c','value3'
    0 row(s) in 0.0210 seconds
    
    hbase(main):005:0> scan 'testTable'
    ROW                          COLUMN+CELL
     row1                        column=testColumn:a, timestamp=1408526740391, value=value1
     row2                        column=testColumn:b, timestamp=1408526771900, value=value2
     row3                        column=testColumn:c, timestamp=1408526783253, value=value3
    3 row(s) in 0.0870 seconds
    hbase(main):008:0> get 'testTable','row1'
    COLUMN      CELL
    cf:a        timestamp=1288380727188, value=value1
    1 row(s) in 0.0400 seconds

    disable 再 drop 这张表,可以清除你刚刚的操作
    hbase(main):012:0> disable 'testTable'
    0 row(s) in 1.0930 seconds
    hbase(main):013:0> drop 'test'
    0 row(s) in 0.0770 seconds 

    关闭shell
    hbase(main):014:0> exit                   

  • 相关阅读:
    影响指令流水线的因素
    硬布线控制器和微程序控制器 
    总线仲裁
    计算机专业面试
    P、NP、NPC、NPH问题的区别和联系
    多态
    软件生命周期
    你所不知道的js的小知识点(1)
    html span标签 不换行(有时span带中文时候是可以自动换行的)
    form的onsubmit事件--表单提交前的验证最佳实现方式
  • 原文地址:https://www.cnblogs.com/o-andy-o/p/3925164.html
Copyright © 2011-2022 走看看