Package org.apache.hop.execution.sampler
Interface IExecutionDataSampler<Store extends IExecutionDataSamplerStore>
-
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
BasicDataProfilingDataSampler,ExecutionDataSamplerBase,FirstRowsExecutionDataSampler,LastRowsExecutionDataSampler,RandomRowsExecutionDataSampler
public interface IExecutionDataSampler<Store extends IExecutionDataSamplerStore> extends Cloneable
This describes methods for sampling data from
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIExecutionDataSampler.ExecutionDataSamplerObjectFactoryThis object factory is needed to instantiate the correct plugin class based on the value of the Object ID which is simply the object ID.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IExecutionDataSampler<Store>clone()StorecreateSamplerStore(ExecutionDataSamplerMeta samplerMeta)Create a sampler store to match the sampler.StringgetPluginId()StringgetPluginName()voidsampleRow(Store samplerStore, IStream.StreamType streamType, IRowMeta rowMeta, Object[] row)Sample one row in a stream or rows.voidsetPluginId(String pluginId)voidsetPluginName(String pluginName)
-
-
-
Method Detail
-
getPluginId
String getPluginId()
-
setPluginId
void setPluginId(String pluginId)
-
getPluginName
String getPluginName()
-
setPluginName
void setPluginName(String pluginName)
-
clone
IExecutionDataSampler<Store> clone()
-
createSamplerStore
Store createSamplerStore(ExecutionDataSamplerMeta samplerMeta)
Create a sampler store to match the sampler. It will allow you to store your intermediate sampler results.- Parameters:
samplerMeta- Metadata about the transform we're sampling for.- Returns:
- A new sampler store instance.
-
sampleRow
void sampleRow(Store samplerStore, IStream.StreamType streamType, IRowMeta rowMeta, Object[] row) throws HopException
Sample one row in a stream or rows. It's up to the plugin to know what to do with it.- 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- Throws:
HopException
-
-