O'Reilly logo

Apache Accumulo for Developers by Guðmundur Jón Halldórsson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting to the Accumulo cluster using Java

After setting up Accumulo, the first task that we need to do is create a simple application that connects to the development environment and writes to a table. There are two .jar files needed for this demo to work. The first file, accumulo-core.1.4.4.jar, is located at /usr/local/accumulo/lib on Linux, or C:\cygwin\usr\local\accumulo\lib on Windows. The second file, hadoop-core.1.2.1.jar, is located at /usr/local/hadoop on Linux, or C:\cygwin\usr\local\hadoop on Windows.

For our application, create a new Java project and add the two jar files in it. Then create a new Java class named Accumulo1 and copy the following code in it. Do not forget to enter values of userName and password variables. Execute ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required