Examples of StoreConfig


Examples of com.sleepycat.persist.StoreConfig

    }
   
    public EntityStore openMetaDiskStore() throws DatabaseException {
        assertState(STATE.initialized);
       
        StoreConfig storeConfig = new StoreConfig();
        storeConfig.setAllowCreate(true);
        storeConfig.setDeferredWrite(true);
        storeConfig.setTransactional(false);

        ClassLoader originalClassloader = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
            return new EntityStore(dbufferEnv, META_DATABASE_NAME, storeConfig);
View Full Code Here

Examples of com.sleepycat.persist.StoreConfig

    }

    public EntityStore openDiskStore(String dbName) throws DatabaseException {
        assertState(STATE.initialized);
       
        StoreConfig storeConfig = new StoreConfig();
        storeConfig.setAllowCreate(true);
        storeConfig.setDeferredWrite(true);
        storeConfig.setTransactional(false);

        EntityStore store = new EntityStore(dbufferEnv, dbName, storeConfig);
        openStores.add(store);
        return store;
    }
View Full Code Here

Examples of com.sleepycat.persist.StoreConfig

     */
    public DefaultStatisticsService(String environmentFile) throws DatabaseException {
        log.info("Initializing statistics storage...");

        EnvironmentConfig environmentConfig = new EnvironmentConfig();
        StoreConfig storeConfig = new StoreConfig();

        environmentConfig.setAllowCreate(true);
        environmentConfig.setTransactional(false);
        environmentConfig.setLocking(false);
        environmentConfig.setCachePercent(50);

        storeConfig.setAllowCreate(true);
        storeConfig.setTransactional(false);
        storeConfig.setTemporary(true);

        File envFile = new File(environmentFile);
        if (envFile.exists()) {
            log.info("Environment is already exists");
            try {
View Full Code Here

Examples of com.sleepycat.persist.StoreConfig

     */
    public BerkleyQueue(String environmentFile) throws DatabaseException {
        log.info("Initializing queue repository");

        EnvironmentConfig environmentConfig = new EnvironmentConfig();
        StoreConfig storeConfig = new StoreConfig();

        environmentConfig.setAllowCreate(true);
        environmentConfig.setTransactional(false);
        environmentConfig.setLocking(false);
        environmentConfig.setCachePercent(5);

        storeConfig.setAllowCreate(true);
        storeConfig.setTransactional(false);
        storeConfig.setTemporary(true);

        File envFile = new File(environmentFile);
        if (envFile.exists()) {
            log.info("Environment is already exists");
            try {
View Full Code Here

Examples of krati.core.StoreConfig

                                            HashFunction<byte[]> hashFunction, Serializer<K> keySerializer, Serializer<V> valueSerializer) {
        DataStore<K, V> result = null;
        File homeDir = new File(path);
        homeDir.mkdirs();
        try {
            StoreConfig storeConfig = new StoreConfig(homeDir, initialCapacity);
            storeConfig.setSegmentFactory(segmentFactory);
            storeConfig.setHashFunction(hashFunction);
            storeConfig.setSegmentFileSizeMB(segmentFileSize);
            DataStore<byte[], byte[]> dynamicDataStore = new DynamicDataStore(storeConfig);
            result = new SerializableObjectStore<K, V>(dynamicDataStore, keySerializer, valueSerializer);
        } catch (Exception e) {
            throw new RuntimeCamelException("Failed to create Krati DataStore.", e);
        }
View Full Code Here

Examples of krati.core.StoreConfig

                                            HashFunction<byte[]> hashFunction, Serializer<K> keySerializer, Serializer<V> valueSerializer) {
        DataStore<K, V> result = null;
        File homeDir = new File(path);
        homeDir.mkdirs();
        try {
            StoreConfig storeConfig = new StoreConfig(homeDir, initialCapacity);
            storeConfig.setSegmentFactory(segmentFactory);
            storeConfig.setHashFunction(hashFunction);
            storeConfig.setSegmentFileSizeMB(segmentFileSize);
            DataStore<byte[], byte[]> dynamicDataStore = new DynamicDataStore(storeConfig);
            result = new SerializableObjectStore<K, V>(dynamicDataStore, keySerializer, valueSerializer);
        } catch (Exception e) {
            throw new RuntimeCamelException("Failed to create Krati DataStore.", e);
        }
View Full Code Here

Examples of krati.core.StoreConfig

    this.mainArray.expandCapacity(length - 1);
   
    final int segmentFileSizeMB = 64;
    final File bytesDBHomeDir = new File(homeDir, "BytesDB");
   
    StoreConfig config = new StoreConfig(bytesDBHomeDir, length);
    config.setBatchSize(batchSize);
    config.setNumSyncBatches(numSyncBatches);
    config.setSegmentFileSizeMB(segmentFileSizeMB);
    config.setSegmentFactory(segmentFactory);
    this.internalDB = new BytesDB(config);
  }
View Full Code Here

Examples of krati.core.StoreConfig

    protected SegmentFactory createSegmentFactory() {
        return new krati.core.segment.MemorySegmentFactory();
    }
   
    protected DataStore<byte[], byte[]> createDataStore(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.createStaticDataStore(config);
    }
View Full Code Here

Examples of org.apache.pig.StoreConfig

  @Override
  public void commit(Configuration conf) throws IOException {
    try {
      JobConf job = new JobConf(conf);
      StoreConfig storeConfig = MapRedUtil.getStoreConfig(job);
      BasicTable.Writer write = new BasicTable.Writer(new Path(storeConfig.getLocation()), job);
      write.close();
    } catch (IOException ee) {
      throw ee;
    }
  }
View Full Code Here

Examples of org.apache.pig.StoreConfig

*
*/
class TableOutputFormat implements OutputFormat<BytesWritable, Tuple> {
  @Override
  public void checkOutputSpecs(FileSystem ignored, JobConf job) throws IOException {
    StoreConfig storeConfig = MapRedUtil.getStoreConfig(job);
    String location = storeConfig.getLocation(), schemaStr;
    Schema schema = storeConfig.getSchema();
    org.apache.pig.SortInfo pigSortInfo = storeConfig.getSortInfo();

    /* TODO
     * use a home-brewn comparator ??
     */
    String comparator = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.