public class RowSampler extends AbstractHashSampler
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"))
Constructor and Description |
---|
RowSampler() |
Modifier and Type | Method and Description |
---|---|
protected void |
hash(DataOutput hasher,
Key k)
Subclass must override this method and hash some portion of the key.
|
accept, init, isValidOption
protected void hash(DataOutput hasher, Key k) throws IOException
AbstractHashSampler
hash
in class AbstractHashSampler
hasher
- Data written to this will be used to compute the hash for the key.IOException
Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.