public class RowColumnSampler extends AbstractHashSampler
init(SamplerConfiguration)
. The following key values are valid options.
If not specified in the options, fields default to false.
To determine what options are valid for hashing see AbstractHashSampler
To configure Accumulo to generate sample data on one thousandth of the column qualifiers, the following SamplerConfiguration could be created and used to configure a table.
new SamplerConfiguration(RowColumnSampler.class.getName()).setOptions(ImmutableMap.of("hasher","murmur3_32","modulus","1009","qualifier","true"))
With this configuration, if a column qualifier is selected then all key values contains that column qualifier will end up in the sample data.
Constructor and Description |
---|
RowColumnSampler() |
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.
|
void |
init(SamplerConfiguration config)
Subclasses with options should override this method and call
super.init(config) . |
protected boolean |
isValidOption(String option)
Subclasses with options should override this method and return true if the option is valid for the subclass or if
super.isValidOption(opt) returns
true. |
accept
protected boolean isValidOption(String option)
AbstractHashSampler
super.isValidOption(opt)
returns
true.isValidOption
in class AbstractHashSampler
public void init(SamplerConfiguration config)
AbstractHashSampler
super.init(config)
.init
in interface Sampler
init
in class AbstractHashSampler
config
- Configuration options for a sampler.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.