|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hama.bsp.BSPMaster
public class BSPMaster
BSPMaster is responsible to control all the groom servers and to manage bsp jobs.
Nested Class Summary | |
---|---|
static class |
BSPMaster.State
Constants for BSPMaster's status. |
Field Summary | |
---|---|
static long |
GROOMSERVER_EXPIRY_INTERVAL
|
protected java.util.concurrent.ConcurrentMap<GroomServerStatus,WorkerProtocol> |
groomServers
|
static org.apache.commons.logging.Log |
LOG
|
Fields inherited from interface org.apache.hama.ipc.HamaRPCProtocolVersion |
---|
versionID |
Constructor Summary | |
---|---|
BSPMaster(HamaConfiguration conf)
Start the BSPMaster process, listen on the indicated hostname/port |
Method Summary | |
---|---|
void |
addJobInProgressListener(org.apache.hama.bsp.JobInProgressListener listener)
Registers a JobInProgressListener to GroomServerManager. |
static BSPMaster |
constructMaster(java.lang.Class<? extends BSPMaster> masterClass,
org.apache.hadoop.conf.Configuration conf)
|
java.util.Map<java.lang.String,java.lang.String> |
currentGroomServerPeers()
Current GroomServer Peers. |
BSPMaster.State |
currentState()
|
WorkerProtocol |
findGroomServer(GroomServerStatus status)
Find WorkerProtocol with corresponded groom server status |
java.util.Collection<WorkerProtocol> |
findGroomServers()
Find the collection of groom servers. |
static java.net.InetSocketAddress |
getAddress(org.apache.hadoop.conf.Configuration conf)
|
JobStatus[] |
getAllJobs()
Get all the jobs submitted. |
java.lang.String |
getBSPMasterIdentifier()
|
java.lang.String |
getBSPMasterName()
|
ClusterStatus |
getClusterStatus(boolean detailed)
Get the current status of the cluster |
java.lang.String |
getFilesystemName()
A BSP system always operates on a single filesystem. |
int |
getHttpPort()
|
JobProfile |
getJobProfile(BSPJobID jobid)
Grab a handle to a job that is already known to the BSPMaster. |
JobStatus |
getJobStatus(BSPJobID jobid)
Grab a handle to a job that is already known to the BSPMaster. |
BSPJobID |
getNewJobId()
This method returns new job id. |
long |
getProtocolVersion(java.lang.String protocol,
long clientVersion)
|
long |
getStartTime()
|
java.lang.String |
getSystemDir()
Return system directory to which BSP store control files. |
java.util.Collection<GroomServerStatus> |
groomServerStatusKeySet()
Collection of GroomServerStatus as the key set. |
JobStatus[] |
jobsToComplete()
Get the jobs that are not completed and not failed |
void |
killJob(BSPJobID jobid)
Kill the indicated job |
boolean |
killTask(TaskAttemptID taskId,
boolean shouldFail)
Kill indicated task attempt. |
void |
offerService()
|
boolean |
register(GroomServerStatus status)
A GroomServer registers with its status to BSPMaster when startup, which will update GroomServers cache. |
void |
removeJobInProgressListener(org.apache.hama.bsp.JobInProgressListener listener)
Unregisters a JobInProgressListener to GroomServerManager. |
boolean |
report(Directive directive)
A GroomServer (periodically) reports task statuses back to the BSPMaster. |
void |
shutdown()
|
static BSPMaster |
startMaster(HamaConfiguration conf)
|
static BSPMaster |
startMaster(HamaConfiguration conf,
java.lang.String identifier)
|
JobStatus |
submitJob(BSPJobID jobID,
java.lang.String jobFile)
Submit a Job for execution. |
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
public static final long GROOMSERVER_EXPIRY_INTERVAL
protected java.util.concurrent.ConcurrentMap<GroomServerStatus,WorkerProtocol> groomServers
Constructor Detail |
---|
public BSPMaster(HamaConfiguration conf) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
Method Detail |
---|
public boolean register(GroomServerStatus status) throws java.io.IOException
register
in interface MasterProtocol
status
- to be updated in cache.
java.io.IOException
public boolean report(Directive directive) throws java.io.IOException
MasterProtocol
report
in interface MasterProtocol
java.io.IOException
public static BSPMaster startMaster(HamaConfiguration conf) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static BSPMaster startMaster(HamaConfiguration conf, java.lang.String identifier) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static java.net.InetSocketAddress getAddress(org.apache.hadoop.conf.Configuration conf)
public void offerService() throws java.lang.InterruptedException, java.io.IOException
java.lang.InterruptedException
java.io.IOException
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 BSPJobID getNewJobId() throws java.io.IOException
getNewJobId
in interface JobSubmissionProtocol
java.io.IOException
public JobStatus submitJob(BSPJobID jobID, java.lang.String jobFile) throws java.io.IOException
JobSubmissionProtocol
submitJob
in interface JobSubmissionProtocol
java.io.IOException
public ClusterStatus getClusterStatus(boolean detailed)
JobSubmissionProtocol
getClusterStatus
in interface JobSubmissionProtocol
detailed
- if true then report groom names as well
public WorkerProtocol findGroomServer(GroomServerStatus status)
public java.util.Collection<WorkerProtocol> findGroomServers()
public java.util.Collection<GroomServerStatus> groomServerStatusKeySet()
public void addJobInProgressListener(org.apache.hama.bsp.JobInProgressListener listener)
public void removeJobInProgressListener(org.apache.hama.bsp.JobInProgressListener listener)
public java.util.Map<java.lang.String,java.lang.String> currentGroomServerPeers()
public java.lang.String getBSPMasterName()
public long getStartTime()
public java.lang.String getBSPMasterIdentifier()
public int getHttpPort()
public JobStatus[] jobsToComplete() throws java.io.IOException
JobSubmissionProtocol
jobsToComplete
in interface JobSubmissionProtocol
java.io.IOException
public JobStatus[] getAllJobs() throws java.io.IOException
JobSubmissionProtocol
getAllJobs
in interface JobSubmissionProtocol
java.io.IOException
public java.lang.String getFilesystemName() throws java.io.IOException
JobSubmissionProtocol
getFilesystemName
in interface JobSubmissionProtocol
java.io.IOException
public java.lang.String getSystemDir()
getSystemDir
in interface JobSubmissionProtocol
getSystemDir
in interface MasterProtocol
public JobProfile getJobProfile(BSPJobID jobid) throws java.io.IOException
JobSubmissionProtocol
getJobProfile
in interface JobSubmissionProtocol
java.io.IOException
public JobStatus getJobStatus(BSPJobID jobid) throws java.io.IOException
JobSubmissionProtocol
getJobStatus
in interface JobSubmissionProtocol
java.io.IOException
public void killJob(BSPJobID jobid) throws java.io.IOException
JobSubmissionProtocol
killJob
in interface JobSubmissionProtocol
java.io.IOException
public boolean killTask(TaskAttemptID taskId, boolean shouldFail) throws java.io.IOException
JobSubmissionProtocol
killTask
in interface JobSubmissionProtocol
taskId
- the id of the task to kill.shouldFail
- if true the task is failed and added to failed tasks
list, otherwise it is just killed, w/o affecting job failure
status.
java.io.IOException
public static BSPMaster constructMaster(java.lang.Class<? extends BSPMaster> masterClass, org.apache.hadoop.conf.Configuration conf)
public void shutdown()
public BSPMaster.State currentState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |