accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Newton (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-1399) Pluggable commands for the shell
Date Tue, 21 May 2013 17:31:25 GMT


Eric Newton commented on ACCUMULO-1399:

And copy jython.jar into the lib directory, and you can write this:

import org.apache.accumulo.core.Constants as Constants
import as Mutation
import as Mutation
import as Value
import as Text
import org.apache.accumulo.core.client.BatchWriterConfig as BatchWriterConfig
bs = connection.createBatchWriter('foo', BatchWriterConfig())
m = Mutation(Text('foo'))
m.put("cf", "cq", Value("foo"))
for kv in connection.createScanner('foo', Constants.NO_AUTHS):
   print kv

Run it like this:
$ ./bin/accumulo shell --fake -u root -p '' -e 'script -e python -f'
> Pluggable commands for the shell
> --------------------------------
>                 Key: ACCUMULO-1399
>                 URL:
>             Project: Accumulo
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Dave Marion
>            Assignee: Dave Marion
>            Priority: Minor
>             Fix For: 1.6.0
>         Attachments: ACCUMULO-1399-1.patch, ACCUMULO-1399-2.patch
> Proposing modification to the Shell to allow applications to create their own set of
commands. This might be accomplished using java.util.ServiceLoader or something like it. Specifically,
I'm thinking of a case where I have a create table command that is different than the one
provided by the Shell. In my case, my create table command may create one or more tables and
setup iterators on them.

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:

View raw message