public static String getFileSystem(Configuration cfg) { return get(cfg, "fs.defaultFS", "fs.default.name"); }
public static boolean getSpeculativeReduce(Configuration cfg) { return get(cfg, "mapreduce.reduce.speculative", "mapred.reduce.tasks.speculative.execution", true); }
private static String get(Configuration cfg, String hadoop2, String hadoop1) { return get(cfg, hadoop2, hadoop1, null); }
public static String getFileOutputFormatDir(Configuration cfg) { return get(cfg, "mapreduce.output.fileoutputformat.outputdir", "mapred.output.dir"); }
public static String getTaskId(Configuration cfg) { return get(cfg, "mapreduce.task.id", "mapred.tip.id"); }
public static String getMapValueClass(Configuration cfg) { return get(cfg, "mapred.mapoutput.value.class", "mapreduce.map.output.value.class"); }
public static String getOutputCommitterClass(Configuration cfg) { return get(cfg, "mapred.output.committer.class", null); }
public static boolean getSpeculativeMap(Configuration cfg) { return get(cfg, "mapreduce.map.speculative", "mapred.map.tasks.speculative.execution", true); }
public static String getJobTracker(Configuration cfg) { return get(cfg, "mapreduce.jobtracker.address", "mapred.job.tracker"); }
public static String getTaskAttemptId(Configuration cfg) { return get(cfg, "mapreduce.task.attempt.id", "mapred.task.id"); }
public static String getReduceTasks(Configuration cfg) { return get(cfg, "mapreduce.job.reduces", "mapred.reduce.tasks", "1"); }
private static boolean get(Configuration cfg, String hadoop2, String hadoop1, boolean defaultValue) { String result = get(cfg, hadoop2, hadoop1); if ("true".equals(result)) return true; else if ("false".equals(result)) return false; else return defaultValue; }
public static TimeValue getTaskTimeout(Configuration cfg) { return TimeValue.parseTimeValue(get(cfg, "mapreduce.task.timeout", "mapred.task.timeout", "600s")); }
public static String getTaskId(Configuration cfg) { return get(cfg, "mapreduce.task.id", "mapred.tip.id"); }
public static boolean getSpeculativeReduce(Configuration cfg) { return get(cfg, "mapreduce.reduce.speculative", "mapred.reduce.tasks.speculative.execution", true); }
public static String getReduceTasks(Configuration cfg) { return get(cfg, "mapreduce.job.reduces", "mapred.reduce.tasks", "1"); }
private static boolean get(Configuration cfg, String hadoop2, String hadoop1, boolean defaultValue) { String result = get(cfg, hadoop2, hadoop1); if ("true".equals(result)) return true; else if ("false".equals(result)) return false; else return defaultValue; }
private static boolean get(Configuration cfg, String hadoop2, String hadoop1, boolean defaultValue) { String result = get(cfg, hadoop2, hadoop1); if ("true".equals(result)) return true; else if ("false".equals(result)) return false; else return defaultValue; }
private static boolean get(Configuration cfg, String hadoop2, String hadoop1, boolean defaultValue) { String result = get(cfg, hadoop2, hadoop1); if ("true".equals(result)) return true; else if ("false".equals(result)) return false; else return defaultValue; }
private static boolean get(Configuration cfg, String hadoop2, String hadoop1, boolean defaultValue) { String result = get(cfg, hadoop2, hadoop1); if ("true".equals(result)) return true; else if ("false".equals(result)) return false; else return defaultValue; }