org.apache.hama.ipc
Interface JobSubmissionProtocol

All Superinterfaces:
HamaRPCProtocolVersion, org.apache.hadoop.ipc.VersionedProtocol
All Known Implementing Classes:
BSPMaster, LocalBSPRunner

public interface JobSubmissionProtocol
extends HamaRPCProtocolVersion

Protocol that a groom server and the central BSP Master use to communicate. This interface will contains several methods: submitJob, killJob, and killTask.


Field Summary
 
Fields inherited from interface org.apache.hama.ipc.HamaRPCProtocolVersion
versionID
 
Method Summary
 JobStatus[] getAllJobs()
          Get all the jobs submitted.
 ClusterStatus getClusterStatus(boolean detailed)
          Get the current status of the cluster
 java.lang.String getFilesystemName()
          A BSP system always operates on a single filesystem.
 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()
          Allocate a new id for the job.
 java.lang.String getSystemDir()
          Grab the bspmaster system directory path where job-specific files are to be placed.
 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.
 JobStatus submitJob(BSPJobID jobID, java.lang.String jobFile)
          Submit a Job for execution.
 
Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol
getProtocolVersion
 

Method Detail

getNewJobId

BSPJobID getNewJobId()
                     throws java.io.IOException
Allocate a new id for the job.

Returns:
job id
Throws:
java.io.IOException

submitJob

JobStatus submitJob(BSPJobID jobID,
                    java.lang.String jobFile)
                    throws java.io.IOException
Submit a Job for execution. Returns the latest profile for that job. The job files should be submitted in system-dir/jobName.

Parameters:
jobID -
jobFile -
Returns:
jobStatus
Throws:
java.io.IOException

getClusterStatus

ClusterStatus getClusterStatus(boolean detailed)
                               throws java.io.IOException
Get the current status of the cluster

Parameters:
detailed - if true then report groom names as well
Returns:
summary of the state of the cluster
Throws:
java.io.IOException

getJobProfile

JobProfile getJobProfile(BSPJobID jobid)
                         throws java.io.IOException
Grab a handle to a job that is already known to the BSPMaster.

Returns:
Profile of the job, or null if not found.
Throws:
java.io.IOException

getJobStatus

JobStatus getJobStatus(BSPJobID jobid)
                       throws java.io.IOException
Grab a handle to a job that is already known to the BSPMaster.

Returns:
Status of the job, or null if not found.
Throws:
java.io.IOException

getFilesystemName

java.lang.String getFilesystemName()
                                   throws java.io.IOException
A BSP system always operates on a single filesystem. This function returns the fs name. ('local' if the localfs; 'addr:port' if dfs). The client can then copy files into the right locations prior to submitting the job.

Throws:
java.io.IOException

jobsToComplete

JobStatus[] jobsToComplete()
                           throws java.io.IOException
Get the jobs that are not completed and not failed

Returns:
array of JobStatus for the running/to-be-run jobs.
Throws:
java.io.IOException

getAllJobs

JobStatus[] getAllJobs()
                       throws java.io.IOException
Get all the jobs submitted.

Returns:
array of JobStatus for the submitted jobs
Throws:
java.io.IOException

getSystemDir

java.lang.String getSystemDir()
Grab the bspmaster system directory path where job-specific files are to be placed.

Returns:
the system directory where job-specific files are to be placed.

killJob

void killJob(BSPJobID jobid)
             throws java.io.IOException
Kill the indicated job

Throws:
java.io.IOException

killTask

boolean killTask(TaskAttemptID taskId,
                 boolean shouldFail)
                 throws java.io.IOException
Kill indicated task attempt.

Parameters:
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.
Throws:
java.io.IOException


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