|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hama.bsp.GroomServer
public class GroomServer
A Groom Server (shortly referred to as groom) is a process that performs bsp tasks assigned by BSPMaster. Each groom contacts the BSPMaster, and it takes assigned tasks and reports its status by means of periodical piggybacks with BSPMaster. Each groom is designed to run with HDFS or other distributed storages. Basically, a groom server and a data node should be run on one physical node.
Nested Class Summary | |
---|---|
static class |
GroomServer.Child
The main() for child processes. |
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
|
Fields inherited from interface org.apache.hama.ipc.HamaRPCProtocolVersion |
---|
versionID |
Constructor Summary | |
---|---|
GroomServer(org.apache.hadoop.conf.Configuration conf)
|
Method Summary | |
---|---|
void |
cleanupStorage()
|
void |
clear()
Clears all queues entries. |
void |
close()
|
static GroomServer |
constructGroomServer(java.lang.Class<? extends GroomServer> groomServerClass,
org.apache.hadoop.conf.Configuration conf2)
|
void |
deleteLocalFiles()
|
void |
deleteLocalFiles(java.lang.String subdir)
|
void |
dispatch(Directive directive)
Instruct GroomServer performaning tasks. |
void |
done(TaskAttemptID taskid,
boolean shouldBePromoted)
Report that the task is successfully completed. |
void |
doReport(org.apache.hama.bsp.TaskStatus taskStatus)
Update and report refresh status back to BSPMaster. |
void |
fsError(TaskAttemptID taskId,
java.lang.String message)
Report that the task encounted a local filesystem error. |
java.lang.String[] |
getAllPeerNames()
|
java.lang.String |
getBspPeerName()
GroomServer address information. |
BSPMessage |
getCurrentMessage()
|
java.lang.String[] |
getLocalDirs()
|
int |
getNumCurrentMessages()
|
java.lang.String |
getPeerName()
|
long |
getProtocolVersion(java.lang.String protocol,
long clientVersion)
|
long |
getSuperstepCount()
|
Task |
getTask(TaskAttemptID taskid)
Called when a child task process starts, to get its task. |
java.net.InetSocketAddress |
getTaskTrackerReportAddress()
Return the port at which the tasktracker bound to |
void |
initialize()
|
boolean |
isRunning()
|
org.apache.hama.bsp.GroomServer.State |
offerService()
|
boolean |
ping(TaskAttemptID taskid)
Periodically called by child to check if parent is still alive. |
void |
put(BSPMessage msg)
Puts a message to local queue. |
void |
put(BSPMessageBundle messages)
Puts a bundle of messages to local queue. |
void |
run()
|
void |
send(java.lang.String peerName,
BSPMessage msg)
Send a data with a tag to another BSPSlave corresponding to hostname. |
void |
shutdown()
|
static java.lang.Thread |
startGroomServer(GroomServer hrs)
|
static java.lang.Thread |
startGroomServer(GroomServer hrs,
java.lang.String name)
|
void |
sync()
Barrier Synchronization. |
java.util.List<org.apache.hama.bsp.TaskStatus> |
updateTaskStatus(org.apache.hama.bsp.TaskStatus taskStatus)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public GroomServer(org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void initialize() throws java.io.IOException
java.io.IOException
public java.net.InetSocketAddress getTaskTrackerReportAddress()
public void dispatch(Directive directive) throws java.io.IOException
WorkerProtocol
dispatch
in interface WorkerProtocol
directive
- instructs a GroomServer performing necessary
execution.
java.io.IOException
public java.lang.String[] getLocalDirs()
public void deleteLocalFiles() throws java.io.IOException
java.io.IOException
public void deleteLocalFiles(java.lang.String subdir) throws java.io.IOException
java.io.IOException
public void cleanupStorage() throws java.io.IOException
java.io.IOException
public org.apache.hama.bsp.GroomServer.State offerService() throws java.lang.Exception
java.lang.Exception
public void doReport(org.apache.hama.bsp.TaskStatus taskStatus)
public java.util.List<org.apache.hama.bsp.TaskStatus> updateTaskStatus(org.apache.hama.bsp.TaskStatus taskStatus)
public void run()
run
in interface java.lang.Runnable
public void shutdown() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
java.io.IOException
public static java.lang.Thread startGroomServer(GroomServer hrs)
public static java.lang.Thread startGroomServer(GroomServer hrs, java.lang.String name)
public boolean isRunning()
public static GroomServer constructGroomServer(java.lang.Class<? extends GroomServer> groomServerClass, org.apache.hadoop.conf.Configuration conf2)
public long getProtocolVersion(java.lang.String protocol, long clientVersion) throws java.io.IOException
getProtocolVersion
in interface org.apache.hadoop.ipc.VersionedProtocol
java.io.IOException
public java.lang.String getBspPeerName()
public Task getTask(TaskAttemptID taskid) throws java.io.IOException
BSPPeerProtocol
getTask
in interface BSPPeerProtocol
java.io.IOException
public boolean ping(TaskAttemptID taskid) throws java.io.IOException
BSPPeerProtocol
ping
in interface BSPPeerProtocol
java.io.IOException
public void done(TaskAttemptID taskid, boolean shouldBePromoted) throws java.io.IOException
BSPPeerProtocol
done
in interface BSPPeerProtocol
taskid
- task's idshouldBePromoted
- whether to promote the task's output or not
java.io.IOException
public void fsError(TaskAttemptID taskId, java.lang.String message) throws java.io.IOException
BSPPeerProtocol
fsError
in interface BSPPeerProtocol
java.io.IOException
public void send(java.lang.String peerName, BSPMessage msg) throws java.io.IOException
BSPPeerInterface
send
in interface BSPPeerInterface
java.io.IOException
public void put(BSPMessage msg) throws java.io.IOException
BSPPeerInterface
put
in interface BSPPeerInterface
java.io.IOException
public void put(BSPMessageBundle messages) throws java.io.IOException
BSPPeerInterface
put
in interface BSPPeerInterface
java.io.IOException
public BSPMessage getCurrentMessage() throws java.io.IOException
getCurrentMessage
in interface BSPPeerInterface
java.io.IOException
public int getNumCurrentMessages()
getNumCurrentMessages
in interface BSPPeerInterface
public void sync() throws java.io.IOException, org.apache.zookeeper.KeeperException, java.lang.InterruptedException
BSPPeerInterface
sync
in interface BSPPeerInterface
org.apache.zookeeper.KeeperException
java.lang.InterruptedException
java.io.IOException
public long getSuperstepCount()
getSuperstepCount
in interface BSPPeerInterface
public java.lang.String getPeerName()
getPeerName
in interface BSPPeerInterface
public java.lang.String[] getAllPeerNames()
getAllPeerNames
in interface BSPPeerInterface
public void clear()
BSPPeerInterface
clear
in interface BSPPeerInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |