Package krati.core

Examples of krati.core.StoreConfig


            e.printStackTrace();
        }
    }
   
    public void testMaxCapacity() throws Exception {
        StoreConfig config = new StoreConfig(getHomeDir(), Integer.MAX_VALUE);
        config.setIndexesCached(false); // Do not cache indexes in memory
       
        StaticDataStore store = StoreFactory.createStaticDataStore(config);
       
        // Check store capacity
        assertEquals(Integer.MAX_VALUE, store.capacity());
View Full Code Here


    private StoreConfig _config;
   
    @Override
    protected void setUp() {
        try {
            _config = new StoreConfig(FileUtils.getTestDir(getClass()), 100000);
            _config.setBatchSize(1000);
            _config.setNumSyncBatches(5);
            _config.setSegmentFileSizeMB(8);
            _config.setSegmentFactory(new MappedSegmentFactory());
        } catch (IOException e) {
View Full Code Here

            e.printStackTrace();
        }
    }
   
    public void testMaxCapacity() throws Exception {
        StoreConfig config = new StoreConfig(getHomeDir(), Integer.MAX_VALUE);
        config.setIndexesCached(false); // Do not cache indexes in memory
       
        DynamicDataStore store = StoreFactory.createDynamicDataStore(config);
       
        // Compute maxLevel
        LinearHashing h = new LinearHashing(DynamicConstants.SUB_ARRAY_SIZE);
View Full Code Here

*/
public class TestStaticDataArrayIterator extends AbstractTestArrayStoreIterator {
   
    @Override
    protected ArrayStore createStore(File homeDir) throws Exception {
        StoreConfig config = new StoreConfig(homeDir, 1000);
        return StoreFactory.createStaticArrayStore(config);
    }
View Full Code Here

                         double segmentCompactFactor,
                         HashFunction<byte[]> hashFunction) throws Exception {
        this._homeDir = homeDir;
       
        // Create/validate/store config
        _config = new StoreConfig(_homeDir, capacity);
        _config.setBatchSize(batchSize);
        _config.setNumSyncBatches(numSyncBatches);
        _config.setSegmentFactory(segmentFactory);
        _config.setSegmentFileSizeMB(segmentFileSizeMB);
        _config.setSegmentCompactFactor(segmentCompactFactor);
View Full Code Here

    private StoreConfig _config;
   
    @Override
    protected void setUp() {
        try {
            _config = new StoreConfig(FileUtils.getTestDir(getClass()), 100000);
            _config.setBatchSize(1000);
            _config.setNumSyncBatches(5);
            _config.setSegmentFileSizeMB(8);
            _config.setSegmentFactory(new MappedSegmentFactory());
        } catch (IOException e) {
View Full Code Here

    private StoreConfig _config;
   
    @Override
    protected void setUp() {
        try {
            _config = new StoreConfig(FileUtils.getTestDir(getClass()), 100000);
            _config.setBatchSize(1000);
            _config.setNumSyncBatches(5);
            _config.setSegmentFileSizeMB(8);
            _config.setSegmentFactory(new MappedSegmentFactory());
        } catch (IOException e) {
View Full Code Here

       
        // Set homeDir
        this._homeDir = homeDir;
       
        // Create/validate/store config
        _config = new StoreConfig(_homeDir, initialCapacity);
        _config.setBatchSize(batchSize);
        _config.setNumSyncBatches(numSyncBatches);
        _config.setSegmentFileSizeMB(segmentFileSizeMB);
        _config.setSegmentCompactFactor(segmentCompactFactor);
        _config.setSegmentFactory(segmentFactory);
View Full Code Here

    protected SegmentFactory createSegmentFactory() {
        return new krati.core.segment.MemorySegmentFactory();
    }
   
    protected ArrayStore createArrayStore(File storeDir, int capacity) throws Exception {
        StoreConfig config = new StoreConfig(storeDir, capacity);
        config.setSegmentFactory(createSegmentFactory());
        config.setSegmentFileSizeMB(32);
        config.setNumSyncBatches(2);
        config.setBatchSize(100);
       
        return StoreFactory.createStaticArrayStore(config);
    }
View Full Code Here

    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);
    }
View Full Code Here

TOP

Related Classes of krati.core.StoreConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.