List of usage examples for org.apache.commons.configuration MapConfiguration containsKey
public boolean containsKey(String key)
From source file:com.cloudera.nav.plugin.model.PigIdGenerator.java
/** * Create a valid PigOperationExecution identity from the pig job * configurations// w w w . ja va2 s . c om * * @param jobConf * @return */ public static String generateExecutionId(MapConfiguration jobConf) { Preconditions.checkArgument(jobConf.containsKey(PIG_SCRIPT_ID_PROP), "Could not find " + PIG_SCRIPT_ID_PROP + " in job configurations"); return MD5IdGenerator.generateIdentity(jobConf.getString(PIG_SCRIPT_ID_PROP)); }
From source file:com.cloudera.nav.plugin.model.PigIdGenerator.java
/** * Generate the correct operation id based on the job name and the * job configurations/*from w ww . ja v a2s .co m*/ * * @param jobName Yarn application name or MR job name * @param jobConf * @return */ public static String generateNewOperationId(String jobName, MapConfiguration jobConf) { Preconditions.checkArgument(jobConf.containsKey(PIG_LOGICAL_PLAN_HASH_PROP), "Could not find " + PIG_LOGICAL_PLAN_HASH_PROP + " in job configurations"); String logicalPlanHash = jobConf.getString(PIG_LOGICAL_PLAN_HASH_PROP); return MD5IdGenerator.generateIdentity(jobName, logicalPlanHash); }