@Test public void getJobIdByAlias_JOB_ALIAS_NOT_FOUND() { assertNull(pigCounters.getJobIdByAlias("INVALID_ALIAS")); }
public String getJobIdByAlias(String jobAlias) { for (Map.Entry<String, JobCounters> jobCountersEntry : jobLevelCounters.entrySet()) { if (jobCountersEntry.getValue().getAliases().contains(jobAlias)) { return jobCountersEntry.getValue().getJobId(); } } return null; }
PigCounters { public String getJobIdByAlias(String jobAlias) { for (Map.Entry<String, JobCounters> jobCountersEntry : jobLevelCounters.entrySet()) { if (jobCountersEntry.getValue().getAliases().contains(jobAlias)) { return jobCountersEntry.getValue().getJobId(); } } return null; } }
PigCounters { public String getJobIdByAlias(String jobAlias) { for (Map.Entry<String, JobCounters> jobCountersEntry : jobLevelCounters.entrySet()) { if (jobCountersEntry.getValue().getAliases().contains(jobAlias)) { return jobCountersEntry.getValue().getJobId(); } } return null; } PigCounters(Map<String, String> rootLevelCounters, List<JobCounters> jobLevelCounters); }
PigCounters { public String getJobIdByAlias(String jobAlias) { for (Map.Entry<String, JobCounters> jobCountersEntry : jobLevelCounters.entrySet()) { if (jobCountersEntry.getValue().getAliases().contains(jobAlias)) { return jobCountersEntry.getValue().getJobId(); } } return null; } PigCounters(Map<String, String> rootLevelCounters, List<JobCounters> jobLevelCounters); List<String> getJobIds(); JobCounters getJobCounters(String jobId); String getJobIdByAlias(String jobAlias); Map<String, String> getRootLevelCounters(); }
PigCounters { public String getJobIdByAlias(String jobAlias) { for (Map.Entry<String, JobCounters> jobCountersEntry : jobLevelCounters.entrySet()) { if (jobCountersEntry.getValue().getAliases().contains(jobAlias)) { return jobCountersEntry.getValue().getJobId(); } } return null; } PigCounters(Map<String, String> rootLevelCounters, List<JobCounters> jobLevelCounters); List<String> getJobIds(); JobCounters getJobCounters(String jobId); String getJobIdByAlias(String jobAlias); Map<String, String> getRootLevelCounters();  }