Class RandomRowsExecutionDataSampler
- java.lang.Object
-
- org.apache.hop.execution.sampler.plugins.ExecutionDataSamplerBase<RandomRowsExecutionDataSamplerStore>
-
- org.apache.hop.execution.sampler.plugins.random.RandomRowsExecutionDataSampler
-
- All Implemented Interfaces:
Cloneable,IExecutionDataSampler<RandomRowsExecutionDataSamplerStore>
@GuiPlugin @ExecutionDataSamplerPlugin(id="RandomRowsExecutionDataSampler", name="Random output rows", description="Do reservoir sampling on the output rows of a transform") public class RandomRowsExecutionDataSampler extends ExecutionDataSamplerBase<RandomRowsExecutionDataSamplerStore> implements IExecutionDataSampler<RandomRowsExecutionDataSamplerStore>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.hop.execution.sampler.IExecutionDataSampler
IExecutionDataSampler.ExecutionDataSamplerObjectFactory
-
-
Field Summary
-
Fields inherited from class org.apache.hop.execution.sampler.plugins.ExecutionDataSamplerBase
pluginId, pluginName, sampleSize
-
-
Constructor Summary
Constructors Constructor Description RandomRowsExecutionDataSampler()RandomRowsExecutionDataSampler(String sampleSize)RandomRowsExecutionDataSampler(RandomRowsExecutionDataSampler sampler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RandomRowsExecutionDataSamplerclone()RandomRowsExecutionDataSamplerStorecreateSamplerStore(ExecutionDataSamplerMeta samplerMeta)Create a sampler store to match the sampler.voidsampleRow(RandomRowsExecutionDataSamplerStore samplerStore, IStream.StreamType streamType, IRowMeta rowMeta, Object[] row)Sample one row in a stream or rows.-
Methods inherited from class org.apache.hop.execution.sampler.plugins.ExecutionDataSamplerBase
equals, getPluginId, getPluginName, getSampleSize, hashCode, setPluginId, setPluginName, setSampleSize
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hop.execution.sampler.IExecutionDataSampler
getPluginId, getPluginName, setPluginId, setPluginName
-
-
-
-
Constructor Detail
-
RandomRowsExecutionDataSampler
public RandomRowsExecutionDataSampler()
-
RandomRowsExecutionDataSampler
public RandomRowsExecutionDataSampler(RandomRowsExecutionDataSampler sampler)
-
RandomRowsExecutionDataSampler
public RandomRowsExecutionDataSampler(String sampleSize)
-
-
Method Detail
-
clone
public RandomRowsExecutionDataSampler clone()
- Specified by:
clonein interfaceIExecutionDataSampler<RandomRowsExecutionDataSamplerStore>- Specified by:
clonein classExecutionDataSamplerBase<RandomRowsExecutionDataSamplerStore>
-
createSamplerStore
public RandomRowsExecutionDataSamplerStore createSamplerStore(ExecutionDataSamplerMeta samplerMeta)
Description copied from interface:IExecutionDataSamplerCreate a sampler store to match the sampler. It will allow you to store your intermediate sampler results.- Specified by:
createSamplerStorein interfaceIExecutionDataSampler<RandomRowsExecutionDataSamplerStore>- Specified by:
createSamplerStorein classExecutionDataSamplerBase<RandomRowsExecutionDataSamplerStore>- Parameters:
samplerMeta- Metadata about the transform we're sampling for.- Returns:
- A new sampler store instance.
-
sampleRow
public void sampleRow(RandomRowsExecutionDataSamplerStore samplerStore, IStream.StreamType streamType, IRowMeta rowMeta, Object[] row)
Description copied from interface:IExecutionDataSamplerSample one row in a stream or rows. It's up to the plugin to know what to do with it.- Specified by:
sampleRowin interfaceIExecutionDataSampler<RandomRowsExecutionDataSamplerStore>- Parameters:
samplerStore- A place to store the samples and intermediate resultsstreamType- The type of stream we're sampling from. (INPUT, OUTPUT, READ, WRITTEN, ...)rowMeta- The row metadatarow- The row data itself
-
-