Return-Path: Delivered-To: apmail-lucene-hadoop-commits-archive@locus.apache.org Received: (qmail 34080 invoked from network); 13 Jan 2008 08:08:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jan 2008 08:08:12 -0000 Received: (qmail 78069 invoked by uid 500); 13 Jan 2008 08:08:01 -0000 Delivered-To: apmail-lucene-hadoop-commits-archive@lucene.apache.org Received: (qmail 78038 invoked by uid 500); 13 Jan 2008 08:08: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 78029 invoked by uid 99); 13 Jan 2008 08:08:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Jan 2008 00:08:01 -0800 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; Sun, 13 Jan 2008 08:07:56 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id CEC76D2D5 for ; Sun, 13 Jan 2008 08:07: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: Sun, 13 Jan 2008 08:07:48 -0000 Message-ID: <20080113080748.17664.83891@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 The comment on the change is: COUNT() added. ------------------------------------------------------------------------------ ||'''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] ... | COLUMNFAMILIES(column_family[, column_family] ... | *} [[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' [UNTIL 'stop-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''-~ || + ||Select ||<99%>'''Select''' command retrieves rows from a table.[[BR]]Several aggregate operators: COUNT()[[BR]][[BR]]~-''SELECT { column_name [, column_name] ... | expr[alias] | * }[[BR]]{{{ }}}FROM table_name[[BR]]{{{ }}}[WHERE row = 'row-key' | STARTING FROM 'row-key' [UNTIL 'stop-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''-~ || = Examples = == Example Of Basic Query Command Uses == @@ -103, +103 @@ SELECT Select values from tables Syntax: - SELECT { column_name, [, column_name] ... | *} FROM table_name + SELECT { column_name, [, column_name] ... | expr[alias] | *} FROM table_name [WHERE row='row_key' | STARTING FROM 'row-key' [UNTIL 'stop-key']] [NUM_VERSIONS = version_count] [TIMESTAMP 'timestamp'] @@ -121, +121 @@ {{{ hql > SELECT studioName: FROM movieLog_table WHERE row = 'Star Wars'; - +---------------------------------------------+ + +----------------------------+ - | title studioName | + | title studioName | - | =========================================== | + | ========================== | - | Star Wars Fox Entertainment Group, Inc. | + | Star Wars Fox | - +---------------------------------------------+ + +----------------------------+ Successfully print out the selected data.(0.05 sec) - hql > SELECT 'studioName:YoungGu Art, Corp.' FROM movieLog_table WHERE row = 'D-War'; + hql > SELECT count(studioName:Fox) FROM movieLog_table; }}} === Insert data into a table ===