public abstract class ColumnEncoder extends Object implements Externalizable, Encoder, Comparable<ColumnEncoder>
| Modifier and Type | Class and Description |
|---|---|
static class |
ColumnEncoder.EncoderType |
| Modifier and Type | Field and Description |
|---|---|
static int |
BUILD_ROW_BLOCKS_PER_COLUMN |
| Modifier and Type | Method and Description |
|---|---|
MatrixBlock |
apply(CacheBlock in,
MatrixBlock out,
int outputCol)
Apply Functions are only used in Single Threaded or Multi-Threaded Dense context.
|
MatrixBlock |
apply(CacheBlock in,
MatrixBlock out,
int outputCol,
int rowStart,
int blk) |
void |
buildPartial(FrameBlock in)
Partial build of internal data structures (e.g., in distributed spark operations).
|
int |
compareTo(ColumnEncoder o) |
List<DependencyTask<?>> |
getApplyTasks(CacheBlock in,
MatrixBlock out,
int outputCol) |
Callable<Object> |
getBuildTask(CacheBlock in) |
List<DependencyTask<?>> |
getBuildTasks(CacheBlock in) |
int |
getColID() |
MatrixBlock |
getColMapping(FrameBlock meta)
Obtain the column mapping of encoded frames based on the passed meta data frame.
|
Callable<Object> |
getPartialBuildTask(CacheBlock in,
int startRow,
int blockSize,
HashMap<Integer,Object> ret) |
Callable<Object> |
getPartialMergeBuildTask(HashMap<Integer,?> ret) |
Set<Integer> |
getSparseRowsWZeros() |
boolean |
isApplicable()
Indicates if this encoder is applicable, i.e, if there is a column to encode.
|
boolean |
isApplicable(int colID)
Indicates if this encoder is applicable for the given column ID, i.e., if it is subject to this transformation.
|
void |
mergeAt(ColumnEncoder other)
Merges another encoder, of a compatible type, in after a certain position.
|
void |
prepareBuildPartial()
Allocates internal data structures for partial build.
|
void |
readExternal(ObjectInput in)
Redirects the default java serialization via externalizable to our default hadoop writable serialization for
efficient broadcast/rdd deserialization.
|
void |
setColID(int colID) |
void |
shiftCol(int columnOffset) |
void |
updateIndexRanges(long[] beginDims,
long[] endDims,
int colOffset)
Update index-ranges to after encoding.
|
void |
writeExternal(ObjectOutput os)
Redirects the default java serialization via externalizable to our default hadoop writable serialization for
efficient broadcast/rdd serialization.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuild, getMetaData, initMetaDatapublic MatrixBlock apply(CacheBlock in, MatrixBlock out, int outputCol)
public MatrixBlock apply(CacheBlock in, MatrixBlock out, int outputCol, int rowStart, int blk)
public boolean isApplicable()
public boolean isApplicable(int colID)
colID - column IDpublic void prepareBuildPartial()
prepareBuildPartial in interface Encoderpublic void buildPartial(FrameBlock in)
buildPartial in interface Encoderin - input frame blockpublic void mergeAt(ColumnEncoder other)
ColumnEncoders are compatible with themselves and EncoderComposite is compatible with
every other ColumnEncoders. MultiColumnEncoders are compatible with every encoderother - the encoder that should be merged inpublic void updateIndexRanges(long[] beginDims,
long[] endDims,
int colOffset)
updateIndexRanges in interface EncoderbeginDims - begin dimensions of rangeendDims - end dimensions of rangecolOffset - is applied to begin and endDimspublic MatrixBlock getColMapping(FrameBlock meta)
meta - meta data frame blockpublic void writeExternal(ObjectOutput os) throws IOException
writeExternal in interface Externalizableos - object outputIOException - if IOException occurspublic void readExternal(ObjectInput in) throws IOException
readExternal in interface Externalizablein - object inputIOException - if IOException occurpublic int getColID()
public void setColID(int colID)
public void shiftCol(int columnOffset)
public int compareTo(ColumnEncoder o)
compareTo in interface Comparable<ColumnEncoder>public List<DependencyTask<?>> getBuildTasks(CacheBlock in)
public Callable<Object> getBuildTask(CacheBlock in)
public Callable<Object> getPartialBuildTask(CacheBlock in, int startRow, int blockSize, HashMap<Integer,Object> ret)
public List<DependencyTask<?>> getApplyTasks(CacheBlock in, MatrixBlock out, int outputCol)
Copyright © 2021 The Apache Software Foundation. All rights reserved.