For this tutorial, we assume you are either using the Kiji Standalone BentoBox or have installed the individual components described here. If you don't have a working environment yet, you can install the Kiji Standalone Bento box in three quick steps!.
- If you are running a BentoBox, set the environment variables for the shell and start the Bento cluster:
cd <path/to/bento> source bin/kiji-env.sh bento start
If you have downloaded the Kiji Standalone BentoBox, the code for this tutorial is already compiled and located in the
$KIJI_HOME/examples/phonebook/lib/ directory. You can skip to Create a Table if you want to get started playing with the example code.
The source code for this tutorial can be found in
$KIJI_HOME/examples/phonebook. The source is included along with a Maven project. To get started using Maven, consult Getting started With Maven or the Apache Maven Homepage.
The following tools are required to compile this project:
- Maven 3.x
- Java 6
To compile, run
mvn package from
$KIJI_HOME/examples/phonebook. The build artifacts (jars) will be placed in the
$KIJI_HOME/examples/phonebook/target/ directory. This tutorial assumes you are using the pre-built jars included with the phonebook example under
$KIJI_HOME/examples/phonebook/lib/. If you wish to use jars of example code that you have built, you should adjust the command lines in this tutorial to use the jars in
If you are using the Bento Box,
kiji-env.sh will have set
$KIJI_HOME for you already. If not, you should set that yourself in your environment:
Install your Kiji instance. Running
kiji install with no
--kiji flag installs the default instance:
To work through this tutorial, various Kiji tools will require that Avro data type definitions particular to the working phonebook example be on the classpath. You can add your artifacts to the Kiji classpath by running: