+ public PartitionStatistics(TopicPartition partition)
+ {
+ this.partition = partition;
+ }
+
+ public PartitionStatistics(StatisticsDocument document)
+ {
+ this.partition = new TopicPartition(document.topic, document.partition);
+ document
+ .statistics
+ .entrySet()
+ .forEach(entry ->
+ {
+ this.statistics.put(
+ entry.getKey(),
+ new KeyCounter(entry.getKey(), entry.getValue()));
+ });
+ }
+
+