1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| hadoop@localhost:~/hbase-0.94.1$ ./bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.94.1, r1365210, Tue Jul 24 18:40:10 UTC 2012
hbase(main):001:0> create 'test','cf'
0 row(s) in 4.4750 seconds
hbase(main):002:0> list 'test'
TABLE
test
1 row(s) in 0.1360 seconds
hbase(main):003:0> put 'test', 'row1', 'cf:a', 'value1'
0 row(s) in 0.3430 seconds
hbase(main):004:0> put 'test', 'row2', 'cf:b', 'value2'
0 row(s) in 0.0720 seconds
hbase(main):015:0> put 'test', 'row3', 'cf:c', 'value3'
0 row(s) in 0.0250 seconds
hbase(main):016:0> scan 'test'
ROW COLUMN+CELL
row1 column=cf:a, timestamp=1348043456231, value=value1
row2 column=cf:b, timestamp=1348043476312, value=value2
row3 column=cf:c, timestamp=1348043612383, value=value3
row(s) in 0.1310 seconds
hbase(main):017:0> get 'test', 'row1'
COLUMN CELL
cf:a timestamp=1348043456231, value=value1
1 row(s) in 0.0560 seconds
hbase(main):018:0> disable 'test'
0 row(s) in 2.2520 seconds
hbase(main):019:0> drop 'test'
0 row(s) in 1.6390 seconds
hbase(main):018:0> disable 'test'
0 row(s) in 2.2520 seconds
hbase(main):019:0> drop 'test'
0 row(s) in 1.6390 seconds
hbase(main):020:0> exit
hadoop@localhost:~/hbase-0.94.1$ ./bin/stop-hbase.sh
stopping hbase.................
hadoop@localhost:~/hbase-0.94.1$
|