public static MapredContext createDummy(Configuration conf) {
    return new MapredContext(false, new JobConf(conf));
  }
Runtime context of MapredTask providing additional information to GenericUDF
ql/src/java/org/apache/hadoop/hive/ql/exec/MapredContext.java