ScaleOut hServer can pass object parameters to the mappers and reducers during invocation (called a job parameter). The job parameter object is broadcast to each worker node at the invocation time in a scalable and efficient way. The parameter object type should be Serializable. To add a job parameter to the job, use the setJobParameter(…) method of HServerJob:
job.setJobParameter("This string is a job parameter.");
To retrieve the parameter at the mapper or the reducer, use the JobParameter helper class:
public static class MyReducer extends Reducer<String, Integer, String, Integer> { @Override public void reduce(String key, Iterable<Integer> values, Context context) throws IOException, InterruptedException { String parameter = (String)JobParameter.get(context.getConfiguration()); // ... } }