Пример #1
0
 /**
  * Flushes the memstore anyway.
  *
  * @throws IOException
  */
 public void flushMemStore() throws IOException {
   MemStoreSnapshot snapshot = memstore.snapshot();
   internalFlushCache(snapshot);
   memstore.clearSnapshot(snapshot.getId());
 }
Пример #2
0
 /**
  * Adds a Cell into the memstore.
  *
  * @param cell The Cell to be added.
  * @throws IOException
  */
 public void addToMemstore(Cell cell) throws IOException {
   memstore.add(cell);
   // flush the memstore if it's full.
   flushMemStoreIfNecessary();
 }
Пример #3
0
 /**
  * Flushes the memstore if the size is large enough.
  *
  * @throws IOException
  */
 private void flushMemStoreIfNecessary() throws IOException {
   if (memstore.heapSize() >= flushSize) {
     flushMemStore();
   }
 }