Interface Encoder
- 
- All Superinterfaces:
- Externalizable,- Serializable
 - All Known Implementing Classes:
- ColumnEncoder,- ColumnEncoderBin,- ColumnEncoderComposite,- ColumnEncoderDummycode,- ColumnEncoderFeatureHash,- ColumnEncoderPassThrough,- ColumnEncoderRecode,- ColumnEncoderUDF,- MultiColumnEncoder
 
 public interface Encoder extends Externalizable 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidallocateMetaData(FrameBlock meta)Pre-allocate a FrameBlock for metadata collection.MatrixBlockapply(CacheBlock in, MatrixBlock out, int outputCol)Apply the generated metadata to the FrameBlock and saved the result in out.voidbuild(CacheBlock in)Build the transform meta data for the given block input.voidbuildPartial(FrameBlock in)Partial build of internal data structures (e.g., in distributed spark operations).FrameBlockgetMetaData(FrameBlock out)Construct a frame block out of the transform meta data.voidinitMetaData(FrameBlock meta)Sets up the required meta data for a subsequent call to apply.voidprepareBuildPartial()Allocates internal data structures for partial build.voidupdateIndexRanges(long[] beginDims, long[] endDims, int offset)Update index-ranges to after encoding.- 
Methods inherited from interface java.io.ExternalizablereadExternal, writeExternal
 
- 
 
- 
- 
- 
Method Detail- 
buildvoid build(CacheBlock in) Build the transform meta data for the given block input. This call modifies and keeps meta data as encoder state.- Parameters:
- in- input frame block
 
 - 
applyMatrixBlock apply(CacheBlock in, MatrixBlock out, int outputCol) Apply the generated metadata to the FrameBlock and saved the result in out.- Parameters:
- in- input frame block
- out- output matrix block
- outputCol- is a offset in the output matrix. column in FrameBlock + outputCol = column in out
- Returns:
- output matrix block
 
 - 
allocateMetaDatavoid allocateMetaData(FrameBlock meta) Pre-allocate a FrameBlock for metadata collection.- Parameters:
- meta- frame block
 
 - 
getMetaDataFrameBlock getMetaData(FrameBlock out) Construct a frame block out of the transform meta data.- Parameters:
- out- output frame block
- Returns:
- output frame block?
 
 - 
initMetaDatavoid initMetaData(FrameBlock meta) Sets up the required meta data for a subsequent call to apply.- Parameters:
- meta- frame block
 
 - 
prepareBuildPartialvoid prepareBuildPartial() Allocates internal data structures for partial build.
 - 
buildPartialvoid buildPartial(FrameBlock in) Partial build of internal data structures (e.g., in distributed spark operations).- Parameters:
- in- input frame block
 
 - 
updateIndexRangesvoid updateIndexRanges(long[] beginDims, long[] endDims, int offset)Update index-ranges to after encoding. Note that only Dummycoding changes the ranges.- Parameters:
- beginDims- begin dimensions of range
- endDims- end dimensions of range
- offset- is applied to begin and endDims
 
 
- 
 
-