Package org.iq80.leveldb

Examples of org.iq80.leveldb.Options


   public int clearThreshold() {
      return clearThreshold;
   }

   public Options dataDbOptions() {
      Options options = new Options().createIfMissing(true);

      options.compressionType(compressionType);

      if (blockSize != null) {
         options.blockSize(blockSize);
      }

      if (cacheSize != null) {
         options.cacheSize(cacheSize);
      }

      return options;
   }
View Full Code Here


      return options;
   }

   public Options expiredDbOptions() {
      return new Options().createIfMissing(true);
   }
View Full Code Here

   private String getQualifiedExpiredLocation() {
      return configuration.expiredLocation() + sanitizedCacheName();
   }

   private Options dataDbOptions() {
      Options options = new Options().createIfMissing(true);

      options.compressionType(CompressionType.valueOf(configuration.compressionType().name()));

      if (configuration.blockSize() != null) {
         options.blockSize(configuration.blockSize());
      }

      if (configuration.cacheSize() != null) {
         options.cacheSize(configuration.cacheSize());
      }

      return options;
   }
View Full Code Here

      return options;
   }

   private Options expiredDbOptions() {
      return new Options().createIfMissing(true);
   }
View Full Code Here

      return dbFactory.open(dir, options);
   }

   protected void destroyDatabase(String location) throws IOException {
      File dir = new File(location);
      dbFactory.destroy(dir, new Options());
   }
View Full Code Here

    }
   
    @AfterClass
  public static void destroyDB() {
    try {
      Options options = new Options();
      factory.destroy(new File("temp"), options);
    } catch (IOException e) {
      fail("Destroying temp-db failed");
    }
  }
View Full Code Here

  }

  @Override
  @SuppressWarnings("unchecked")
  protected void serviceInit(Configuration conf) throws Exception {
    Options options = new Options();
    options.createIfMissing(true);
    options.cacheSize(conf.getLong(
        YarnConfiguration.TIMELINE_SERVICE_LEVELDB_READ_CACHE_SIZE,
        YarnConfiguration.DEFAULT_TIMELINE_SERVICE_LEVELDB_READ_CACHE_SIZE));
    JniDBFactory factory = new JniDBFactory();
    String path = conf.get(YarnConfiguration.TIMELINE_SERVICE_LEVELDB_PATH);
    File p = new File(path);
View Full Code Here

    private DB openDatabase(String aDirectoryPath) {

        try {
            DBFactory factory = new Iq80DBFactory();

            Options options = new Options();

            options.createIfMissing(true);

            DB db = factory.open(new File(aDirectoryPath), options);

            return db;
View Full Code Here

        try {
            this.setDatabasePath(aDirectoryPath);

            DBFactory factory = new Iq80DBFactory();

            Options options = new Options();

            options.createIfMissing(true);

            this.setDatabase(factory.open(new File(aDirectoryPath), options));

            if (!this.cacheJournalSequence()) {
                this.repair();
View Full Code Here

        }
        File nodeStateDir = _concatAndCreate(metadataRoot, path);
        _verifyDir(metadataRoot, true);

        Iq80DBFactory factory = Iq80DBFactory.factory;
        Options options = new Options();
        options = options
                .createIfMissing(true)
                .logger(_ldbLogger)
                // better safe than sorry, for store data?
                .verifyChecksums(true)
                .cacheSize(NODE_STATE_CACHE_SIZE)
View Full Code Here

TOP

Related Classes of org.iq80.leveldb.Options

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.