/** * Get string, replacing variables in the output. * * %JOB_ID% => job id * %TASK_ID% => task id * %USER% => owning user name * * @param key name of key to lookup * @param context mapper context * @return value for key, with variables expanded */ public String getStringVars(String key, Mapper.Context context) { return getStringVars(key, null, context); }
/** * Get the output directory to write YourKit snapshots to * * @param context Map context * @return output directory */ public String getYourKitOutputDir(Mapper.Context context) { final String cacheKey = "giraph.yourkit.outputDirCached"; String outputDir = get(cacheKey); if (outputDir == null) { outputDir = getStringVars(YOURKIT_OUTPUT_DIR, YOURKIT_OUTPUT_DIR_DEFAULT, context); set(cacheKey, outputDir); } return outputDir; }