You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@accumulo.apache.org by David Medinets <da...@gmail.com> on 2012/01/04 20:27:56 UTC

Using tool.sh to run InsertWithBatchWriter example.

$ cd /home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT
$ bin/tool.sh lib/accumulo-examples-1.5.0-incubating-SNAPSHOT.jar
org.apache.accumulo.examples.helloworld.InsertWithBatchWriter
development localhost hello root ubuntu

This command produces this error:

  Usage: bin/tool.sh accumulo-examplesjar
accumulo.examples.helloworld.InsertWithBatchWriter <instance name>
<zoo keepers> <tableName> <username> <password>

I have compiled the InsertWithBatchWriter class by removing the usage
check and directly setting the class variables:

    String instanceName = "development";
    String zooKeepers = "localhost";
    String tableName = "hello";
    String user = "root";
    byte[] pass = "password".getBytes();

The class executed and inserted the information.

BTW, you might notice that the usage message is no longer accurate.
The name of the jar file and the class package have changed. Is it
time to update all of the usage messages?

Re: Using tool.sh to run InsertWithBatchWriter example.

Posted by Keith Turner <ke...@deenlo.com>.
That needs to be fixed.  Would you mind opening a ticket?  If not I can.

On Wed, Jan 4, 2012 at 2:27 PM, David Medinets <da...@gmail.com> wrote:
> $ cd /home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT
> $ bin/tool.sh lib/accumulo-examples-1.5.0-incubating-SNAPSHOT.jar
> org.apache.accumulo.examples.helloworld.InsertWithBatchWriter
> development localhost hello root ubuntu
>
> This command produces this error:
>
>  Usage: bin/tool.sh accumulo-examplesjar
> accumulo.examples.helloworld.InsertWithBatchWriter <instance name>
> <zoo keepers> <tableName> <username> <password>
>
> I have compiled the InsertWithBatchWriter class by removing the usage
> check and directly setting the class variables:
>
>    String instanceName = "development";
>    String zooKeepers = "localhost";
>    String tableName = "hello";
>    String user = "root";
>    byte[] pass = "password".getBytes();
>
> The class executed and inserted the information.
>
> BTW, you might notice that the usage message is no longer accurate.
> The name of the jar file and the class package have changed. Is it
> time to update all of the usage messages?

Re: Using tool.sh to run InsertWithBatchWriter example.

Posted by Billie J Rinaldi <bi...@ugov.gov>.
On Wednesday, January 4, 2012 2:59:37 PM, "David Medinets" <da...@gmail.com> wrote:
> Yes. This worked. Has bin/accumulo replaced bin/tools.sh?

No.  bin/accumulo works for local processes, but you still need bin/tool.sh to run MapReduce jobs.  tool.sh sets up libjars.

> Any objection to a JIRA ticket to update the usage examples? I can
> review all of the examples and list the ones that need changes.

That would be wonderful.  Thanks!

Billie

Re: Using tool.sh to run InsertWithBatchWriter example.

Posted by David Medinets <da...@gmail.com>.
./bin/accumulo org.apache.accumulo.examples.helloworld.InsertWithBatchWriter
development localhost hellotable root password

Yes. This worked. Has bin/accumulo replaced bin/tools.sh? Should
bin/tools.sh be removed or replaced with

echo "bin/tools.sh has been replaced with bin/accumulo. See README
files in docs/examples for details."

Any objection to a JIRA ticket to update the usage examples? I can
review all of the examples and list the ones that need changes.

On Wed, Jan 4, 2012 at 2:40 PM, Billie J Rinaldi
<bi...@ugov.gov> wrote:
> On Wednesday, January 4, 2012 2:27:56 PM, "David Medinets" <da...@gmail.com> wrote:
>> $ bin/tool.sh lib/accumulo-examples-1.5.0-incubating-SNAPSHOT.jar
>> org.apache.accumulo.examples.helloworld.InsertWithBatchWriter
>> development localhost hello root ubuntu
>
> In README.helloworld it says to use
> ./bin/accumulo org.apache.accumulo.examples.helloworld.InsertWithBatchWriter instance zookeepers hellotable username password
>
> Does that work?
>
> Billie

Re: Using tool.sh to run InsertWithBatchWriter example.

Posted by Billie J Rinaldi <bi...@ugov.gov>.
On Wednesday, January 4, 2012 2:27:56 PM, "David Medinets" <da...@gmail.com> wrote:
> $ bin/tool.sh lib/accumulo-examples-1.5.0-incubating-SNAPSHOT.jar
> org.apache.accumulo.examples.helloworld.InsertWithBatchWriter
> development localhost hello root ubuntu

In README.helloworld it says to use 
./bin/accumulo org.apache.accumulo.examples.helloworld.InsertWithBatchWriter instance zookeepers hellotable username password

Does that work?

Billie