Class writerImpl = loader.loadClass(ingestConfiguration.getMetricsWriterClass());
IMetricsWriter writer = (IMetricsWriter) writerImpl.newInstance();
// state management for active shards, slots, etc.
ShardStateIO shardstateIO = new AstyanaxShardStateIO(); // todo: use configuration setting.
StateManager stateManager = new StateManager(rollupContext, shardstateIO);
environment.lifecycle().manage(stateManager);
MetadataCache cache = MetadataCache.getInstance();