Wordcount-Implementierung mit Kafka-Boardmitteln und MongoDB als Storage
[demos/kafka/training] / src / main / java / de / juplo / kafka / StatisticsDocument.java
index 96ebfb1..137c9bb 100644 (file)
@@ -14,8 +14,8 @@ public class StatisticsDocument
 {
   @Id
   public String id;
-  public long offset;
-  public Map<String, Integer> statistics;
+  public long offset = -1l;
+  public Map<String, Map<String, Long>> statistics;
 
   public StatisticsDocument()
   {
@@ -27,7 +27,7 @@ public class StatisticsDocument
     this.statistics = new HashMap<>();
   }
 
-  public StatisticsDocument(Integer partition, Map<String, Integer> statistics, long offset)
+  public StatisticsDocument(Integer partition, Map<String, Map<String, Long>> statistics, long offset)
   {
     this.id = Integer.toString(partition);
     this.statistics = statistics;