You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@fluo.apache.org by GitBox <gi...@apache.org> on 2017/10/20 15:07:38 UTC

[GitHub] keith-turner opened a new issue #946: Create a column buffer class for GarbageCollectionIterator

keith-turner opened a new issue #946: Create a column buffer class for GarbageCollectionIterator
URL: https://github.com/apache/fluo/issues/946
 
 
   Fluo has a [GarbageCollectionIterator][1] that cleans up bookkeeping info created by transactions that is no longer needed.  For this iterator to do its job, it must [buffer][2] a row/column in memory.  For this particular case, the row column in each buffered key is always the same.  Therefore it would be more memory efficient to just buffer the timestamp and value.  The could be done by creating a new class like the following and modifying GarbageCollectionIterator to use it.
   
   ```java
   /**
    * This class buffers Keys that all have the same row+column.  Internally it only stores one Key, a list of timestamps and a list of values.  At iteration time it materializes each Key+Value.
    */
   class ColumnBuffer Iterable<KeyValue> {
     /**
      * When empty, the first key added sets the row+column.  After this all keys added must have the same
      * row+column.
      */
     public void add(Key k, Value v);
     Iterator<KeyValue> iterator();
     clear();
   }
   ```
   
   [1]: https://github.com/apache/fluo/blob/rel/fluo-1.1.0-incubating/modules/accumulo/src/main/java/org/apache/fluo/accumulo/iterators/GarbageCollectionIterator.java
   [2]: https://github.com/apache/fluo/blob/rel/fluo-1.1.0-incubating/modules/accumulo/src/main/java/org/apache/fluo/accumulo/iterators/GarbageCollectionIterator.java#L68

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services