Class RowSampler
java.lang.Object
org.apache.accumulo.core.client.sample.AbstractHashSampler
org.apache.accumulo.core.client.sample.RowSampler
- All Implemented Interfaces:
Sampler
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
-
Constructor Details
-
RowSampler
public RowSampler()
-
-
Method Details
-
hash
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
-