org.apache.hama.bsp
Class BSPJobContext

java.lang.Object
  extended by org.apache.hama.bsp.BSPJobContext
Direct Known Subclasses:
BSPJob, TaskAttemptContext

public class BSPJobContext
extends Object

A read-only view of the bsp job that is provided to the tasks while they are running.


Field Summary
protected  org.apache.hadoop.conf.Configuration conf
           
protected static String INPUT_FORMAT_CLASS_ATTR
           
protected static String OUTPUT_FORMAT_CLASS_ATTR
           
protected static String WORK_CLASS_ATTR
           
protected static String WORKING_DIR
           
 
Constructor Summary
BSPJobContext(org.apache.hadoop.conf.Configuration conf, BSPJobID jobId)
           
BSPJobContext(org.apache.hadoop.fs.Path config, BSPJobID jobId)
           
 
Method Summary
 String get(String name)
           
 org.apache.hadoop.conf.Configuration getConf()
           
 int getInt(String name, int defaultValue)
           
 String getJar()
           
 BSPJobID getJobID()
           
 String getJobName()
           
 org.apache.hadoop.fs.Path getLocalPath(String pathString)
          Constructs a local file name.
 String getUser()
           
 org.apache.hadoop.fs.Path getWorkingDirectory()
           
 void writeXml(OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORK_CLASS_ATTR

protected static final String WORK_CLASS_ATTR
See Also:
Constant Field Values

INPUT_FORMAT_CLASS_ATTR

protected static final String INPUT_FORMAT_CLASS_ATTR
See Also:
Constant Field Values

OUTPUT_FORMAT_CLASS_ATTR

protected static final String OUTPUT_FORMAT_CLASS_ATTR
See Also:
Constant Field Values

WORKING_DIR

protected static final String WORKING_DIR
See Also:
Constant Field Values

conf

protected final org.apache.hadoop.conf.Configuration conf
Constructor Detail

BSPJobContext

public BSPJobContext(org.apache.hadoop.conf.Configuration conf,
                     BSPJobID jobId)

BSPJobContext

public BSPJobContext(org.apache.hadoop.fs.Path config,
                     BSPJobID jobId)
              throws IOException
Throws:
IOException
Method Detail

getJobID

public BSPJobID getJobID()

getWorkingDirectory

public org.apache.hadoop.fs.Path getWorkingDirectory()
                                              throws IOException
Throws:
IOException

getJobName

public String getJobName()

getJar

public String getJar()

getLocalPath

public org.apache.hadoop.fs.Path getLocalPath(String pathString)
                                       throws IOException
Constructs a local file name. Files are distributed among configured local directories.

Throws:
IOException

getUser

public String getUser()

writeXml

public void writeXml(OutputStream out)
              throws IOException
Throws:
IOException

getConf

public org.apache.hadoop.conf.Configuration getConf()

get

public String get(String name)

getInt

public int getInt(String name,
                  int defaultValue)


Copyright © 2011 The Apache Software Foundation