You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2010/12/19 07:26:00 UTC

[jira] Created: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Move away from jruby; build our shell elsewise either on another foundation or build up our own
-----------------------------------------------------------------------------------------------

                 Key: HBASE-3375
                 URL: https://issues.apache.org/jira/browse/HBASE-3375
             Project: HBase
          Issue Type: Task
          Components: shell
            Reporter: stack


JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.

JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.

Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985895#action_12985895 ] 

stack commented on HBASE-3375:
------------------------------

@Jim The javascript shell was poor compared to IRB when I tested this stuff out a good while back (See HBASE-487 for my blunderings).

> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "ryan rawson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973049#action_12973049 ] 

ryan rawson commented on HBASE-3375:
------------------------------------

hopefully we can avoid putting some kind of parser in the hbase
project, one of existing shell makers like the maven guy's thing would
probably be better.




> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973305#action_12973305 ] 

Andrew Purtell commented on HBASE-3375:
---------------------------------------

I've built many domain specific languages over the years, using bison and flex. I have not used ANTLR before but looked at some of the grammars and it looks reasonable. It looks like you can guard rule evaluation with arbitrary predicates (Java code), which is interesting, and I've only scratched the surface. This thing clearly lets you do complex wizard level stuff, and I share Ryan's feelings about the trouble with that. If we were to go this route, we need to be aggressive about simplicity. 

> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "ryan rawson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973050#action_12973050 ] 

ryan rawson commented on HBASE-3375:
------------------------------------

generally speaking parsers become unmaintable in projects are people
with the required skillset move on, etc.  They become magic that is
unchangeable, and it'd be nice to avoid that if at all possible.




> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974435#action_12974435 ] 

Andrew Purtell commented on HBASE-3375:
---------------------------------------

Regarding the REST gateway today, use Content-Type: application/json for PUT or POST and Accept: application/json for GET. We model data representation using JAXB bindings and leverage Jersey's support for wiring JAXB to JSON. 

> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973988#action_12973988 ] 

Andrew Purtell commented on HBASE-3375:
---------------------------------------

Discussed this on IRC a bit today:

[15:08]	<apurtell>	anybody particularly itching to do 3375?
[15:10]	<jgray>	karthik wants to do some ANTLR + JSON... and maybe at the same time we could finish the move stack started a while ago to schemas in ZK as JSON
[15:10]	<jgray>	apurtell: what were you thinking?
[15:11]	<apurtell>	use antlr, maintain current command set, keep enough ruby syntax so current scripts execute (and allow scripting), everything json, optional mode for running against REST interface instead of Java API
[15:13]	<apurtell>	i'm neutral as to ruby syntax but everyone talking about this issue would like to keep some kind of scripting capability
[15:15]	<St^Ack>	Scripting hasn't really taken off.
[15:16]	<St^Ack>	I think scripting only really makes sense if 'real' language underpinning shell
[15:16]	<St^Ack>	else, ANTLR'ing up those loops -- whiles, fors, etc. -- is going to be time consuming
[15:17]	<apurtell>	i don't think it would be too bad, i'm talking about flow control, variable assignment/substitution, and expressions
[15:18]	<apurtell>	it can be "real" enough... or not... depends if there's value in doing it
[15:19]	<apurtell>	(not talking about classes or anything not fitting an informal definition of "basic")
[15:20]	<jgray>	i also like idea of JSON + REST allowing shells written in anything
[15:20]	<St^Ack>	apurtell: I just see it as wasted effort if already a grammer/parser written -- e.g. pre-existing shell

[15:25]	<jgray>	well i personally hate the shell
[15:25]	<apurtell>	what would make it better?
[15:25]	<jgray>	and would like to move to json instead of the horrid ruby syntax
[15:25]	<jgray>	and work on REST or something that would allow other shells / utils to be written atop it
[15:25]	<larsgeorge>	+1
[15:25]	<apurtell>	i'm not fond of the current shell either
[15:26]	<jgray>	no jruby deps, no jruby startup, no jruby syntax. move to json to go inline with other changes we'd like to make (schema as json in zk, etc).
[15:26]	<jgray>	well idea would be you could easily write other utils in any language
[15:27]	<jgray>	so with roll-your-own, shell is implemented in java
[15:27]	<jgray>	trivial to tie into REST
[15:28]	<jgray>	let's not let this block us
[15:28]	<jgray>	but if someone wants to build something i think it would be good
[15:30]	<St^Ack>	low priority though

[15:30]	<jgray>	shell to json would make sense tho
[15:36]	<gario>	ok, so if the idea is JSON throughout, why not a javascript repl?
[15:40]	<St^Ack>	gario: jscript fine by me... shell was bad last I looked but maybe there's a plugin or something... rhino engine is part of jvm
[15:41]	<apurtell>	any reasonable js repls?
[16:04]	<gario>	looks like you can use jline with the rhino shell, fwiw: http://blog.norrisboyd.com/2008/03/better-line-editing-for-rhino-shell.html

> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Jim R. Wilson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985427#action_12985427 ] 

Jim R. Wilson commented on HBASE-3375:
--------------------------------------

Why not use Rhino, and have a JavaScript shell?  The syntax for most commands already has near perfect JavaScript analogs.

Consider this in today's shell:

{code}
get "table", "row", {COLUMN => "column:qualifier", TIMESTAMP => 12345, VERSIONS => 4}
{code}

Could be this in JS:

{code:javascript}
get( "table", "row", { COLUMN: "column:qualifier", TIMESTAMP: 12345, VERSIONS: 4} );
{code}

No parsing required, full scripting language power.





> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Jonathan Gray (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973047#action_12973047 ] 

Jonathan Gray commented on HBASE-3375:
--------------------------------------

I believe Karthik and Kannan were involved in the ANTLR shell for Cassandra.  Karthik has said he could work on one for HBase but I will wait for him to speak up before committing him to anything :)

> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973048#action_12973048 ] 

Todd Lipcon commented on HBASE-3375:
------------------------------------

I have some antlr background too, but would prefer to use an existing shell so we get readline, completion, history, all that for free. jline might do some of that for us, but I've heard it's a bit of a pain.

> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Commented] (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Luke Lu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507343#comment-13507343 ] 

Luke Lu commented on HBASE-3375:
--------------------------------

License issue of jruby runtime jars has been fixed: http://jira.codehaus.org/browse/JRUBY-5410.

Let's close this as won't fix :)
                
> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Karthik Ranganathan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974406#action_12974406 ] 

Karthik Ranganathan commented on HBASE-3375:
--------------------------------------------

Awesome discussion. I think the only way to make scripting for HBase take off is to allow scripting in any language. Language lock-in for scripting takes away the real advantage of scripting - all the time is spent in looking up the syntax (unless the person writing is committed to learning the language). So in that sense, REST + JSON is awesome.

On a tangential note, REST+JSON also allows us to easily write HBase clients (that have ZK integration) in languages other than Java (aka C++). This would allow efficiently interacting with HBase from non Java services.

If we are agreed on the REST+JSON approach - now its only a matter of how to write the shell the fastest in any language. I am not familiar with where the REST gateway stands today, and how much work it is to move all the structures to JSON. If these are easy to get out the door, then we should only think about the fastest way to write the shell.



> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973236#action_12973236 ] 

stack commented on HBASE-3375:
------------------------------

I haven't looked at the grammars page on ANTLR in a year or more.  I know that as soon as you dig in, that the grammars are missing key pieces or are incomplete but nonetheless its always fun reading this page: http://www.antlr.org/grammar/list....  

> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Karthik Ranganathan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973922#action_12973922 ] 

Karthik Ranganathan commented on HBASE-3375:
--------------------------------------------

Hey guys, like Jonathan said, I think ANTLR would be good... and once the framework is set, the changes are relatively easy to get in. Also, the core grammar does not change that much - usually only enhancements to some commands here and there.

Also if the META entries are all JSON (as we are increasingly moving towards) and we are able to expose REST API's for most of the operations, then building a shell in any language/framework will become trivial.





> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973045#action_12973045 ] 

Todd Lipcon commented on HBASE-3375:
------------------------------------

In Groovy, you're right that the "commands" only take a list of strings. But if we're OK with a bit of parentheses, we can get the following to work:
{code}

def create(name, cfs) {
  println("Going to create table name: " + name)
  for (entry in cfs) {
    println("CF name: " + entry.key)
    for (attr in entry.value) {
      println("Attr '" + attr.key + "': " + attr.value)
    }
  } 
} 
groovy:000> create('foo', [mycf: [ttl: 123], othercf: []])        
Going to create table name: foo
CF name: mycf
Attr 'ttl': 123
CF name: othercf
===> null
{code}

for example.

Another possibility would be to borrow the CLI from Cassandra, it seems to be their own ANTLR based thing.

> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell updated HBASE-3375:
----------------------------------

    Fix Version/s: 0.92.0

Some suggestions that were recently made along these lines:

- Groovy: http://groovy.codehaus.org/

- gshell: https://github.com/sonatype/gshell

I'm not a fan of Groovy, it's quite verbose, but it can do a shell-like syntax and variables and control flow like JRuby. Todd demonstrated:
{noformat}
import org.codehaus.groovy.tools.shell.*;

class Sum extends CommandSupport {
 def Sum(Shell shell) {
   super(shell, "sum", "\\sum");
 }

 def execute(List args) {
   def x = 0
   for (arg in args) {
     x += Integer.valueOf(arg)
   }
   println("Sum is: " + x);
 }
}

register Sum
{noformat}

which can be used as:

{noformat}
groovy:000> sum 1 2 3
Sum is: 6
{noformat}

However it looks like Groovy shell commands can receive only a list of strings. That may barely be enough but how we represented schemas as a JRuby map was nice. I believe it is also not possible to mix shell commands with script like we could with JRuby. 

Gshell can do a very basic shell syntax with variables but not any control flow or conditional expressions. GShell also pulls in some jars that we don't otherwise bundle now (doxia, gossip, guice, osgi, plexus, sisu) which weigh in at 1.2M, not that bad. Implementing control flow would require hacking up a real shell grammar and/or implementing 'if', 'for', 'while' commands, and so forth. Might as well just build our own for that level of effort. 

Looking around I found a couple of bash clones in various state but all GPL.

Perhaps it may be best to stay with an older yet unsupported version of jruby if it suits our needs adequately. Otherwise I lean toward rolling our own. I would not necessarily mind doing that. 

> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>             Fix For: 0.92.0
>
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Resolved] (HBASE-3375) Move away from jruby; build our shell elsewise either on another foundation or build up our own

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack resolved HBASE-3375.
--------------------------

    Resolution: Won't Fix

As per [~vicaya], JRuby fixed the licensing so we just stuck w/ jruby.
                
> Move away from jruby; build our shell elsewise either on another foundation or build up our own
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3375
>                 URL: https://issues.apache.org/jira/browse/HBASE-3375
>             Project: HBase
>          Issue Type: Task
>          Components: shell
>            Reporter: stack
>
> JRuby has been sullied; its been shipping *GPL jars with a while now.  A hack up to remove these jars is being done elsewhere (HBASE-3374).  This issue is about casting our shell anew atop a foundation that is other than JRuby or writing a shell of our own from scratch.
> JRuby has gotten us this far.  It provides a shell and it also was used scripting HBase.  It would be nice if we could get scripting and shell in the redo.
> Apart from the licensing issue above and that the fix will be reverting our JRuby to a version that is no longer supported and that is old, other reasons to move off JRuby are that while its nice having ruby to hand when scripting, the JRuby complete jar is 10 or more MB in size.  Its bloated at least from our small shell perspective.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira