|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hama.bsp.LocalBSPRunner
public class LocalBSPRunner
A multithreaded local BSP runner that can be used for debugging BSP's. It uses the working directory "/user/hama/bsp/" and starts runners based on the number of the machines core.
Field Summary | |
---|---|
protected static java.util.concurrent.CyclicBarrier |
barrier
|
protected org.apache.hadoop.conf.Configuration |
conf
|
protected JobStatus |
currentJobStatus
|
protected org.apache.hadoop.fs.FileSystem |
fs
|
protected static java.util.LinkedList<java.util.concurrent.Future<BSP>> |
futureList
|
protected java.lang.String |
jobFile
|
protected java.lang.String |
jobName
|
protected java.util.HashMap<java.lang.String,BSPPeerProtocol> |
localGrooms
|
static org.apache.commons.logging.Log |
LOG
|
protected static java.util.concurrent.ThreadPoolExecutor |
threadPool
|
protected static int |
threadPoolSize
|
Fields inherited from interface org.apache.hama.ipc.HamaRPCProtocolVersion |
---|
versionID |
Constructor Summary | |
---|---|
LocalBSPRunner(org.apache.hadoop.conf.Configuration conf)
|
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. |
long |
getProtocolVersion(java.lang.String protocol,
long clientVersion)
|
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 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
protected static volatile java.util.concurrent.ThreadPoolExecutor threadPool
protected static int threadPoolSize
protected static final java.util.LinkedList<java.util.concurrent.Future<BSP>> futureList
protected static java.util.concurrent.CyclicBarrier barrier
protected java.util.HashMap<java.lang.String,BSPPeerProtocol> localGrooms
protected java.lang.String jobFile
protected java.lang.String jobName
protected JobStatus currentJobStatus
protected org.apache.hadoop.conf.Configuration conf
protected org.apache.hadoop.fs.FileSystem fs
Constructor Detail |
---|
public LocalBSPRunner(org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
java.io.IOException
Method Detail |
---|
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
JobSubmissionProtocol
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) throws java.io.IOException
JobSubmissionProtocol
getClusterStatus
in interface JobSubmissionProtocol
detailed
- if true then report groom names as well
java.io.IOException
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 java.lang.String getFilesystemName() throws java.io.IOException
JobSubmissionProtocol
getFilesystemName
in interface JobSubmissionProtocol
java.io.IOException
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 getSystemDir()
JobSubmissionProtocol
getSystemDir
in interface JobSubmissionProtocol
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |