@Test public void testResetStartFetchEpochTime() { long currentTime = System.currentTimeMillis(); this.extractorStatsTracker.resetStartFetchEpochTime(1); Assert.assertTrue(this.extractorStatsTracker.getStatsMap().get(kafkaPartitions.get(1)).getStartFetchEpochTime() >= currentTime); }
public void resetStartFetchEpochTime(int partitionIdx) { this.statsMap.computeIfPresent(this.partitions.get(partitionIdx), (k, v) -> { v.startFetchEpochTime = System.currentTimeMillis(); return v; }); }
KafkaExtractorStatsTracker { public void resetStartFetchEpochTime(int partitionIdx) { this.statsMap.computeIfPresent(this.partitions.get(partitionIdx), (k, v) -> { v.startFetchEpochTime = System.currentTimeMillis(); return v; }); } }
KafkaExtractorStatsTracker { public void resetStartFetchEpochTime(int partitionIdx) { this.statsMap.computeIfPresent(this.partitions.get(partitionIdx), (k, v) -> { v.startFetchEpochTime = System.currentTimeMillis(); return v; }); } KafkaExtractorStatsTracker(WorkUnitState state, List<KafkaPartition> partitions); }
KafkaExtractorStatsTracker { public void resetStartFetchEpochTime(int partitionIdx) { this.statsMap.computeIfPresent(this.partitions.get(partitionIdx), (k, v) -> { v.startFetchEpochTime = System.currentTimeMillis(); return v; }); } KafkaExtractorStatsTracker(WorkUnitState state, List<KafkaPartition> partitions); int getErrorPartitionCount(); Long getDecodingErrorCount(int partitionIdx); void onUndecodeableRecord(int partitionIdx); void resetStartFetchEpochTime(int partitionIdx); void onDecodeableRecord(int partitionIdx, long readStartTime, long decodeStartTime, long recordSizeInBytes, long logAppendTimestamp, long recordCreationTimestamp); void onFetchNextMessageBuffer(int partitionIdx, long fetchStartTime); void updateStatisticsForCurrentPartition(int partitionIdx, long readStartTime, long lastSuccessfulRecordHeaderTimestamp); @VisibleForTesting static String convertHistogramToString(Histogram observedLatencyHistogram); void emitTrackingEvents(MetricContext context, Map<KafkaPartition, Map<String, String>> tagsForPartitionsMap); Map<KafkaPartition, Map<String, String>> generateTagsForPartitions(MultiLongWatermark lowWatermark, MultiLongWatermark highWatermark,
      MultiLongWatermark nextWatermark, Map<KafkaPartition, Map<String, String>> additionalTags); long getAvgRecordSize(int partitionIdx); long getMaxIngestionLatency(TimeUnit timeUnit); double getConsumptionRateMBps(); void reset(); }
KafkaExtractorStatsTracker { public void resetStartFetchEpochTime(int partitionIdx) { this.statsMap.computeIfPresent(this.partitions.get(partitionIdx), (k, v) -> { v.startFetchEpochTime = System.currentTimeMillis(); return v; }); } KafkaExtractorStatsTracker(WorkUnitState state, List<KafkaPartition> partitions); int getErrorPartitionCount(); Long getDecodingErrorCount(int partitionIdx); void onUndecodeableRecord(int partitionIdx); void resetStartFetchEpochTime(int partitionIdx); void onDecodeableRecord(int partitionIdx, long readStartTime, long decodeStartTime, long recordSizeInBytes, long logAppendTimestamp, long recordCreationTimestamp); void onFetchNextMessageBuffer(int partitionIdx, long fetchStartTime); void updateStatisticsForCurrentPartition(int partitionIdx, long readStartTime, long lastSuccessfulRecordHeaderTimestamp); @VisibleForTesting static String convertHistogramToString(Histogram observedLatencyHistogram); void emitTrackingEvents(MetricContext context, Map<KafkaPartition, Map<String, String>> tagsForPartitionsMap); Map<KafkaPartition, Map<String, String>> generateTagsForPartitions(MultiLongWatermark lowWatermark, MultiLongWatermark highWatermark,
      MultiLongWatermark nextWatermark, Map<KafkaPartition, Map<String, String>> additionalTags); long getAvgRecordSize(int partitionIdx); long getMaxIngestionLatency(TimeUnit timeUnit); double getConsumptionRateMBps(); void reset(); static final String TOPIC; static final String PARTITION; }