Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 84253 invoked from network); 30 Aug 2007 17:01:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Aug 2007 17:01:03 -0000 Received: (qmail 67781 invoked by uid 500); 30 Aug 2007 17:00:57 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 67753 invoked by uid 500); 30 Aug 2007 17:00:57 -0000 Mailing-List: contact hadoop-dev-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-dev@lucene.apache.org Received: (qmail 67744 invoked by uid 99); 30 Aug 2007 17:00:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 10:00:57 -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.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 17:01:01 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9B0D9714168 for ; Thu, 30 Aug 2007 10:00:36 -0700 (PDT) Message-ID: <29315378.1188493236629.JavaMail.jira@brutus> Date: Thu, 30 Aug 2007 10:00:36 -0700 (PDT) From: "stack (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Commented: (HADOOP-1720) [HbaseShell] Addition of HQL (Hbase Query Language) support in Hbase Shell In-Reply-To: <26691710.1187248530990.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-1720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523880 ] stack commented on HADOOP-1720: ------------------------------- Here's some comments on the patch lads: This is a large amount of new functionality but it is without unit tests. Regression in something as complicated as a shell is a real danger. Do you have any objection to adding at least a basic test that does a setup of a minihbasecluster adding a table using your create command (with assertion that add was successful, and that all options specified were enabled, perhaps using your describe command), and then disable, enable, input, select, and drop asserting each of the steps has happened as you go? (I can help out if you'd like). The 'fs -ls' issue remains. Do you want to fix that before committing or do you want to make a new issue to fix this? (I tried setting the command back to 'dfs' from 'fs' but it is still broken. Did I commit a broken feature?) The describe command does not list out the properties that are advertised as settable in the create command. Is this intentional? (this is a minor item I'd say) I tried to create a table: {code} HBase > create testing ma_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "testing" at line 1, column 9. HBase > create table testing ma_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "ma_versions" at line 1, column 23. HBase > create table testing max_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "max_versions" at line 1, column 23. HBase > create table testing family max_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "family" at line 1, column 23. HBase > create table testing 'family' max_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "\'family\'" at line 1, column 23. HBase > create table testing 'family:' max_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "\'family:\'" at line 1, column 23. HBase > create table testing family: max_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "family:" at line 1, column 23. HBase > create table 'testing' 'family:' max_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "\'testing\'" at line 1, column 15. HBase > create table "testing" "family:" max_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "\"testing\"" at line 1, column 15. HBase > create table testing family: max_versions=3 compression=none in_memory bloomfilter=none; Syntax error: Type 'help' for usage: Encountered "family:" at line 1, column 23. HBase > create table testing test; Syntax error: Type 'help' for usage: Encountered "test" at line 1, column 23. {code} I'm not sure what I'm doing wrong in the above. It does not look as though I can put quotes around family names. I would think I'd need to if a column qualifier had a space. For example: {code} HBase > select repo:url; Syntax error: Type 'help' for usage: Encountered ";" at line 1, column 17. HBase > select 'repo:url' from hbaserepository; Syntax error: Type 'help' for usage: Encountered "\'repo:url\'" at line 1, column 9. HBase > select "repo:url" from hbaserepository; Syntax error: Type 'help' for usage: Encountered "\"repo:url\"" at line 1, column 9. HBase > select repo:url from hbaserepository; {code} (The last one above worked). Trying to select a column from a specified row, the below happens: {code} HBase > select repo:url from hbaserepository where row=PPFW-00SOmohQD4kQcyk==; Syntax error: Type 'help' for usage: Encountered "PPFW-00SOmohQD4kQcyk" at line 1, column 49. HBase > select repo:url from hbaserepository where row="PPFW-00SOmohQD4kQcyk=="; Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.io.Text.encode(Text.java:375) at org.apache.hadoop.io.Text.set(Text.java:165) at org.apache.hadoop.io.Text.(Text.java:71) at org.apache.hadoop.hbase.shell.SelectCommand.setRowKey(SelectCommand.java:215) at org.apache.hadoop.hbase.shell.generated.Parser.selectCommand(Parser.java:593) at org.apache.hadoop.hbase.shell.generated.Parser.cmdStatement(Parser.java:137) at org.apache.hadoop.hbase.shell.generated.Parser.terminatedCommand(Parser.java:85) at org.apache.hadoop.hbase.Shell.main(Shell.java:60) {code} Digging further, it looks like I need to quote using single-quotes only -- is that right? If so, we should put this fact into the help and perhaps into the shell preamble. Regards the patch, it looks good. I would suggest that error output be put on System.err rather than on System.out (In general you probably want to keep the errors and informational output on one stream and your generated output on the other). You have an assert in DeleteCommand. Why not make this throw an actual exception if passed value is null? > [HbaseShell] Addition of HQL (Hbase Query Language) support in Hbase Shell > -------------------------------------------------------------------------- > > Key: HADOOP-1720 > URL: https://issues.apache.org/jira/browse/HADOOP-1720 > Project: Hadoop > Issue Type: Improvement > Components: contrib/hbase > Affects Versions: 0.15.0 > Environment: all environments > Reporter: Inchul Song > Priority: Minor > Fix For: 0.15.0 > > Attachments: hql_v01.patch, hql_v02.patch, hql_v03.patch, hql_v04.patch, hql_v05.patch, hql_v06.patch, hql_v07.patch, hql_v08.patch, hql_v09.patch > > > We have defined the HQL (Hbase Query Language), which is a "more" SQL-like query language for Hbase, for use in Hbase Shell. HQL is not intended to fully support the SQL syntax and semantics. HQL, instead, is developed to make it easy to manipulate tables in Hbase through the Hbase Shell command line, without using programming APIs. > You can find more information about HQL in http://wiki.apache.org/lucene-hadoop/Hbase/HbaseShell/HQL. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.