Package krati.core.segment

Examples of krati.core.segment.MappedSegmentFactory


        super.setUp();
        File storeDir = TestUtils.createTempDir();
        storeDir.mkdirs();
        storeDir.deleteOnExit();
        this.store = new KratiStorageEngine("storeName",
                                            new MappedSegmentFactory(),
                                            10,
                                            10,
                                            0.75,
                                            0,
                                            storeDir);
View Full Code Here


    /**
     * Configure source NetworkTypeahead
     */
    config = TypeaheadConfigFactory.createNetworkTypeaheadConfig(sourceProperties);
    config.setElementStoreCached(false); // disable cache to bypass serialization
    config.setElementStoreSegmentFactory(new MappedSegmentFactory());
    config.setConnectionsStoreSegmentFactory(new MappedSegmentFactory());
    initializer = new VanillaNetworkTypeaheadInitializer<TypeaheadElement>(config);
   
    VanillaNetworkTypeahead<TypeaheadElement> sourceTypeahead =
      (VanillaNetworkTypeahead<TypeaheadElement>) initializer.getTypeahead();
    long sourceLoadTime = c.tick();
   
    /**
     * Configure target NetworkTypeahead
     */
    config = TypeaheadConfigFactory.createNetworkTypeaheadConfig(targetProperties);
    config.setElementStoreCached(false); // disable cache to bypass serialization
    config.setElementStoreSegmentFactory(new MappedSegmentFactory());
    config.setConnectionsStoreSegmentFactory(new WriteBufferSegmentFactory(config.getConnectionsStoreSegmentMB()));
    initializer = new VanillaNetworkTypeaheadInitializer<TypeaheadElement>(config);
   
    VanillaNetworkTypeahead<TypeaheadElement> targetTypeahead =
      (VanillaNetworkTypeahead<TypeaheadElement>) initializer.getTypeahead();
View Full Code Here

    /**
     * Configure source NetworkTypeahead
     */
    config = TypeaheadConfigFactory.createNetworkTypeaheadConfig(sourceProperties);
    config.setElementStoreCached(false); // disable cache to bypass serialization
    config.setElementStoreSegmentFactory(new MappedSegmentFactory());
    config.setConnectionsStoreSegmentFactory(new MappedSegmentFactory());
    initializer = new WeightedNetworkTypeaheadInitializer<TypeaheadElement>(config);
   
    WeightedNetworkTypeahead<TypeaheadElement> sourceTypeahead =
      (WeightedNetworkTypeahead<TypeaheadElement>) initializer.getTypeahead();
    long sourceLoadTime = c.tick();
   
    /**
     * Configure target NetworkTypeahead
     */
    config = TypeaheadConfigFactory.createNetworkTypeaheadConfig(targetProperties);
    config.setElementStoreCached(false); // disable cache to bypass serialization
    config.setElementStoreSegmentFactory(new MappedSegmentFactory());
    config.setConnectionsStoreSegmentFactory(new WriteBufferSegmentFactory(config.getConnectionsStoreSegmentMB()));
    initializer = new WeightedNetworkTypeaheadInitializer<TypeaheadElement>(config);
   
    WeightedNetworkTypeahead<TypeaheadElement> targetTypeahead =
      (WeightedNetworkTypeahead<TypeaheadElement>) initializer.getTypeahead();
View Full Code Here

  public KratiArrayStoreIntsScan(int length,
                                 int batchSize,
                                 int numSyncBatches,
                                 String homeDirectoryStr) throws Exception {
    arrayStore =
      new KratiArrayStore(length, batchSize, numSyncBatches, homeDirectoryStr, new MappedSegmentFactory());
  }
View Full Code Here

                                 int numSyncBatches,
                                 String store1HomeDirectory,
                                 String store2HomeDirectory)
  throws Exception {
    arrayStore1 =
      new KratiArrayStore(length, batchSize, numSyncBatches, store1HomeDirectory, new MappedSegmentFactory());
    arrayStore2 =
      new KratiArrayStore(length, batchSize, numSyncBatches, store2HomeDirectory, new MappedSegmentFactory());
  }
View Full Code Here

                idStart,
                idCount,
                100,                    /* batchSize */
                5,                      /* numSyncBatches */
                homeDir,
                new MappedSegmentFactory(),
                Segment.minSegmentFileSizeMB,
                false);
    }
View Full Code Here

                homeDir,
                10000, /* capacity */
                100,   /* batchSize */
                5,     /* numSyncBatches */
                32,    /* segmentFileSizeMB */
                new MappedSegmentFactory());
    }
View Full Code Here

   
    public static void main(String[] args) {
        final int initSizeMB = 2048;
       
        try {
            SegmentPerf sp = new SegmentPerf(new MappedSegmentFactory(), "test/test_data/segs", initSizeMB);
            if (sp.getSegmentCount() == 0) {
                sp.testAppend(sp.getSegment(0));
                sp.testRead(sp.getSegment(0));
            }
View Full Code Here

        return new DynamicDataArray(
                _rand.nextInt(1 << 20), /* length */
                100,                    /* batchSize */
                5,                      /* numSyncBatches */
                homeDir,
                new MappedSegmentFactory(),
                Segment.minSegmentFileSizeMB,
                Segment.defaultSegmentCompactFactor);
    }
View Full Code Here

        return new StaticDataArray(
                _rand.nextInt(1 << 20), /* length */
                100,                    /* batchSize */
                5,                      /* numSyncBatches */
                homeDir,
                new MappedSegmentFactory(),
                Segment.minSegmentFileSizeMB,
                Segment.defaultSegmentCompactFactor);
    }
View Full Code Here

TOP

Related Classes of krati.core.segment.MappedSegmentFactory

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.