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!.

Start a Kiji Cluster

  • If you plan to use a BentoBox, run the following command to set BentoBox-related environment variables and start the Bento cluster:
cd <path/to/bento>
source bin/
bento start

After BentoBox starts, it displays a list of useful ports for cluster webapps and services. The MapReduce JobTracker webapp (http://localhost:50030 in particular will be useful for this tutorial.


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 the Install Kiji Instance section to continue with the environment setup for 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 $KIJI_HOME/examples/phonebook/target/.

If you are using the Bento Box, will have set $KIJI_HOME for you already. If not, you should set that yourself in your environment:

export KIJI_HOME=/path/to/kiji-schema

Install Kiji Instance

Install your Kiji instance. Running kiji install with no --kiji flag installs the default instance:

kiji install

Setup Phonebook tutorial Environment

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:

export KIJI_CLASSPATH="$KIJI_HOME/examples/phonebook/lib/*"