Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

User documentation as PDF

If you'd like to read the documentation as PDF, e.G. if your datacenter has no internet connection, then we have included you a downloadable version of our documentation in the wiki. It is much more detailed, so it is worth to read through it even if you read the wiki pages.

Hama 0.5.0

Hama Installation Guide

BSP Programming Model

BSP Design Document

Requirements

Current Hama requires JRE 1.6 7 or higher and ssh to be set up between nodes in the cluster:

  • hadoop -0.20.2 (non-secure version), since Hama 0.5.0 we are using hadoop-0.1.1.x or 2.x
  • Sun Java JDK 1.67.x or higher version

For additional information consult our CompatibilityTable.

...

You can download Hama here:

http://www.apache.org/dyn/closer.cgi/incubator/hama

Build latest version from source

...

No Format
% svn co https://svn.apache.org/repos/asf/hama/trunk hama-trunk
% cd hama-trunk

% mvn clean install package-Phadoop1 -Dmaven.test.skip=trueDhadoop.version=1.x.x -U
or
% mvn clean install -Phadoop2 -Dhadoop.version=2.x.x -U

See also HowToContribute

Hadoop Installation

We recommend the installation guide of Michael Noll:

No Format
 % rm -rf ./lib/hadoop*.jar
 % cp /usr/lib/hadoop/hadoop-test-0.20.2-cdh3u3b.jar ./lib/
 % cp /usr/lib/hadoop/hadoop-core-0.20.2-cdh3u3b.jar ./lib/
 % cp /usr/lib/hadoop/lib/guava-r09-jarjar.jar ./lib/

 % bin/start-bspd.sh

Hama Installation

...

No Format
tar -xzf hama-0.x.0-incubating.tar.gz

Don't forget to chown the directory as the same user you configured Hadoop in the step before.

...

  • BSPMaster and Zookeeper settings - Figure out where to run your HDFS namenode and BSPMaster. Set the variable bsp.master.address to the BSPMaster's intended host:port. Set the variable fs.default.namedefaultFS to the HDFS Namenode's intended host:port.

...

No Format
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
  <property>
    <name>bsp.master.address</name>
    <value>host1.mydomain.com:40000</value>
    <description>The address of the bsp master server. Either the
    literal string "local" or a host:port for distributed mode
    </description>
  </property>

  <property>
    <name>fs.default.name<defaultFS</name>
    <value>hdfs://host1.mydomain.com:9000/</value>
    <description>
      The name of the default file system. Either the literal string
      "local" or a host:port for HDFS.
    </description>
  </property>

  <property>
    <name>hama.zookeeper.quorum</name>
    <value>host1.mydomain.com,host2.mydomain.com</value>
    <description>Comma separated list of servers in the ZooKeeper Quorum.
    For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
    By default this is set to localhost for local and pseudo-distributed modes
    of operation. For a fully-distributed setup, this should be set to a full
    list of ZooKeeper quorum servers. If HAMA_MANAGES_ZK is set in hama-env.sh
    this is the list of servers which we will start/stop zookeeper on.
    </description>
  </property>
</configuration>

...

to stop all the daemons running on your cluster.

Enabling Fault Tolerance Service

By default, FT service is disabled. To enable Fault Tolerance Service, you can set below properties like below:

No Format

  <property>
    <name>bsp.ft.enabled</name>
    <value>true</value>
    <description>Enable Fault Tolerance in BSP Task execution.</description>
  </property>
  <property>
    <name>bsp.checkpoint.enabled</name>
    <value>true</value>
    <description>Enable Hama to checkpoint the messages transferred among BSP tasks during the BSP synchronization period.</description>
  </property>
  <property>
    <name>bsp.checkpoint.interval</name>
    <value>10</value>
    <description>If bsp.checkpoint.enabled is set to true, the checkpointing is initiated on the valueth synchronization process of BSP tasks.</description>
  </property>

Run the BSP Examples

Run the command:

No Format
% $HAMA_HOME/bin/hama jar hama-examples-0.x.0-incubating.jar

It will then offer you some examples to choose. Refer to our Examples site if you have additional questions how to use them.

...

*First you need a simple Java Project.
*Click on File in the top left corner -> New -> Java Project.
*Give the child a good name, choose at least Java6 and finish. You should see the project in your Package Explorer.
*Add the jars you need for Hama 0.5.0 to your build path, you should get them from a binary release (sometimes called *-dist) lib directory of Apache Hama.
*commons-configuration-1.6.jar ; commons-httpclient-3.0.1.jar ; commons-logging-1.0.4.jar; commons-lang-2.6.jar ; hadoop-1.0.0.jar ; hama-core.0.5.0-incubating.jar ; hama-graph.0.5.0-incubating.jar ; hama-examples.0.5.0-incubating*.jar ; zookeeper-3.3.2.jar.
*You can also add the configuration XML's to your classpath, by creating a new folder "conf" and add it as a source folder via rightclick->Build Path->Use as Source Folder
*Create a new class to test it and put the following code into it

...