public void init(Config config, TaskContext context) {
   this.store = (KeyValueStore<String, String>) context.getStore("mystore");
   System.out.println("Contents of store: ");
   KeyValueIterator<String, String> iter = store.all();
   while (iter.hasNext()) {
     Entry<String, String> entry = iter.next();
     System.out.println(entry.getKey() + " => " + entry.getValue());
   }
   iter.close();
 }
Ejemplo n.º 2
0
 @Override
 public void init(Config config, TaskContext context) {
   this.store = (KeyValueStore<String, String>) context.getStore("checker-state");
   this.expectedKeys = config.getInt("expected.keys");
   this.numPartitions = config.getInt("num.partitions");
 }