org.apache.hama.bsp
Class BSPJob
java.lang.Object
org.apache.hama.bsp.BSPJobContext
org.apache.hama.bsp.BSPJob
public class BSPJob
- extends BSPJobContext
A BSP job configuration.
BSPJob is the primary interface for a user to describe a BSP job to the Hama BSP framework for execution.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BSPJob
public BSPJob()
throws IOException
- Throws:
IOException
BSPJob
public BSPJob(HamaConfiguration conf)
throws IOException
- Throws:
IOException
BSPJob
public BSPJob(HamaConfiguration conf,
String jobName)
throws IOException
- Throws:
IOException
BSPJob
public BSPJob(BSPJobID jobID,
String jobFile)
throws IOException
- Throws:
IOException
BSPJob
public BSPJob(HamaConfiguration conf,
Class<?> exampleClass)
throws IOException
- Throws:
IOException
BSPJob
public BSPJob(HamaConfiguration conf,
int numPeer)
setWorkingDirectory
public void setWorkingDirectory(org.apache.hadoop.fs.Path dir)
throws IOException
- Throws:
IOException
setBspClass
public void setBspClass(Class<? extends BSP> cls)
throws IllegalStateException
- Set the BSP algorithm class for the job.
- Parameters:
cls
-
- Throws:
IllegalStateException
getBspClass
public Class<? extends BSP> getBspClass()
setJar
public void setJar(String jar)
setJarByClass
public void setJarByClass(Class<?> cls)
setJobName
public void setJobName(String name)
throws IllegalStateException
- Throws:
IllegalStateException
setInputPath
public void setInputPath(HamaConfiguration conf,
org.apache.hadoop.fs.Path iNPUTPATH)
setUser
public void setUser(String user)
progress
public long progress()
throws IOException
- Throws:
IOException
isComplete
public boolean isComplete()
throws IOException
- Throws:
IOException
isSuccessful
public boolean isSuccessful()
throws IOException
- Throws:
IOException
killJob
public void killJob()
throws IOException
- Throws:
IOException
killTask
public void killTask(TaskAttemptID taskId)
throws IOException
- Throws:
IOException
failTask
public void failTask(TaskAttemptID taskId)
throws IOException
- Throws:
IOException
submit
public void submit()
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
waitForCompletion
public boolean waitForCompletion(boolean verbose)
throws IOException,
InterruptedException,
ClassNotFoundException
- Throws:
IOException
InterruptedException
ClassNotFoundException
set
public void set(String name,
String value)
setNumBspTask
public void setNumBspTask(int tasks)
getNumBspTask
public int getNumBspTask()
Copyright © 2011 The Apache Software Foundation