[
https://issues.apache.org/jira/browse/HADOOP-1375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
edward yoon updated HADOOP-1375:
--------------------------------
Attachment: hbase_shell_base_v07.patch
* I added column scan
* I changed INSERT syntax
{code}
INSERT table_name
('columnfamily_name1:column_key[,'columnfamily_name2:column_key', ...])
VALUES('entry1'[,'entry2', ...])
WHERE row='row_key';
{code}
Test results.
{code}
HBase > select udanax;
+------+----------------------+----------------------+----------------------+
| No. | Row Key | ColumnFamily:Column | Cell Data |
+------+----------------------+----------------------+----------------------+
| 1 | b | a:b | c |
+------+----------------------+----------------------+----------------------+
| 2 | c | a: | b3 |
+------+----------------------+----------------------+----------------------+
| 3 | c | a:c | ee |
+------+----------------------+----------------------+----------------------+
| 4 | f | a:c | test |
+------+----------------------+----------------------+----------------------+
| 5 | xanadu | a: | v1 |
+------+----------------------+----------------------+----------------------+
| 6 | xanadu | b: | v2 |
+------+----------------------+----------------------+----------------------+
Successfully print out the selected data.(0.12 sec)
HBase > select udanax where column='a:c';
+------+----------------------+----------------------+----------------------+
| No. | Row Key | ColumnFamily:Column | Cell Data |
+------+----------------------+----------------------+----------------------+
| 1 | c | a:c | ee |
+------+----------------------+----------------------+----------------------+
| 2 | f | a:c | test |
+------+----------------------+----------------------+----------------------+
Successfully print out the selected data.(0.05 sec)
HBase > insert udanax ('a','b') values('test1','test2') where row='hadoop';
org.apache.hadoop.hbase.InvalidColumnNameException: a is missing the colon
family/qualifier separator
HBase > insert udanax ('a:','b:insert_test') values('test1','test2') where
row='hadoop';
1 row inserted successfully.(0.02 sec)
HBase > select udanax;
+------+----------------------+----------------------+----------------------+
| No. | Row Key | ColumnFamily:Column | Cell Data |
+------+----------------------+----------------------+----------------------+
| 1 | b | a:b | c |
+------+----------------------+----------------------+----------------------+
| 2 | c | a: | b3 |
+------+----------------------+----------------------+----------------------+
| 3 | c | a:c | ee |
+------+----------------------+----------------------+----------------------+
| 4 | f | a:c | test |
+------+----------------------+----------------------+----------------------+
| 5 | hadoop | a: | test1 |
+------+----------------------+----------------------+----------------------+
| 6 | hadoop | b:insert_test | test2 |
+------+----------------------+----------------------+----------------------+
| 7 | xanadu | a: | v1 |
+------+----------------------+----------------------+----------------------+
| 8 | xanadu | b: | v2 |
+------+----------------------+----------------------+----------------------+
Successfully print out the selected data.(0.06 sec)
{code}
> a simple parser for hbase.
> --------------------------
>
> Key: HADOOP-1375
> URL: https://issues.apache.org/jira/browse/HADOOP-1375
> Project: Hadoop
> Issue Type: Improvement
> Components: contrib/hbase
> Affects Versions: 0.13.0
> Environment: All environments
> Reporter: edward yoon
> Priority: Minor
> Fix For: 0.14.0
>
> Attachments: hadoop1375-v12.patch, hbase_shell_base_v03.patch,
> hbase_shell_base_v04.patch, hbase_shell_base_v05.patch,
> hbase_shell_base_v06.patch, hbase_shell_base_v07.patch, jline-0.9.91.jar
>
>
> http://wiki.apache.org/lucene-hadoop/HbaseShell (work in progress)
> HBase Shell is developed to achieve the following goals.
> * Generic Monitoring Function
> * A Simplified Import/Export/Migrate Functionality Between different data
> sources (Hadoop, HBase)
> * A Simplified processing of a logical data model
> * A Simplified algebraic operations
> (Parallel Numerical Analysis by abstracting/numericalizing points, lines,
> or plane data across multiple maps in HBase.)
> {code}
> [# [EMAIL PROTECTED] ./bin/hadoop jar ./build/hadoop-hbase
> org.apache.hadoop.hbase.shell.HbaseShell
> Hbase > help;
> blah blah...
> Hbase > create webtable
> --> columnfamilies('anchors', 'language') limit=3;
> Hbase > set webtable values('anchors:http://www.udanax.org/','opensource')
> where row="http://www.hadoop.co.kr";
> Hbase > scan webtable where row="http://www.hadoop.co.kr";
> blah blah...
> Hbase > set webtable values('language:kr','euc-kr') where
> row="http://www.hadoop.co.kr";
> Hbase > scan webtable where row="http://www.hadoop.co.kr" and
> column="language:kr";
> blah blah...
> Hbase > scan webtable;
> Hbase > exit
> [# [EMAIL PROTECTED]
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.