public abstract class ColumnEncoder extends Object implements Externalizable, Encoder, Comparable<ColumnEncoder>
Modifier and Type | Class and Description |
---|---|
static class |
ColumnEncoder.EncoderType |
Modifier and Type | Method and Description |
---|---|
abstract MatrixBlock |
apply(FrameBlock in,
MatrixBlock out,
int outputCol,
int rowStart,
int blk) |
abstract MatrixBlock |
apply(MatrixBlock in,
MatrixBlock out,
int outputCol) |
abstract MatrixBlock |
apply(MatrixBlock 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) |
int |
getColID() |
MatrixBlock |
getColMapping(FrameBlock meta)
Obtain the column mapping of encoded frames based on the passed meta data frame.
|
abstract List<Callable<Object>> |
getPartialBuildTasks(FrameBlock in,
int blockSize) |
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.
|
abstract void |
mergeBuildPartial(List<Future<Object>> futurePartials,
int start,
int end) |
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, wait
apply, build, getMetaData, initMetaData
public abstract MatrixBlock apply(MatrixBlock in, MatrixBlock out, int outputCol)
public abstract MatrixBlock apply(MatrixBlock in, MatrixBlock out, int outputCol, int rowStart, int blk)
public abstract MatrixBlock apply(FrameBlock 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 Encoder
public void buildPartial(FrameBlock in)
buildPartial
in interface Encoder
in
- 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 Encoder
beginDims
- 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 Externalizable
os
- object outputIOException
- if IOException occurspublic void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
in
- 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 abstract List<Callable<Object>> getPartialBuildTasks(FrameBlock in, int blockSize)
public abstract void mergeBuildPartial(List<Future<Object>> futurePartials, int start, int end) throws ExecutionException, InterruptedException
Copyright © 2021 The Apache Software Foundation. All rights reserved.