/kudu-binary-jar-test

Test repository for the Kudu binary test artifact

Primary LanguageJavaApache License 2.0Apache-2.0

Kudu Java client example README

This is an example program that uses the synchronous Kudu Java client APIs to:

  • Create a table

  • Insert some rows

  • Alter the table

  • Scan some rows

  • Delete the table

To test the example tool

To test that this example is working using the Kudu binary jar, run the unit tests as follows:

$ mvn test

To build and use the example tool

To build and run, ensure maven is installed and from the java-example directory run:

$ mvn package
$ java -jar target/kudu-java-example-1.0-SNAPSHOT.jar

By default, the example assumes the Kudu cluster has a single master running on localhost with the default port 7051. To specify a different set of masters for Kudu cluster, set the property kuduMasters to a CSV of the master addresses in the form host:port, as shown:

$ java -DkuduMasters=master-0:7051,master-1:7051,master-2:7051 -jar target/kudu-java-example-1.0-SNAPSHOT.jar