org.apache.accumulo.examples.simple.filedata
Class ChunkCombiner
java.lang.Object
org.apache.accumulo.examples.simple.filedata.ChunkCombiner
- All Implemented Interfaces:
- SortedKeyValueIterator<Key,Value>
public class ChunkCombiner
- extends Object
- implements SortedKeyValueIterator<Key,Value>
This iterator dedupes chunks and sets their visibilities to the combined visibility of the refs columns. For example, it would combine
row1 refs uid1\0a A&B V0
row1 refs uid2\0b C&D V0
row1 ~chunk 0 A&B V1
row1 ~chunk 0 C&D V1
row1 ~chunk 0 E&F V1
row1 ~chunk 0 G&H V1
into the following
row1 refs uid1\0a A&B V0
row1 refs uid2\0b C&D V0
row1 ~chunk 0 (A&B)|(C&D) V1
VisibilityCombiner is used to combie the visibilities.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChunkCombiner
public ChunkCombiner()
init
public void init(SortedKeyValueIterator<Key,Value> source,
Map<String,String> options,
IteratorEnvironment env)
throws IOException
- Specified by:
init in interface SortedKeyValueIterator<Key,Value>
- Throws:
IOException
hasTop
public boolean hasTop()
- Specified by:
hasTop in interface SortedKeyValueIterator<Key,Value>
next
public void next()
throws IOException
- Specified by:
next in interface SortedKeyValueIterator<Key,Value>
- Throws:
IOException
seek
public void seek(Range range,
Collection<ByteSequence> columnFamilies,
boolean inclusive)
throws IOException
- Specified by:
seek in interface SortedKeyValueIterator<Key,Value>
- Throws:
IOException
getTopKey
public Key getTopKey()
- Specified by:
getTopKey in interface SortedKeyValueIterator<Key,Value>
getTopValue
public Value getTopValue()
- Specified by:
getTopValue in interface SortedKeyValueIterator<Key,Value>
deepCopy
public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
- Specified by:
deepCopy in interface SortedKeyValueIterator<Key,Value>
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.