Package krati.store

Examples of krati.store.StaticDataSet


     * @param config - DataSet configuration
     * @return A fixed-capacity DataSet.
     * @throws Exception if the set cannot be created.
     */
    public static StaticDataSet createStaticDataSet(StoreConfig config) throws Exception {
        return new StaticDataSet(config);
    }
View Full Code Here


            int batchSize,
            int numSyncBatches,
            int segmentFileSizeMB,
            SegmentFactory segmentFactory,
            double segmentCompactFactor) throws Exception {
        return new StaticDataSet(
                homeDir,
                capacity,
                batchSize,
                numSyncBatches,
                segmentFileSizeMB,
View Full Code Here

*/
public class TestStaticDataSetApi extends AbstractTestDataSetApi {

    @Override
    protected DataSet<byte[]> createStore(File homeDir) throws Exception {
        return new StaticDataSet(
                homeDir,
                10000, /* capacity */
                100,   /* batchSize */
                5,     /* numSyncBatches */
                Segment.minSegmentFileSizeMB,
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

       
        HashFunction<byte[]> hashFunction = createHashFunction();
       
        File storeHomeDir = getHomeDirectory();
        int storeCapacity = (int)(_keyCount * 1.5);
        StaticDataSet store = createDataSet(storeHomeDir, storeCapacity, hashFunction);
       
        StatsLog.logger.info(">>> populate");
        populate(store);
        store.sync();
       
        StatsLog.logger.info(">>> collect collision stats");
        collect(store);
       
        cleanTestOutput();
View Full Code Here

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

    }
   
    @Override
    protected DataSet<byte[]> getDataSet(File storeDir) throws Exception {
        int capacity = (int)(_keyCount * 1.5);
        return new StaticDataSet(storeDir,
                                 capacity, /* capacity */
                                 10000,    /* entrySize */
                                 5,        /* maxEntries */
                                 _segFileSizeMB,
                                 getSegmentFactory());
View Full Code Here

TOP

Related Classes of krati.store.StaticDataSet

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.