streamWriter.send("5");
try {
// Wait for the last Flowlet processing 5 events, or at most 5 seconds
RuntimeMetrics metrics = RuntimeStats.getFlowletMetrics("HelloWorld", "WhoFlow", "saver");
metrics.waitForProcessed(5, 5, TimeUnit.SECONDS);
} finally {
flowManager.stop();
}
// Start Greeting procedure and query