Package krati.core.segment

Examples of krati.core.segment.SegmentFactory


    int initialCapacity = 500000;
    String storeName = getClass().getSimpleName();
    File storeHome = FileUtils.getTestDir(storeName);
   
    int indexSegmentFileSizeMB = 8;
    SegmentFactory indexSegmentFactory = new MemorySegmentFactory();
    int storeSegmentFileSizeMB = 32;
    SegmentFactory storeSegmentFactory = new MemorySegmentFactory();
   
    try {
      KratiDataStore underlyingStore =
        StoreFactory.createKratiDataStore(storeHome,
                                          initialCapacity,
View Full Code Here


  }
 
  protected ArrayStoreConnections createConnectionsStore() throws Exception {
    File connectionsStoreDir = new File(getHomeDir(), "connections-store");
    int connectionsStoreSegMB = 32;
    SegmentFactory connectionsStoreSegFactory = new MemorySegmentFactory();
   
    ArrayStoreConnections connectionsStore =
      StoreFactory.createArrayStoreConnections(
          connectionsStoreDir,
          getConnectionsStoreCapacity(),
View Full Code Here

                config.getInt(StoreParams.PARAM_INDEX_SEGMENT_FILE_SIZE_MB,
                              StoreParams.INDEX_SEGMENT_FILE_SIZE_MB_DEFAULT);
        double indexSegmentCompactFactor =
                config.getDouble(StoreParams.PARAM_INDEX_SEGMENT_COMPACT_FACTOR,
                                 config.getSegmentCompactFactor());
        SegmentFactory indexSegmentFactory =
                config.getClass(StoreParams.PARAM_INDEX_SEGMENT_FACTORY_CLASS, MemorySegmentFactory.class)
                .asSubclass(SegmentFactory.class).newInstance();
       
        StoreConfig indexConfig = new StoreConfig(_indexHome, indexInitialCapacity);
        indexConfig.setBatchSize(config.getBatchSize());
View Full Code Here

        int capacity = 1000 + _rand.nextInt(1000000);
        int batchSize = StoreParams.BATCH_SIZE_DEFAULT;
        int numSyncBatches = StoreParams.NUM_SYNC_BATCHES_DEFAULT;
        int segmentFileSizeMB = StoreParams.SEGMENT_FILE_SIZE_MB_MIN;
        double segmentCompactFactor = StoreParams.SEGMENT_COMPACT_FACTOR_DEFAULT;
        SegmentFactory segmentFactory = new MappedSegmentFactory();

        DataSet<byte[]> store;
        byte[] key = RandomBytes.getBytes(32);
       
        store = StoreFactory.createStaticDataSet(
View Full Code Here

        int batchSize = StoreParams.BATCH_SIZE_DEFAULT;
        int numSyncBatches = StoreParams.NUM_SYNC_BATCHES_DEFAULT;
        int segmentFileSizeMB = StoreParams.SEGMENT_FILE_SIZE_MB_MIN;
        double segmentCompactFactor = StoreParams.SEGMENT_COMPACT_FACTOR_DEFAULT;
        double hashLoadFactor = StoreParams.HASH_LOAD_FACTOR_DEFAULT;
        SegmentFactory segmentFactory = new MappedSegmentFactory();
       
        DataSet<byte[]> store;
        byte[] key = RandomBytes.getBytes(32);
       
        store = StoreFactory.createDynamicDataSet(
View Full Code Here

        int length = 1000 + _rand.nextInt(1000000);
        int batchSize = StoreParams.BATCH_SIZE_DEFAULT;
        int numSyncBatches = StoreParams.NUM_SYNC_BATCHES_DEFAULT;
        int segmentFileSizeMB = StoreParams.SEGMENT_FILE_SIZE_MB_MIN;
        double segmentCompactFactor = StoreParams.SEGMENT_COMPACT_FACTOR_DEFAULT;
        SegmentFactory segmentFactory = new MappedSegmentFactory();
       
        int start = _rand.nextInt(1000000);
        int count = length;
       
        /**
 
View Full Code Here

        int length = 1000 + _rand.nextInt(1000000);
        int batchSize = StoreParams.BATCH_SIZE_DEFAULT;
        int numSyncBatches = StoreParams.NUM_SYNC_BATCHES_DEFAULT;
        int segmentFileSizeMB = StoreParams.SEGMENT_FILE_SIZE_MB_MIN;
        double segmentCompactFactor = StoreParams.SEGMENT_COMPACT_FACTOR_DEFAULT;
        SegmentFactory segmentFactory = new MappedSegmentFactory();
       
        /**
         * StaticArrayStore does not change length after the store has been created.
         */
        ArrayStore store = StoreFactory.createStaticArrayStore(
View Full Code Here

        int initialLength = DynamicConstants.SUB_ARRAY_SIZE << 2;
        int batchSize = StoreParams.BATCH_SIZE_DEFAULT;
        int numSyncBatches = StoreParams.NUM_SYNC_BATCHES_DEFAULT;
        int segmentFileSizeMB = StoreParams.SEGMENT_FILE_SIZE_MB_MIN;
        double segmentCompactFactor = StoreParams.SEGMENT_COMPACT_FACTOR_DEFAULT;
        SegmentFactory segmentFactory = new MappedSegmentFactory();
       
        /**
         * DynamicArrayStore only grows its capacity/length after the store has been created.
         */
        ArrayStore store = StoreFactory.createDynamicArrayStore(
View Full Code Here

        int capacity = 1000 + _rand.nextInt(1000000);
        int batchSize = StoreParams.BATCH_SIZE_DEFAULT;
        int numSyncBatches = StoreParams.NUM_SYNC_BATCHES_DEFAULT;
        int segmentFileSizeMB = StoreParams.SEGMENT_FILE_SIZE_MB_MIN;
        double segmentCompactFactor = StoreParams.SEGMENT_COMPACT_FACTOR_DEFAULT;
        SegmentFactory segmentFactory = new MappedSegmentFactory();

        DataStore<byte[], byte[]> store;
        byte[] key = RandomBytes.getBytes(32);
        byte[] value = RandomBytes.getBytes(1024);
       
View Full Code Here

        int batchSize = StoreParams.BATCH_SIZE_DEFAULT;
        int numSyncBatches = StoreParams.NUM_SYNC_BATCHES_DEFAULT;
        int segmentFileSizeMB = StoreParams.SEGMENT_FILE_SIZE_MB_MIN;
        double segmentCompactFactor = StoreParams.SEGMENT_COMPACT_FACTOR_DEFAULT;
        double hashLoadFactor = StoreParams.HASH_LOAD_FACTOR_DEFAULT;
        SegmentFactory segmentFactory = new MappedSegmentFactory();
       
        DataStore<byte[], byte[]> store;
        byte[] key = RandomBytes.getBytes(32);
        byte[] value = RandomBytes.getBytes(1024);
       
View Full Code Here

TOP

Related Classes of krati.core.segment.SegmentFactory

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.