|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hama.bsp.BSPPeer
public class BSPPeer
This class represents a BSP peer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher |
---|
org.apache.zookeeper.Watcher.Event |
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
|
Fields inherited from interface org.apache.hama.bsp.BSPRPCProtocolVersion |
---|
versionID |
Constructor Summary | |
---|---|
BSPPeer(org.apache.hadoop.conf.Configuration conf)
Constructor |
Method Summary | |
---|---|
void |
clear()
Clears all queues entries. |
void |
clearLocalQueue()
Clears local queue |
void |
clearOutgoingQueues()
Clears outgoing queues |
void |
close()
|
protected boolean |
enterBarrier()
|
String[] |
getAllPeerNames()
|
protected BSPPeerInterface |
getBSPPeerConnection(InetSocketAddress addr)
|
BSPMessage |
getCurrentMessage()
|
int |
getLocalQueueSize()
|
int |
getNumCurrentMessages()
|
int |
getOutgoingQueueSize()
|
String |
getPeerName()
|
long |
getProtocolVersion(String arg0,
long arg1)
|
long |
getSuperstepCount()
|
protected boolean |
leaveBarrier()
|
void |
process(org.apache.zookeeper.WatchedEvent event)
|
void |
put(BSPMessage msg)
Puts a message to local queue. |
void |
reinitialize()
|
void |
send(String peerName,
BSPMessage msg)
Send a data with a tag to another BSPSlave corresponding to hostname. |
void |
setCurrentTaskStatus(org.apache.hama.bsp.TaskStatus currentTaskStatus)
Sets the current status |
void |
setJobConf(BSPJob jobConf)
Sets the job configuration |
void |
sync()
Barrier Synchronization. |
protected boolean |
waitForSync()
|
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 BSPPeer(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
Method Detail |
---|
public void reinitialize()
public BSPMessage getCurrentMessage() throws IOException
getCurrentMessage
in interface BSPPeerInterface
IOException
public void send(String peerName, BSPMessage msg) throws IOException
BSPPeerInterface
send
in interface BSPPeerInterface
IOException
public void sync() throws IOException, org.apache.zookeeper.KeeperException, InterruptedException
BSPPeerInterface
sync
in interface BSPPeerInterface
org.apache.zookeeper.KeeperException
InterruptedException
IOException
protected boolean enterBarrier() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
protected boolean waitForSync() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
protected boolean leaveBarrier() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void process(org.apache.zookeeper.WatchedEvent event)
process
in interface org.apache.zookeeper.Watcher
public void clear()
BSPPeerInterface
clear
in interface BSPPeerInterface
public void close() throws IOException
close
in interface Closeable
IOException
public void put(BSPMessage msg) throws IOException
BSPPeerInterface
put
in interface BSPPeerInterface
IOException
public long getProtocolVersion(String arg0, long arg1) throws IOException
getProtocolVersion
in interface org.apache.hadoop.ipc.VersionedProtocol
IOException
protected BSPPeerInterface getBSPPeerConnection(InetSocketAddress addr)
public String getPeerName()
getPeerName
in interface BSPPeerInterface
public String[] getAllPeerNames()
getAllPeerNames
in interface BSPPeerInterface
public int getNumCurrentMessages()
getNumCurrentMessages
in interface BSPPeerInterface
public void setCurrentTaskStatus(org.apache.hama.bsp.TaskStatus currentTaskStatus)
currentTaskStatus
- public long getSuperstepCount()
getSuperstepCount
in interface BSPPeerInterface
public void setJobConf(BSPJob jobConf)
jobConf
- public int getLocalQueueSize()
public int getOutgoingQueueSize()
public void clearLocalQueue()
public void clearOutgoingQueues()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |