Class RowColumnSampler
java.lang.Object
org.apache.accumulo.core.client.sample.AbstractHashSampler
org.apache.accumulo.core.client.sample.RowColumnSampler
- All Implemented Interfaces:
- Sampler
This sampler can hash any subset of a Key's fields. The fields that hashed for the sample are
 determined by the configuration options passed in 
init(SamplerConfiguration). The
 following key values are valid options.
 - row=true|false
- family=true|false
- qualifier=true|false
- visibility=true|false
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(
   Map.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.
- Since:
- 1.8.0
- 
Field SummaryFields inherited from class org.apache.accumulo.core.client.sample.AbstractHashSamplerREQUIRED_SAMPLER_OPTIONS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidhash(DataOutput hasher, Key k) Subclass must override this method and hash some portion of the key.voidinit(SamplerConfiguration config) Subclasses with options should override this method and callsuper.init(config).voidvalidateOptions(Map<String, String> config) Subclasses with options should override this method to validate subclass options while also callingsuper.validateOptions(config)to validate base class options.Methods inherited from class org.apache.accumulo.core.client.sample.AbstractHashSampleraccept
- 
Constructor Details- 
RowColumnSamplerpublic RowColumnSampler()
 
- 
- 
Method Details- 
validateOptionsDescription copied from class:AbstractHashSamplerSubclasses with options should override this method to validate subclass options while also callingsuper.validateOptions(config)to validate base class options.- Specified by:
- validateOptionsin interface- Sampler
- Overrides:
- validateOptionsin class- AbstractHashSampler
- Parameters:
- config- Sampler options configuration to validate. Validates option and value.
 
- 
initDescription copied from class:AbstractHashSamplerSubclasses with options should override this method and callsuper.init(config).- Specified by:
- initin interface- Sampler
- Overrides:
- initin class- AbstractHashSampler
- Parameters:
- config- Configuration options for a sampler.
 
- 
hashDescription copied from class:AbstractHashSamplerSubclass must override this method and hash some portion of the key.- Specified by:
- hashin class- AbstractHashSampler
- Parameters:
- hasher- Data written to this will be used to compute the hash for the key.
- Throws:
- IOException
 
 
-