Class RowSampler
- java.lang.Object
-
- org.apache.accumulo.core.client.sample.AbstractHashSampler
-
- org.apache.accumulo.core.client.sample.RowSampler
-
- All Implemented Interfaces:
Sampler
public class RowSampler extends AbstractHashSampler
Builds a sample based on entire rows. If a row is selected for the sample, then all of its columns will be included.To determine what options are valid for hashing see
AbstractHashSampler
. This class offers no addition options, it always hashes on the row.To configure Accumulo to generate sample data on one thousandth of the rows, the following SamplerConfiguration could be created and used to configure a table.
new SamplerConfiguration(RowSampler.class.getName()).setOptions( ImmutableMap.of("hasher","murmur3_32","modulus","1009"));
- Since:
- 1.8.0
-
-
Constructor Summary
Constructors Constructor Description RowSampler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
hash(DataOutput hasher, Key k)
Subclass must override this method and hash some portion of the key.-
Methods inherited from class org.apache.accumulo.core.client.sample.AbstractHashSampler
accept, init, isValidOption
-
-
-
-
Method Detail
-
hash
protected void hash(DataOutput hasher, Key k) throws IOException
Description copied from class:AbstractHashSampler
Subclass must override this method and hash some portion of the key.- Specified by:
hash
in classAbstractHashSampler
- Parameters:
hasher
- Data written to this will be used to compute the hash for the key.- Throws:
IOException
-
-