Showing posts with label Kiji. Show all posts
Showing posts with label Kiji. Show all posts

Kiji Maven Setup

To develop applications using Kiji schema and Mapreduce , add following to your maven

If you have custom changes to your maven settings.xml then add following in relevant sections. Otherwise you can download the settings.xml provided by kiji website

 

<profile>
     <repositories>
       <repository>
         <id>kiji-repos</id>
         <name>kiji-repos</name>
         <url>https://repo.wibidata.com/artifactory/kiji</url>
       </repository>
     </repositories>
     <pluginRepositories>
       <pluginRepository>
         <snapshots>
           <enabled>true</enabled>
         </snapshots>
         <id>kiji-plugins</id>
         <name>kiji-plugins</name>
         <url>https://repo.wibidata.com/artifactory/kiji</url>
       </pluginRepository>
     </pluginRepositories>
     <id>kiji-profile</id>
   </profile>

 

  <activeProfiles>
  <activeProfile>kiji-profile</activeProfile>
</activeProfiles>

 

Changes to pom.xml

 

Add the dependency like following

<dependency>
      <groupId>org.kiji.schema</groupId>
      <artifactId>kiji-schema</artifactId>
      <version>1.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kiji.mapreduce</groupId>
      <artifactId>kiji-mapreduce</artifactId>
      <version>1.0.0-rc5</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kiji.platforms</groupId>
      <artifactId>kiji-cdh4-platform</artifactId>
      <version>1.0.0</version>
      <scope>provided</scope>
    </dependency>   

 

For org.kiji.platforms

Please read below , you need to choose right version depending upon your hadoop cluster

https://github.com/kijiproject/kiji-platforms/blob/master/README.md

Installing Kiji Schema and Shell

Make sure that your Hadoop and HBase are running up.

If you need help to install Hadoop and HBase please see following posts

http://jugnu-life.blogspot.com.au/2012/03/hadoop-installation-tutorial.html

http://jugnu-life.blogspot.com.au/2013/03/hbase-pseudo-mode-install.html

Download Kiji Schema and extract it to some location

https://github.com/kijiproject/kiji-schema

Set following variables

export KIJI_HOME="/home/jj/software/wibi/kiji/kiji-schema-1.0.0-rc5"
export PATH=$PATH:$KIJI_HOME/bin

Install Kiji system tables

$ kiji install

 

jj@jj-VirtualBox:~$ kiji install
Warning: $HADOOP_HOME is deprecated.

Creating kiji instance: kiji://localhost:2181/default/
Creating meta tables for kiji instance in hbase...
13/03/30 18:03:37 INFO org.kiji.schema.KijiInstaller: Installing kiji instance 'kiji://localhost:2181/default/'.
13/03/30 18:03:43 INFO org.kiji.schema.KijiInstaller: Installed kiji instance 'kiji://localhost:2181/default/'.
Successfully created kiji instance: kiji://localhost:2181/default/

 

Installing Kiji Schema Shell

Download from

https://github.com/kijiproject/kiji-schema-shell

export KIJI_SHELL_HOME="/home/jj/software/wibi/kiji/kiji-schema-shell-1.0.0-rc5"
export PATH=$PATH:$KIJI_SHELL_HOME/bin

Start kiji shell by

 

jj@jj-VirtualBox:~$ kiji-schema-shell
Warning: $HADOOP_HOME is deprecated.

Kiji schema shell v1.0.0-rc5
Enter 'help' for instructions (without quotes).
Enter 'quit' to quit.
DDL statements must be terminated with a ';'
schema>

Congrats , you have installed Kiji Schema successfully. Lets play :)