public interface Sampler
Since the decisions that Sampler makes are persisted, the behavior of a Sampler for a given configuration should always be the same. One way to offer a new behavior is to offer new options, while still supporting old behavior with a Samplers existing options.
Ideally a sampler that selects a Key k1 would also select updates for k1. For example if a
Sampler selects :
row='000989' family='name' qualifier='last' visibility='ADMIN' time=9 value='Doe'
, it
would be nice if it also selected :
row='000989' family='name' qualifier='last' visibility='ADMIN' time=20 value='Dough'
.
Using hash and modulo on the key fields is a good way to accomplish this and
AbstractHashSampler
provides a good basis for implementation.
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Key k) |
void |
init(SamplerConfiguration config)
An implementation of Sampler must have a noarg constructor.
|
void init(SamplerConfiguration config)
config
- Configuration options for a sampler.boolean accept(Key k)
k
- A key that was written to a rfile.Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.