Requirements

Run Examples

Are you ready to run the Hama on the Hadoop + Hbase cluster? Then, This is quick guide for you :

  1. \[hama-trunk\]# ant clean package
    \\
       Then, You should add hama-x.x.x.jar to the \{$HADOOP_HOME\}/lib and copy these changes across your cluster.
    \\

2. \[hama-trunk\]# cp ./build/hama-0.1.0-dev.jar \{$HADOOP_HOME\}/lib

You also need to restart your hadoop cluster.

3. \[hama-trunk\]# cp ./build/hama-0.1.0-dev-examples.jar \{HADOOP_HOME\}

4. \[hadoop-0.17.1\]# ./bin/hadoop jar hama-0.1.0-dev-examples.jar addition 2 2

Run in a hama shell

1. Modify ${HAMA_HOME}/conf/hama-env.sh.
   
   Make sure that $HADOOP_CONF_DIR and $HBASE_CONF_DIR are set to the location of your hadoop+hbase cluster' configurations file.
   And uncomment line "# export HAMA_CLASSPATH=$HADOOP_CONF_DIR:$HBASE_CONF_DIR"

2. ${HAMA_HOME} > cp ./build/hama-0.1.0-*.jar ${HAMA_HOME}
   
   Make sure that hama-x.x.x-{,examples}.jar are placed in ${HAMA_HOME}
   
3. ${HAMA_HOME} > ./bin/hama examples addition 10 10

   You can run the hama examples quickly as above.

4. ${HAMA_HOME} > ./bin/hama shell

   Now, you are in the hama shell as below.
   hama > 

   you can enjoy hama's power in hama shell!

   For examples:
   hama > a = Matrix.Random 10 10  // generate a random matrix(10,10)
   hama > b = Matrix.Random 10 10  // generate a random matrix(10,10)
   hama > c = Matrix.Random 10 20  // generate a random matrix(10,20)
   hama > d = ( a + b ) * c        // do matrix computation

5. You can find more detais about Hama Shell in http://wiki.apache.org/hama/Shell.