Package krati.core.segment

Examples of krati.core.segment.MemorySegmentFactory


   * @param segmentFileSizeMB - Store segment size in MB
   * @return the created <code>ArrayStoreConnections</code>.
   * @throws Exception if the <code>ArrayStoreConnections</code> cannot be created.
   */
  public static ArrayStoreConnections createArrayStoreConnections(File storeHomeDir, int capacity, int segmentFileSizeMB) throws Exception {
    KratiArrayStore kas = createKratiArrayStore(storeHomeDir, capacity, new MemorySegmentFactory(), segmentFileSizeMB);
    return new KratiArrayStoreConnections(new KratiArrayStoreInts(kas));
  }
View Full Code Here


    // Initialize buffering
    this.buffer = store;
    this.bufInts = new KratiDataStoreInts(store);
   
    // Initialize extension
    this.extension = initExtension(new MemorySegmentFactory());
    this.extInts = new KratiArrayStoreInts(extension);
   
    // Initialize buffer persist listener
    initPersistableListener();
   
View Full Code Here

        }
    }
   
    protected DataStore<byte[], byte[]> createDataStore(File homeDir, int initialCapacity) throws Exception {
        StoreConfig config = new StoreConfig(homeDir, initialCapacity);
        config.setSegmentFactory(new MemorySegmentFactory());
        config.setSegmentFileSizeMB(32);
       
        return StoreFactory.createIndexedDataStore(config);
    }
View Full Code Here

                homeDir,
                1 << 16, /* initialCapacity */
                100,     /* batchSize */
                5,       /* numSyncBatches */
                8,       /* index segmentFileSizeMB */
                new MemorySegmentFactory(),
                16,      /* store segmentFileSizeMB */
                new MappedSegmentFactory());
    }
View Full Code Here

*/
public class SingleAvroStoreHttpServer {
   
    static DataStore<byte[], byte[]> createDataStore(File storeDir, int capacity) throws Exception {
        StoreConfig config = new StoreConfig(storeDir, capacity);
        config.setSegmentFactory(new MemorySegmentFactory());
        config.setSegmentFileSizeMB(32);
        config.setNumSyncBatches(2);
        config.setBatchSize(100);
       
        return StoreFactory.createStaticDataStore(config);
View Full Code Here

*/
public class Utility {
   
    public static DataStore<byte[], byte[]> createStaticDataStore(File storeDir, int capacity) throws Exception {
        StoreConfig config = new StoreConfig(storeDir, capacity);
        config.setSegmentFactory(new MemorySegmentFactory());
        config.setSegmentFileSizeMB(32);
        config.setNumSyncBatches(2);
        config.setBatchSize(100);
       
        return StoreFactory.createStaticDataStore(config);
View Full Code Here

        return StoreFactory.createStaticDataStore(config);
    }
   
    public static DataStore<byte[], byte[]> createDynamicDataStore(File storeDir, int capacity) throws Exception {
        StoreConfig config = new StoreConfig(storeDir, capacity);
        config.setSegmentFactory(new MemorySegmentFactory());
        config.setSegmentFileSizeMB(32);
        config.setNumSyncBatches(2);
        config.setBatchSize(100);
       
        return StoreFactory.createDynamicDataStore(config);
View Full Code Here

        assertEquals(config.getHashLoadFactor(), config.getHashLoadFactor());
       
        File propertiesFile = new File(getHomeDir(), StorePartitionConfig.CONFIG_PROPERTIES_FILE+".new");
       
        config.setHashFunction(new Fnv1aHash64());
        config.setSegmentFactory(new MemorySegmentFactory());
        config.setSegmentFileSizeMB(StoreParams.SEGMENT_FILE_SIZE_MB_MIN);
        config.setNumSyncBatches(StoreParams.BATCH_SIZE_MIN);
        config.setBatchSize(StoreParams.BATCH_SIZE_MIN);
        config.save(propertiesFile, null);
       
View Full Code Here

                homeDir,
                1 << 16, /* initialCapacity */
                100,     /* batchSize */
                5,       /* numSyncBatches */
                8,       /* index segmentFileSizeMB */
                new MemorySegmentFactory(),
                16,      /* store segmentFileSizeMB */
                new MappedSegmentFactory());
    }
View Full Code Here

    }
   
    protected abstract HashFunction<byte[]> createHashFunction();
   
    protected StaticDataSet createDataSet(File storeDir, int capacity, HashFunction<byte[]> hashFunction) throws Exception {
        return new StaticDataSet(storeDir, capacity, 10000, 5, 32, new MemorySegmentFactory(), hashFunction);
    }
View Full Code Here

TOP

Related Classes of krati.core.segment.MemorySegmentFactory

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.