cgl.imr.base.impl
Class JobConf

java.lang.Object
  extended by cgl.imr.base.impl.JobConf
All Implemented Interfaces:
TwisterConstants, TwisterSerializable

public class JobConf
extends Object
implements TwisterConstants, TwisterSerializable

Configuration for MapReduce computations. Groups various properties needed by the framework to execute a MapReduce computation.


Nested Class Summary
 
Nested classes/interfaces inherited from interface cgl.imr.base.TwisterConstants
TwisterConstants.JobState
 
Field Summary
 
Fields inherited from interface cgl.imr.base.TwisterConstants
COMBINE_INPUT, COMBINE_TOPIC_BASE, DIR_LIST_REQ, DIR_LIST_RES, FAILED, FIXED_DATA_FILE, FIXED_DATA_MODEL, HEP_DATA_STRING, MAP_ITERATIONS_OVER, MAP_REDUCE_TOPIC_BASE, MAP_TASK, MAP_TASK_REQUEST, MAP_WORKER_STARTED, MAPPER_REQUEST, MONITOR_REQUEST, MONITOR_RESPONSE, MONITOR_SLEEP_TIME, NEW_JOB_REQUEST, NEW_JOB_RESPONSE, NUM_MAP_TASKS, NUM_REDUCE_TASKS, PARTITION_FILE_RESPONSE_TOPIC_BASE, PARTITION_FILE_SPLIT_PATTERN, PROPERTIES_FILE, REDUCE_INPUT, REDUCE_RESPONSE, REDUCE_TASK, REDUCE_TASK_REQUEST, REDUCE_TOPIC_BASE, REDUCE_WORKER_REQUEST, RESPONSE_TOPIC_BASE, SEND_RECV_MAX_SLEEP_TIME, SEND_RECV_SLEEP_TIME, SUCCESS, TASK_STATUS, WORKER_RESPONSE
 
Constructor Summary
JobConf(byte[] bytes)
           
JobConf(String jobId)
           
 
Method Summary
 void addProperty(String key, String val)
           
 void fromBytes(byte[] bytes)
          Serializes the JobConf object.
 byte[] getBytes()
          Deserializes the JobConf object.
 String getCombinerClass()
           
 String getJobId()
           
 String getMapClass()
           
 int getNumMapTasks()
           
 int getNumReduceTasks()
           
 Hashtable<String,String> getProperties()
           
 String getProperty(String key)
           
 String getReduceClass()
           
 String getReducerSelectorClass()
           
 boolean isHasCombinerClass()
           
 boolean isHasProperties()
           
 boolean isHasReduceClass()
           
 void setCombinerClass(Class<?> combinerClass)
           
 void setHasReduceClass(boolean hasReduceClass)
           
 void setJobId(String jobId)
           
 void setMapperClass(Class<?> mapClass)
           
 void setNumMapTasks(int numMapTasks)
           
 void setNumReduceTasks(int numReduceTasks)
           
 void setProperties(Hashtable<String,String> properties)
           
 void setReducerClass(Class<?> reduceClass)
           
 void setReducerSelectorClass(Class<?> reducerSelectorClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobConf

public JobConf(byte[] bytes)
        throws SerializationException
Throws:
SerializationException

JobConf

public JobConf(String jobId)
Method Detail

addProperty

public void addProperty(String key,
                        String val)

fromBytes

public void fromBytes(byte[] bytes)
               throws SerializationException
Serializes the JobConf object.

Specified by:
fromBytes in interface TwisterSerializable
Throws:
SerializationException

getBytes

public byte[] getBytes()
                throws SerializationException
Deserializes the JobConf object.

Specified by:
getBytes in interface TwisterSerializable
Returns:
byte[] of serialized object.
Throws:
SerializationException

getCombinerClass

public String getCombinerClass()

getJobId

public String getJobId()

getMapClass

public String getMapClass()

getNumMapTasks

public int getNumMapTasks()

getNumReduceTasks

public int getNumReduceTasks()

getProperties

public Hashtable<String,String> getProperties()

getProperty

public String getProperty(String key)

getReduceClass

public String getReduceClass()

getReducerSelectorClass

public String getReducerSelectorClass()

isHasCombinerClass

public boolean isHasCombinerClass()

isHasProperties

public boolean isHasProperties()

isHasReduceClass

public boolean isHasReduceClass()

setCombinerClass

public void setCombinerClass(Class<?> combinerClass)

setHasReduceClass

public void setHasReduceClass(boolean hasReduceClass)

setJobId

public void setJobId(String jobId)

setMapperClass

public void setMapperClass(Class<?> mapClass)

setNumMapTasks

public void setNumMapTasks(int numMapTasks)

setNumReduceTasks

public void setNumReduceTasks(int numReduceTasks)

setProperties

public void setProperties(Hashtable<String,String> properties)

setReducerClass

public void setReducerClass(Class<?> reduceClass)

setReducerSelectorClass

public void setReducerSelectorClass(Class<?> reducerSelectorClass)


For comments and suggestions please send e-mail to