Return-Path: Delivered-To: apmail-lucene-hadoop-commits-archive@locus.apache.org Received: (qmail 70305 invoked from network); 18 Sep 2007 23:32:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2007 23:32:09 -0000 Received: (qmail 83694 invoked by uid 500); 18 Sep 2007 23:32:01 -0000 Delivered-To: apmail-lucene-hadoop-commits-archive@lucene.apache.org Received: (qmail 83662 invoked by uid 500); 18 Sep 2007 23:32:01 -0000 Mailing-List: contact hadoop-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-commits@lucene.apache.org Received: (qmail 83653 invoked by uid 99); 18 Sep 2007 23:32:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 16:32:01 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 23:32:08 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 6BD1159A07 for ; Tue, 18 Sep 2007 23:31:48 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: hadoop-commits@lucene.apache.org Date: Tue, 18 Sep 2007 23:31:48 -0000 Message-ID: <20070918233148.14516.60878@eos.apache.org> Subject: [Lucene-hadoop Wiki] Trivial Update of "Hbase/HbaseShell" by udanax X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lucene-hadoop Wiki" for change notification. The following page has been changed by udanax: http://wiki.apache.org/lucene-hadoop/Hbase/HbaseShell ------------------------------------------------------------------------------ ||hbaseshell.jline.bell.enabled ||<99%>If true, enable audible keyboard bells if an alert is required.|| = Hbase Shell Commands = - '''Note''' that Data should be located by their row, column, and timestamp. + + '''Note''' that attribute values are quoted with either single or double quotes. + - == Hbase Shell Global Commands == + == Hbase Shell Basic Commands == ||'''Command''' ||'''Explanation''' || ||Help ||<99%>'''Help''' command provides information about the use of shell script.[[BR]][[BR]]~-''HELP [function_name];''-~ || ||Show ||<99%>'''Show''' command lists tables.[[BR]][[BR]]~-''SHOW tables;''-~ || @@ -44, +46 @@ ||Clear ||<99%>'''Clear''' the screen.[[BR]][[BR]]~-''CLEAR;''-~ || ||Exit ||<99%>'''Exit''' from the current shell script.[[BR]][[BR]]~-''EXIT;''-~ || + and, Definition commands to define data tables. - == HQL(Hbase Query Language) Commands == - - HQL is an SQL-like query language for Hbase. You can use it to query and modify tables in Hbase. - [[BR]]'''Note''' that attribute values are quoted with either single or double quotes. ||'''Command''' ||'''Explanation''' || - ||Create ||'''Create''' command creates a new table.[[BR]][[BR]]~-''CREATE TABLE table_name ([[BR]]{{{ }}}column_family_spec[[BR]]{{{ }}}[, column_family_spec][[BR]]{{{ }}}...[[BR]])[[BR]][[BR]]''-~'''colum_family_spec:'''~-''[[BR]]column_family_name[[BR]]{{{ }}}[MAX_VERSIONS=n][[BR]]{{{ }}}[MAX_LENGTH=n][[BR]]{{{ }}}[COMPRESSION=NONE|BLOCK|RECORD][[BR]]{{{ }}}[IN_MEMORY][[BR]]{{{ }}}[BLOOMFILTER=NONE|BLOOM|COUNTING|RETOUCHED VECTOR_SIZE=n NUM_HASH=n]''-~ || + ||Create ||<99%>'''Create''' command creates a new table.[[BR]][[BR]]~-''CREATE TABLE table_name ([[BR]]{{{ }}}column_family_spec[[BR]]{{{ }}}[, column_family_spec][[BR]]{{{ }}}...[[BR]])[[BR]][[BR]]''-~'''colum_family_spec:'''~-''[[BR]]column_family_name[[BR]]{{{ }}}[MAX_VERSIONS=n][[BR]]{{{ }}}[MAX_LENGTH=n][[BR]]{{{ }}}[COMPRESSION=NONE|BLOCK|RECORD][[BR]]{{{ }}}[IN_MEMORY][[BR]]{{{ }}}[BLOOMFILTER=NONE|BLOOM|COUNTING|RETOUCHED VECTOR_SIZE=n NUM_HASH=n]''-~ || - ||Alter ||'''Alter''' command changes the structure of the specified table.[[BR]][[BR]]~-''ALTER TABLE table_name[[BR]]{{{ }}}alter_spec [, alter_spec] ...[[BR]][[BR]]''-~'''alter_spec:'''~-''[[BR]]{{{ }}}ADD column_family_spec[[BR]]{{{ }}}| ADD (column_family_spec, ...)[[BR]]{{{ }}}| DROP column_family_name[[BR]]{{{ }}}| CHANGE column_family_name column_family_spec''-~|| + ||Alter ||<99%>'''Alter''' command changes the structure of the specified table.[[BR]][[BR]]~-''ALTER TABLE table_name[[BR]]{{{ }}}alter_spec [, alter_spec] ...[[BR]][[BR]]''-~'''alter_spec:'''~-''[[BR]]{{{ }}}ADD column_family_spec[[BR]]{{{ }}}| ADD (column_family_spec, ...)[[BR]]{{{ }}}| DROP column_family_name[[BR]]{{{ }}}| CHANGE column_family_name column_family_spec''-~|| ||Drop ||'''Drop''' command drops columnfamilies in a table or tables.[[BR]][[BR]]~-''DROP table_name1[, table_name2, ...];''-~ || + + And, Commands to manually manipulate data on more detailed parts. + + ||'''Command''' ||'''Explanation''' || ||Insert ||<99%>'''Insert''' command inserts one row into the table with a value for specified column in the table.[[BR]][[BR]]~-''INSERT INTO table_name (colmn_name, ...)[[BR]]{{{ }}}VALUES ('value', ...)[[BR]]{{{ }}}WHERE row = 'row-key'[[BR]]{{{ }}}[TIMESTAMP 'timestamp'];''-~ || ||Delete ||'''Delete''' command deletes specified rows in table. [[BR]][[BR]]~-''DELETE { column_name, [, column_name] ... | *}[[BR]]{{{ }}}FROM table_name[[BR]]{{{ }}}WHERE row = 'row-key';''-~ || ||Select ||<99%>'''Select''' command retrieves rows from a table.[[BR]][[BR]]~-''SELECT { column_name [, column_name] ... | * }[[BR]]{{{ }}}FROM table_name[[BR]]{{{ }}}[WHERE row = 'row-key' | STARTING FROM 'row-key'][[BR]]{{{ }}}[NUM_VERSIONS = version_count][[BR]]{{{ }}}[TIMESTAMP 'timestamp'][[BR]]{{{ }}}[LIMIT = row_count][[BR]]{{{ }}}[INTO FILE 'file_name'][[BR]][[BR]]''-~'''column_name:'''~-''[[BR]]{{{ }}}column_family_name[[BR]]{{{ }}}| column_family_name:column_label_name''-~ || ---- = Example = - == Example Of HQL Use == + == Example Of basic command Uses == === Create the table in a Hbase === {{{