[
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.