Examples of ReadOptions


Examples of org.apache.hadoop.io.ReadOptions

    Path p = new Path(fileName);
    for (int pri = 0; pri < 8; pri++) {
      createFile(p, pri);

      ioprioClass = ioprioData = 0;
      ReadOptions options = new ReadOptions();
      options.setIoprio(NativeIO.IOPRIO_CLASS_BE, pri);
      FSDataInputStream in = fs.open(p, 4096, options);

      byte[] buffer = new byte[BLOCK_SIZE];
      in.readFully(buffer);
      if (NativeIO.isAvailable()) {
View Full Code Here

Examples of org.iq80.leveldb.ReadOptions

      }
      try {
         if (stopped) {
            throw new PersistenceException("LevelDB is stopped");
         }
         DBIterator it = db.iterator(new ReadOptions().fillCache(false));
         if (configuration.clearThreshold() <= 0) {
            try {
               for (it.seekToFirst(); it.hasNext(); ) {
                  Map.Entry<byte[], byte[]> entry = it.next();
                  db.delete(entry.getKey());
View Full Code Here

Examples of org.iq80.leveldb.ReadOptions

      }
      try {
         if (stopped) {
            throw new PersistenceException("LevelDB is stopped");
         }
         DBIterator it = db.iterator(new ReadOptions().fillCache(false));
         try {
            for (it.seekToFirst(); it.hasNext(); ) {
               Map.Entry<byte[], byte[]> entry = it.next();
               entries.add(entry);
               if (entries.size() == batchSize) {
View Full Code Here

Examples of org.iq80.leveldb.ReadOptions

            }
         }

         List<Long> times = new ArrayList<Long>();
         List<Object> keys = new ArrayList<Object>();
         DBIterator it = expiredDb.iterator(new ReadOptions().fillCache(false));
         long now = ctx.getTimeService().wallClockTime();
         try {
            for (it.seekToFirst(); it.hasNext();) {
               Map.Entry<byte[], byte[]> entry = it.next();
View Full Code Here

Examples of org.iq80.leveldb.ReadOptions

    @Override
    public byte[] get(byte[] key)
            throws DBException
    {
        return get(key, new ReadOptions());
    }
View Full Code Here

Examples of org.iq80.leveldb.ReadOptions

    }

    @Override
    public SeekingIteratorAdapter iterator()
    {
        return iterator(new ReadOptions());
    }
View Full Code Here

Examples of org.iq80.leveldb.ReadOptions

    }
  }

  @VisibleForTesting
  DBIterator getDbIterator(boolean fillCache) {
    ReadOptions readOptions = new ReadOptions();
    readOptions.fillCache(fillCache);
    return db.iterator(readOptions);
  }
View Full Code Here

Examples of org.iq80.leveldb.ReadOptions

   }

   @Override
   public void clear() {
      long count = 0;
      DBIterator it = db.iterator(new ReadOptions().fillCache(false));
      boolean destroyDatabase = false;

      if (configuration.clearThreshold() <= 0) {
         try {
            for (it.seekToFirst(); it.hasNext();) {
View Full Code Here

Examples of org.iq80.leveldb.ReadOptions

      int batchSize = 100;
      ExecutorAllCompletionService eacs = new ExecutorAllCompletionService(executor);
      final TaskContext taskContext = new TaskContextImpl();

      List<Map.Entry<byte[], byte[]>> entries = new ArrayList<Map.Entry<byte[], byte[]>>(batchSize);
      DBIterator it = db.iterator(new ReadOptions().fillCache(false));
      try {
         for (it.seekToFirst(); it.hasNext();) {
            Map.Entry<byte[], byte[]> entry = it.next();
            entries.add(entry);
            if (entries.size() == batchSize) {
View Full Code Here

Examples of org.iq80.leveldb.ReadOptions

            }
         }

         List<Long> times = new ArrayList<Long>();
         List<Object> keys = new ArrayList<Object>();
         DBIterator it = expiredDb.iterator(new ReadOptions().fillCache(false));
         try {
            for (it.seekToFirst(); it.hasNext();) {
               Map.Entry<byte[], byte[]> entry = it.next();

               Long time = (Long) unmarshall(entry.getKey());
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.