Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@locus.apache.org Received: (qmail 91494 invoked from network); 24 Apr 2008 23:27:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2008 23:27:39 -0000 Received: (qmail 29243 invoked by uid 500); 24 Apr 2008 23:27:41 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 29227 invoked by uid 500); 24 Apr 2008 23:27:41 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 29214 invoked by uid 99); 24 Apr 2008 23:27:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2008 16:27:41 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2008 23:26:48 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 20F4C234C105 for ; Thu, 24 Apr 2008 16:23:56 -0700 (PDT) Message-ID: <1089903335.1209079436133.JavaMail.jira@brutus> Date: Thu, 24 Apr 2008 16:23:56 -0700 (PDT) From: "Chris K Wensel (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Commented: (HBASE-487) Replace hql w/ a hbase-friendly jirb or jython shell In-Reply-To: <246479956.1204571690457.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/HBASE-487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12592197#action_12592197 ] Chris K Wensel commented on HBASE-487: -------------------------------------- I've added a patch to groovysh to allow for scripts to register new commands. http://jira.codehaus.org/browse/GROOVY-2778 But the argument parser leaves something to be desired, it tokenizes all the values after the command by whitespace and does not honor quotes. for example: cmd "foo bar" would result in arg[0] == '"foo' and arg[1] == 'bar"' Further I do not know if you can access shell variables from the command. Likely so, but isn't straightforward. the argument parser for sure doesn't resolve them. thus escaping shell variables into command arguments might be troublesome. > Replace hql w/ a hbase-friendly jirb or jython shell > ---------------------------------------------------- > > Key: HBASE-487 > URL: https://issues.apache.org/jira/browse/HBASE-487 > Project: Hadoop HBase > Issue Type: Wish > Reporter: stack > Assignee: stack > Priority: Minor > Fix For: 0.2.0 > > Attachments: groovy-2.patch, groovy.patch, jruby.patch > > > The hbase shell is a useful admin and debugging tool but it has a couple of downsides. To extend, a fragile parser definition needs tinkering-with and new java classes must be added. The current test suite for hql is lacking coverage and the current code could do with a rewrite having evolved piecemeal. Another downside is that the presence of an HQL interpreter gives the mis-impression that hbase is like a SQL database. > This 'wish' issue suggests that we jettison HQL and instead offer users a jirb or jython command line. We'd ship with some scripts and jruby/jython classes that we'd source on startup to do things like import base client classes -- so folks wouldn't have to remember all the packages stuff sat in -- and added a pretty-print for scanners and getters outputting text, xhtml or binary. They would also make it easy to do HQL-things in jruby/python script. > Advantages: Already-written parser with no need of extension probing deeper into hbase: i.e. better for debugging than HQL could ever be. Easy extension adding scripts/modules rather than java code. Less likely hbase could be confused for a SQL db. > Downsides: Probably more verbose. Requires ruby or python knowledge ("Everyone knows some sql"). Big? (jruby lib is 24M). > I was going to write security as downside but HQL suffers this at the moment too -- though it has been possible to sort the updates from the selects in the UI to prevent modification of the db from the UI, something that would be hard to do in a jruby/jython parser. > What do others think? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.