org.apache.hama.util
Class ClusterUtil

java.lang.Object
  extended by org.apache.hama.util.ClusterUtil

public class ClusterUtil
extends Object


Nested Class Summary
static class ClusterUtil.GroomServerThread
          Data Structure to hold GroomServer Thread and GroomServer instance
 
Constructor Summary
ClusterUtil()
           
 
Method Summary
static ClusterUtil.GroomServerThread createGroomServerThread(org.apache.hadoop.conf.Configuration c, Class<? extends GroomServer> hrsc, int index)
          Creates a ClusterUtil.GroomServerThread.
static void shutdown(BSPMaster master, List<ClusterUtil.GroomServerThread> groomThreads, org.apache.hadoop.conf.Configuration conf)
           
static String startup(BSPMaster m, List<ClusterUtil.GroomServerThread> groomservers, org.apache.hadoop.conf.Configuration conf)
          Start the cluster.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterUtil

public ClusterUtil()
Method Detail

createGroomServerThread

public static ClusterUtil.GroomServerThread createGroomServerThread(org.apache.hadoop.conf.Configuration c,
                                                                    Class<? extends GroomServer> hrsc,
                                                                    int index)
                                                             throws IOException
Creates a ClusterUtil.GroomServerThread. Call 'start' on the returned thread to make it run.

Parameters:
c - Configuration to use.
hrsc - Class to create.
index - Used distingushing the object returned.
Returns:
Groom server added.
Throws:
IOException

startup

public static String startup(BSPMaster m,
                             List<ClusterUtil.GroomServerThread> groomservers,
                             org.apache.hadoop.conf.Configuration conf)
                      throws IOException,
                             InterruptedException
Start the cluster.

Parameters:
m -
conf -
groomservers -
Returns:
Address to use contacting master.
Throws:
InterruptedException
IOException

shutdown

public static void shutdown(BSPMaster master,
                            List<ClusterUtil.GroomServerThread> groomThreads,
                            org.apache.hadoop.conf.Configuration conf)


Copyright © 2011 The Apache Software Foundation