org.apache.hama.bsp
Interface BSPPeerProtocol

All Superinterfaces:
BSPPeerInterface, BSPRPCProtocolVersion, java.io.Closeable, Constants, org.apache.hadoop.ipc.VersionedProtocol
All Known Implementing Classes:
GroomServer

public interface BSPPeerProtocol
extends BSPPeerInterface

Protocol that task child process uses to contact its parent process.


Field Summary
 
Fields inherited from interface org.apache.hama.bsp.BSPRPCProtocolVersion
versionID
 
Fields inherited from interface org.apache.hama.Constants
CLUSTER_DISTRIBUTED, CLUSTER_IS_DISTRIBUTED, DEFAULT_GROOM_RPC_HOST, DEFAULT_GROOM_RPC_PORT, DEFAULT_PEER_HOST, DEFAULT_PEER_PORT, DEFAULT_ZOOKEEPER_CLIENT_PORT, DEFAULT_ZOOKEEPER_PAUSE, DEFAULT_ZOOKEEPER_RETRIES, DEFAULT_ZOOKEEPER_ROOT, DEFAULT_ZOOKEEPER_SERVER_ADDR, EMPTY_BYTE_ARRAY, GROOM_RPC_HOST, GROOM_RPC_PORT, GROOM_SERVER_IMPL, PEER_HOST, PEER_ID, PEER_PORT, UTF8_ENCODING, ZOOKEEPER_CLIENT_PORT, ZOOKEEPER_CONFIG_NAME, ZOOKEEPER_PAUSE, ZOOKEEPER_QUORUM, ZOOKEEPER_RETRIES, ZOOKEEPER_ROOT, ZOOKEEPER_SERVER_ADDRS, ZOOKEEPER_SESSION_TIMEOUT
 
Method Summary
 void done(TaskAttemptID taskid, boolean shouldBePromoted)
          Report that the task is successfully completed.
 void fsError(TaskAttemptID taskId, java.lang.String message)
          Report that the task encounted a local filesystem error.
 Task getTask(TaskAttemptID taskid)
          Called when a child task process starts, to get its task.
 boolean ping(TaskAttemptID taskid)
          Periodically called by child to check if parent is still alive.
 
Methods inherited from interface org.apache.hama.bsp.BSPPeerInterface
clear, getAllPeerNames, getCurrentMessage, getNumCurrentMessages, getPeerName, getSuperstepCount, put, put, send, sync
 
Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol
getProtocolVersion
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

getTask

Task getTask(TaskAttemptID taskid)
             throws java.io.IOException
Called when a child task process starts, to get its task.

Throws:
java.io.IOException

ping

boolean ping(TaskAttemptID taskid)
             throws java.io.IOException
Periodically called by child to check if parent is still alive.

Returns:
True if the task is known
Throws:
java.io.IOException

done

void done(TaskAttemptID taskid,
          boolean shouldBePromoted)
          throws java.io.IOException
Report that the task is successfully completed. Failure is assumed if the task process exits without calling this.

Parameters:
taskid - task's id
shouldBePromoted - whether to promote the task's output or not
Throws:
java.io.IOException

fsError

void fsError(TaskAttemptID taskId,
             java.lang.String message)
             throws java.io.IOException
Report that the task encounted a local filesystem error.

Throws:
java.io.IOException


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.