Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # user >> scripted way to create users

Copy link to this message
Re: scripted way to create users
Using the Java API through JRuby or Jython would be another option. With
Jython, that would look something like this:

> export
> jython adduser.jython

____contents of adduser.jython_____
import java
from org.apache.accumulo.core.client import ZooKeeperInstance
from org.apache.accumulo.core.security import Authorizations
from org.python.core.util import StringUtil
inst = ZooKeeperInstance("instanceName","localhost")
conn = inst.getConnector("root","password")

On Tue, Jan 15, 2013 at 1:12 PM, Ask Stack <[EMAIL PROTECTED]> wrote:

> echo password_file | cbshell -f command_file  seems to work.  any better
> solutions?
> I am not a programmer so I am not going to try the java option but thanks.
> ________________________________
> From: William Slacum <[EMAIL PROTECTED]>
> Sent: Tuesday, January 15, 2013 12:07 PM
> Subject: Re: scripted way to create users
> You could redirect input from a file.
> On Tue, Jan 15, 2013 at 8:20 AM, Ask Stack <[EMAIL PROTECTED]> wrote:
> Hello
> > I like to make an accumulo commands file to create users. Something like
> "createuser hello -s low" But "createuser" command does not have an option
> to provide user password. The script will stop and prompt me for the new
> user password. Does anyone know how to solve this problem?
> >Thanks.
> >