@Test(expected = IllegalArgumentException.class) public void resolveReportCounters_jobLevelCounter_NON_EXISTENT_COUNTER_NAME() { ReportPigCounterMapping counterMapping = new ReportPigCounterMapping("NON_EXISTENT_COUNTER_NAME", "jobAlias1", "destination.report.param1"); reportPigCountersResolver.resolveReportCounters(pigCounters, Lists.newArrayList(counterMapping)); }
public List<ReportEntry> resolveReportCounters(PigCounters pigCounters, List<ReportPigCounterMapping> reportPigCountersMappings) { List<ReportEntry> reportCounters = Lists.newArrayList(); for (ReportPigCounterMapping counterMapping : reportPigCountersMappings) { String counterValue = extractCounterValue(pigCounters, counterMapping); ReportEntry reportEntry = ReportEntryFactory.createCounterReportEntry(counterMapping.getDestReportCounterName(), Long.valueOf(counterValue)); reportCounters.add(reportEntry); } return reportCounters; }
ReportPigCountersResolver { public List<ReportEntry> resolveReportCounters(PigCounters pigCounters, List<ReportPigCounterMapping> reportPigCountersMappings) { List<ReportEntry> reportCounters = Lists.newArrayList(); for (ReportPigCounterMapping counterMapping : reportPigCountersMappings) { String counterValue = extractCounterValue(pigCounters, counterMapping); ReportEntry reportEntry = ReportEntryFactory.createCounterReportEntry(counterMapping.getDestReportCounterName(), Long.valueOf(counterValue)); reportCounters.add(reportEntry); } return reportCounters; } }
ReportPigCountersResolver { public List<ReportEntry> resolveReportCounters(PigCounters pigCounters, List<ReportPigCounterMapping> reportPigCountersMappings) { List<ReportEntry> reportCounters = Lists.newArrayList(); for (ReportPigCounterMapping counterMapping : reportPigCountersMappings) { String counterValue = extractCounterValue(pigCounters, counterMapping); ReportEntry reportEntry = ReportEntryFactory.createCounterReportEntry(counterMapping.getDestReportCounterName(), Long.valueOf(counterValue)); reportCounters.add(reportEntry); } return reportCounters; }  }
ReportPigCountersResolver { public List<ReportEntry> resolveReportCounters(PigCounters pigCounters, List<ReportPigCounterMapping> reportPigCountersMappings) { List<ReportEntry> reportCounters = Lists.newArrayList(); for (ReportPigCounterMapping counterMapping : reportPigCountersMappings) { String counterValue = extractCounterValue(pigCounters, counterMapping); ReportEntry reportEntry = ReportEntryFactory.createCounterReportEntry(counterMapping.getDestReportCounterName(), Long.valueOf(counterValue)); reportCounters.add(reportEntry); } return reportCounters; }  List<ReportEntry> resolveReportCounters(PigCounters pigCounters, List<ReportPigCounterMapping> reportPigCountersMappings); }
ReportPigCountersResolver { public List<ReportEntry> resolveReportCounters(PigCounters pigCounters, List<ReportPigCounterMapping> reportPigCountersMappings) { List<ReportEntry> reportCounters = Lists.newArrayList(); for (ReportPigCounterMapping counterMapping : reportPigCountersMappings) { String counterValue = extractCounterValue(pigCounters, counterMapping); ReportEntry reportEntry = ReportEntryFactory.createCounterReportEntry(counterMapping.getDestReportCounterName(), Long.valueOf(counterValue)); reportCounters.add(reportEntry); } return reportCounters; }  List<ReportEntry> resolveReportCounters(PigCounters pigCounters, List<ReportPigCounterMapping> reportPigCountersMappings);  }