blob: 950c4e51ca2c2e406cb93def26a10c0b1c9cd8cc [file] [log] [blame]
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
= Kudu Java client example README
:author: Kudu Team
:homepage: https://kudu.apache.org/
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 build and run, ensure maven is installed and from the java-example directory run:
[source,bash]
----
$ 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:
[source,bash]
----
$ java -DkuduMasters=master-0:7051,master-1:7051,master-2:7051 -jar target/kudu-java-example-1.0-SNAPSHOT.jar
----