The setup for Kiji is described in Getting Started.

The following sections go into a little more detail if you don't already have your system up and running.

Prerequisites

JDK

Make sure you have the JDK: version 6 or later.

Build Tools

Maven is a software project build tool that can be easily configured to compile KijiExpress Scala files into Java JARs. You can put off setting up Maven by running KijiExpress jobs on the KijiExpress REPL, or by configuring the development environment of your choice to pull in the appropriate Kiji dependencies.

Setup Maven as described in Maven Users Center. You should be able to create the example project and run it using Java.

To complete the Maven setup for KijiExpress:

  • Create a Maven project and add the Kiji repositories to your Maven pom.xml file:

         <repositories>
           <repository>
             <id>kiji-repos</id>
             <name>kiji-repos</name>
             <url>https://repo.wibidata.com/artifactory/kiji</url>
           </repository>
         </repositories>
    
  • Update the pom.xml file to include the Kiji framework and KijiExpress:

      <dependency>
        <groupId>org.kiji.express</groupId>
        <artifactId>kiji-express</artifactId>
        <version>${express.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.kiji.framework</groupId>
        <artifactId>kiji-framework</artifactId>
        <version>${kiji.framework.version}</version>
        <scope>provided</scope>
      </dependency>
    

More detailed instructions on setting up your maven project can be found here.

Kiji BentoBox

The Kiji package is called "Bento" after the Japanese style of serving boxed meals. Each new version of the bento is named after food inspired by the bento, in alphabetical sequence.

Kiji runs on Hadoop and HBase. If you do not already have a cluster with these services, the Kiji BentoBox is a useful quickstart cluster on your local machine that will let you try out the Kiji tools.

Download the BentoBox, move it to where you want it to live (typically /opt), expand it. Unzip the archive with the command

tar xzf <bento-archive-filename>

This will expand the bento in a directory named kiji-bento-\<version\>/.

Run the Bento

cd <path/to/bento>
source bin/kiji-env.sh
bento start

Install a Kiji Instance

Install Kiji system tables in HBase:

kiji install --kiji=kiji://.env/project-name

Create Tables in your Kiji Instance

KijiSchema includes the functionality to create and manipulate Kiji tables. Use the KijiSchema shell to perform the one-time task of generating tables for your project’s input and output data. Follow these steps:

  1. Create a data definition in the form of a DDL file to specify the schema of the tables you want to create.

    Basically, you are creating tables with names, descriptions, row key format, and the locality group description with the families and columns that make up the table. The easiest way to do this is to copy one of the DDL files from a Kiji tutorial project and modify it to meet your needs. Find an example here:

      ${KIJI_HOME}/examples/express-music/src/main/resources/org/kiji/express/music/music-schema.ddl
    

    More detailed information about KijiSchema requirements and the DDL syntax is here:

      http://docs.kiji.org/userguides/schema/1.2.1/schema-shell-ddl-ref/
    
  2. Run the DDL file against the project instance in the KijiSchema shell:

     kiji-schema-shell --kiji=kiji://.env/project-name --file=/path/to/layout.ddl