protected SegmentFactory createSegmentFactory() {
return new krati.core.segment.WriteBufferSegmentFactory();
}
protected AvroStore<K> createAvroStore(File storeDir, int capacity, Schema schema, Serializer<K> keySerializer) throws Exception {
StoreConfig config = new StoreConfig(storeDir, capacity);
config.setSegmentFactory(createSegmentFactory());
config.setSegmentFileSizeMB(32);
config.setNumSyncBatches(2);
config.setBatchSize(100);
return new SimpleAvroStore<K>(
StoreFactory.createStaticDataStore(config),
schema, keySerializer);
}