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                   

  • 相关阅读:
    python 字符串前面加u,r,b的含义
    文本检测: CTPN
    ocr 识别 github 源码
    python 中写hive 脚本
    Win10 环境安装tesseract-ocr 4.00并配置环境变量
    OCR 识别原理
    pandas set_index和reset_index的用法
    整理 pandas 常用函数
    js es6 map 与 原生对象区别
    js 暂时性死区
  • 原文地址:https://www.cnblogs.com/o-andy-o/p/3925164.html
Copyright © 2011-2022 走看看