|
||||||||||
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()
|
java.lang.String[] |
getAllPeerNames()
|
protected BSPPeerInterface |
getBSPPeerConnection(java.net.InetSocketAddress addr)
|
BSPMessage |
getCurrentMessage()
|
int |
getLocalQueueSize()
|
int |
getNumCurrentMessages()
|
int |
getOutgoingQueueSize()
|
java.lang.String |
getPeerName()
|
long |
getProtocolVersion(java.lang.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 |
put(BSPMessageBundle messages)
Puts a bundle of messages to local queue. |
void |
reinitialize()
|
void |
send(java.lang.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. |
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 java.io.IOException
java.io.IOException
Method Detail |
---|
public void reinitialize()
public BSPMessage getCurrentMessage() throws java.io.IOException
getCurrentMessage
in interface BSPPeerInterface
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 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
protected boolean enterBarrier() throws org.apache.zookeeper.KeeperException, java.lang.InterruptedException
org.apache.zookeeper.KeeperException
java.lang.InterruptedException
protected boolean leaveBarrier() throws org.apache.zookeeper.KeeperException, java.lang.InterruptedException
org.apache.zookeeper.KeeperException
java.lang.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 java.io.IOException
close
in interface java.io.Closeable
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 long getProtocolVersion(java.lang.String arg0, long arg1) throws java.io.IOException
getProtocolVersion
in interface org.apache.hadoop.ipc.VersionedProtocol
java.io.IOException
protected BSPPeerInterface getBSPPeerConnection(java.net.InetSocketAddress addr)
public java.lang.String getPeerName()
getPeerName
in interface BSPPeerInterface
public java.lang.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 |