@Test public void createVerbatimToInterpretedMetricsTest() { IngestMetrics metrics = IngestMetricsBuilder.createVerbatimToInterpretedMetrics(); metrics.incMetric(BASIC_RECORDS_COUNT); metrics.incMetric(LOCATION_RECORDS_COUNT); metrics.incMetric(METADATA_RECORDS_COUNT); metrics.incMetric(TAXON_RECORDS_COUNT); metrics.incMetric(TEMPORAL_RECORDS_COUNT); metrics.incMetric(VERBATIM_RECORDS_COUNT); metrics.incMetric(AUDUBON_RECORDS_COUNT); metrics.incMetric(IMAGE_RECORDS_COUNT); metrics.incMetric(MEASUREMENT_OR_FACT_RECORDS_COUNT); metrics.incMetric(MULTIMEDIA_RECORDS_COUNT); metrics.incMetric(FILTER_ER_BASED_ON_GBIF_ID); metrics.incMetric(UNIQUE_GBIF_IDS_COUNT); metrics.incMetric(DUPLICATE_GBIF_IDS_COUNT); metrics.incMetric(IDENTICAL_GBIF_OBJECTS_COUNT); metrics.incMetric(INVALID_GBIF_ID_COUNT); metrics.incMetric(UNIQUE_IDS_COUNT); metrics.incMetric(DUPLICATE_IDS_COUNT); metrics.incMetric(IDENTICAL_OBJECTS_COUNT); MetricResults result = metrics.getMetricsResult(); Map<String, Long> map = new HashMap<>(); result .allMetrics() .getCounters() .forEach(mr -> map.put(mr.getName().getName(), mr.getAttempted())); Assert.assertEquals(18, map.size()); Assert.assertEquals(Long.valueOf(1L), map.get(BASIC_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(LOCATION_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(METADATA_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(TAXON_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(TEMPORAL_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(VERBATIM_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(AUDUBON_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(IMAGE_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(MEASUREMENT_OR_FACT_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(MULTIMEDIA_RECORDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(FILTER_ER_BASED_ON_GBIF_ID)); Assert.assertEquals(Long.valueOf(1L), map.get(UNIQUE_GBIF_IDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(DUPLICATE_GBIF_IDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(IDENTICAL_GBIF_OBJECTS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(INVALID_GBIF_ID_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(UNIQUE_IDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(DUPLICATE_IDS_COUNT)); Assert.assertEquals(Long.valueOf(1L), map.get(IDENTICAL_OBJECTS_COUNT)); }
public static IngestMetrics createVerbatimToInterpretedMetrics() { return IngestMetrics.create() .addMetric(BasicTransform.class, BASIC_RECORDS_COUNT) .addMetric(LocationTransform.class, LOCATION_RECORDS_COUNT) .addMetric(MetadataTransform.class, METADATA_RECORDS_COUNT) .addMetric(TaxonomyTransform.class, TAXON_RECORDS_COUNT) .addMetric(GrscicollTransform.class, GRSCICOLL_RECORDS_COUNT) .addMetric(TemporalTransform.class, TEMPORAL_RECORDS_COUNT) .addMetric(VerbatimTransform.class, VERBATIM_RECORDS_COUNT) .addMetric(AudubonTransform.class, AUDUBON_RECORDS_COUNT) .addMetric(ImageTransform.class, IMAGE_RECORDS_COUNT) .addMetric(MeasurementOrFactTransform.class, MEASUREMENT_OR_FACT_RECORDS_COUNT) .addMetric(MultimediaTransform.class, MULTIMEDIA_RECORDS_COUNT) .addMetric(FilterExtendedRecordTransform.class, FILTER_ER_BASED_ON_GBIF_ID) .addMetric(UniqueGbifIdTransform.class, UNIQUE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, DUPLICATE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, IDENTICAL_GBIF_OBJECTS_COUNT) .addMetric(UniqueGbifIdTransform.class, INVALID_GBIF_ID_COUNT) .addMetric(UniqueIdTransform.class, UNIQUE_IDS_COUNT) .addMetric(UniqueIdTransform.class, DUPLICATE_IDS_COUNT) .addMetric(UniqueIdTransform.class, IDENTICAL_OBJECTS_COUNT) .addMetric(OccurrenceExtensionTransform.class, OCCURRENCE_EXT_COUNT); }
IngestMetricsBuilder { public static IngestMetrics createVerbatimToInterpretedMetrics() { return IngestMetrics.create() .addMetric(BasicTransform.class, BASIC_RECORDS_COUNT) .addMetric(LocationTransform.class, LOCATION_RECORDS_COUNT) .addMetric(MetadataTransform.class, METADATA_RECORDS_COUNT) .addMetric(TaxonomyTransform.class, TAXON_RECORDS_COUNT) .addMetric(GrscicollTransform.class, GRSCICOLL_RECORDS_COUNT) .addMetric(TemporalTransform.class, TEMPORAL_RECORDS_COUNT) .addMetric(VerbatimTransform.class, VERBATIM_RECORDS_COUNT) .addMetric(AudubonTransform.class, AUDUBON_RECORDS_COUNT) .addMetric(ImageTransform.class, IMAGE_RECORDS_COUNT) .addMetric(MeasurementOrFactTransform.class, MEASUREMENT_OR_FACT_RECORDS_COUNT) .addMetric(MultimediaTransform.class, MULTIMEDIA_RECORDS_COUNT) .addMetric(FilterExtendedRecordTransform.class, FILTER_ER_BASED_ON_GBIF_ID) .addMetric(UniqueGbifIdTransform.class, UNIQUE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, DUPLICATE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, IDENTICAL_GBIF_OBJECTS_COUNT) .addMetric(UniqueGbifIdTransform.class, INVALID_GBIF_ID_COUNT) .addMetric(UniqueIdTransform.class, UNIQUE_IDS_COUNT) .addMetric(UniqueIdTransform.class, DUPLICATE_IDS_COUNT) .addMetric(UniqueIdTransform.class, IDENTICAL_OBJECTS_COUNT) .addMetric(OccurrenceExtensionTransform.class, OCCURRENCE_EXT_COUNT); } }
IngestMetricsBuilder { public static IngestMetrics createVerbatimToInterpretedMetrics() { return IngestMetrics.create() .addMetric(BasicTransform.class, BASIC_RECORDS_COUNT) .addMetric(LocationTransform.class, LOCATION_RECORDS_COUNT) .addMetric(MetadataTransform.class, METADATA_RECORDS_COUNT) .addMetric(TaxonomyTransform.class, TAXON_RECORDS_COUNT) .addMetric(GrscicollTransform.class, GRSCICOLL_RECORDS_COUNT) .addMetric(TemporalTransform.class, TEMPORAL_RECORDS_COUNT) .addMetric(VerbatimTransform.class, VERBATIM_RECORDS_COUNT) .addMetric(AudubonTransform.class, AUDUBON_RECORDS_COUNT) .addMetric(ImageTransform.class, IMAGE_RECORDS_COUNT) .addMetric(MeasurementOrFactTransform.class, MEASUREMENT_OR_FACT_RECORDS_COUNT) .addMetric(MultimediaTransform.class, MULTIMEDIA_RECORDS_COUNT) .addMetric(FilterExtendedRecordTransform.class, FILTER_ER_BASED_ON_GBIF_ID) .addMetric(UniqueGbifIdTransform.class, UNIQUE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, DUPLICATE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, IDENTICAL_GBIF_OBJECTS_COUNT) .addMetric(UniqueGbifIdTransform.class, INVALID_GBIF_ID_COUNT) .addMetric(UniqueIdTransform.class, UNIQUE_IDS_COUNT) .addMetric(UniqueIdTransform.class, DUPLICATE_IDS_COUNT) .addMetric(UniqueIdTransform.class, IDENTICAL_OBJECTS_COUNT) .addMetric(OccurrenceExtensionTransform.class, OCCURRENCE_EXT_COUNT); }  }
IngestMetricsBuilder { public static IngestMetrics createVerbatimToInterpretedMetrics() { return IngestMetrics.create() .addMetric(BasicTransform.class, BASIC_RECORDS_COUNT) .addMetric(LocationTransform.class, LOCATION_RECORDS_COUNT) .addMetric(MetadataTransform.class, METADATA_RECORDS_COUNT) .addMetric(TaxonomyTransform.class, TAXON_RECORDS_COUNT) .addMetric(GrscicollTransform.class, GRSCICOLL_RECORDS_COUNT) .addMetric(TemporalTransform.class, TEMPORAL_RECORDS_COUNT) .addMetric(VerbatimTransform.class, VERBATIM_RECORDS_COUNT) .addMetric(AudubonTransform.class, AUDUBON_RECORDS_COUNT) .addMetric(ImageTransform.class, IMAGE_RECORDS_COUNT) .addMetric(MeasurementOrFactTransform.class, MEASUREMENT_OR_FACT_RECORDS_COUNT) .addMetric(MultimediaTransform.class, MULTIMEDIA_RECORDS_COUNT) .addMetric(FilterExtendedRecordTransform.class, FILTER_ER_BASED_ON_GBIF_ID) .addMetric(UniqueGbifIdTransform.class, UNIQUE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, DUPLICATE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, IDENTICAL_GBIF_OBJECTS_COUNT) .addMetric(UniqueGbifIdTransform.class, INVALID_GBIF_ID_COUNT) .addMetric(UniqueIdTransform.class, UNIQUE_IDS_COUNT) .addMetric(UniqueIdTransform.class, DUPLICATE_IDS_COUNT) .addMetric(UniqueIdTransform.class, IDENTICAL_OBJECTS_COUNT) .addMetric(OccurrenceExtensionTransform.class, OCCURRENCE_EXT_COUNT); }  static IngestMetrics createVerbatimToInterpretedMetrics(); static IngestMetrics createInterpretedToEsIndexMetrics(); static IngestMetrics createInterpretedToHdfsViewMetrics(); }
IngestMetricsBuilder { public static IngestMetrics createVerbatimToInterpretedMetrics() { return IngestMetrics.create() .addMetric(BasicTransform.class, BASIC_RECORDS_COUNT) .addMetric(LocationTransform.class, LOCATION_RECORDS_COUNT) .addMetric(MetadataTransform.class, METADATA_RECORDS_COUNT) .addMetric(TaxonomyTransform.class, TAXON_RECORDS_COUNT) .addMetric(GrscicollTransform.class, GRSCICOLL_RECORDS_COUNT) .addMetric(TemporalTransform.class, TEMPORAL_RECORDS_COUNT) .addMetric(VerbatimTransform.class, VERBATIM_RECORDS_COUNT) .addMetric(AudubonTransform.class, AUDUBON_RECORDS_COUNT) .addMetric(ImageTransform.class, IMAGE_RECORDS_COUNT) .addMetric(MeasurementOrFactTransform.class, MEASUREMENT_OR_FACT_RECORDS_COUNT) .addMetric(MultimediaTransform.class, MULTIMEDIA_RECORDS_COUNT) .addMetric(FilterExtendedRecordTransform.class, FILTER_ER_BASED_ON_GBIF_ID) .addMetric(UniqueGbifIdTransform.class, UNIQUE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, DUPLICATE_GBIF_IDS_COUNT) .addMetric(UniqueGbifIdTransform.class, IDENTICAL_GBIF_OBJECTS_COUNT) .addMetric(UniqueGbifIdTransform.class, INVALID_GBIF_ID_COUNT) .addMetric(UniqueIdTransform.class, UNIQUE_IDS_COUNT) .addMetric(UniqueIdTransform.class, DUPLICATE_IDS_COUNT) .addMetric(UniqueIdTransform.class, IDENTICAL_OBJECTS_COUNT) .addMetric(OccurrenceExtensionTransform.class, OCCURRENCE_EXT_COUNT); }  static IngestMetrics createVerbatimToInterpretedMetrics(); static IngestMetrics createInterpretedToEsIndexMetrics(); static IngestMetrics createInterpretedToHdfsViewMetrics();  }