keith-turner commented on issue #946: Create a column buffer class for 
GarbageCollectionIterator
URL: https://github.com/apache/fluo/issues/946#issuecomment-338270882
 
 
   @jkosh44  I updated the proposed methods for ColumnBuffer.  The reason I 
changed it is looking at how the GCIter uses `keysFiltered`.  I think these 
methods will better support the filtererKeys case.  Can hopefully replace the 
code at [GarbageCollectionIterator. line 
277](https://github.com/apache/fluo/blob/rel/fluo-1.1.0-incubating/modules/accumulo/src/main/java/org/apache/fluo/accumulo/iterators/GarbageCollectionIterator.java#L277)
 with something like the following.
   
   ```java
   //assume keys and keysFiltered are of type ColumnBuffer
   keys.copyTo(keysFiltered, timestamp -> {
         long colType = timestamp & ColumnConstants.PREFIX_MASK;
         if (colType == ColumnConstants.TX_DONE_PREFIX) {
           return completeTxs.contains(timestamp & 
ColumnConstants.TIMESTAMP_MASK;
         } else {
           return true;
         }
   }
   ```
   
   Also I think the `getKey(int pos)` and `getValue(int pos)` methods can be 
used currently where `get()` is called on the `keysFiltered` List w/o the need 
to create the intermediate `KeyValue` object.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to