public abstract class LegacyEncoder extends Object implements Externalizable
| Modifier and Type | Method and Description | 
|---|---|
abstract MatrixBlock | 
apply(FrameBlock in,
     MatrixBlock out)
Encode input data blockwise according to existing transform meta data (transform apply). 
 | 
abstract void | 
build(FrameBlock in)
Build the transform meta data for the given block input. 
 | 
void | 
buildPartial(FrameBlock in)
Partial build of internal data structures (e.g., in distributed spark operations). 
 | 
abstract MatrixBlock | 
encode(FrameBlock in,
      MatrixBlock out)
Block encode: build and apply (transform encode). 
 | 
int[] | 
getColList()  | 
MatrixBlock | 
getColMapping(FrameBlock meta,
             MatrixBlock out)
Obtain the column mapping of encoded frames based on the passed meta data frame. 
 | 
abstract FrameBlock | 
getMetaData(FrameBlock out)
Construct a frame block out of the transform meta data. 
 | 
int | 
initColList(int[] colList)  | 
int | 
initColList(org.apache.wink.json4j.JSONArray attrs)  | 
abstract void | 
initMetaData(FrameBlock meta)
Sets up the required meta data for a subsequent call to apply. 
 | 
boolean | 
isApplicable()
Indicates if this encoder is applicable, i.e, if there is at least one column to encode. 
 | 
int | 
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(LegacyEncoder other,
       int row,
       int col)
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 | 
setColList(int[] colList)  | 
void | 
shiftCols(int offset)  | 
LegacyEncoder | 
subRangeEncoder(IndexRange ixRange)
Returns a new Encoder that only handles a sub range of columns. 
 | 
void | 
updateIndexRanges(long[] beginDims,
                 long[] endDims)
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. 
 | 
public int[] getColList()
public void setColList(int[] colList)
public int initColList(org.apache.wink.json4j.JSONArray attrs)
public int initColList(int[] colList)
public boolean isApplicable()
public int isApplicable(int colID)
colID - column IDpublic abstract MatrixBlock encode(FrameBlock in, MatrixBlock out)
in - input frame blockout - output matrix blockpublic abstract void build(FrameBlock in)
in - input frame blockpublic void prepareBuildPartial()
public void buildPartial(FrameBlock in)
in - input frame blockpublic abstract MatrixBlock apply(FrameBlock in, MatrixBlock out)
in - input frame blockout - output matrix blockpublic LegacyEncoder subRangeEncoder(IndexRange ixRange)
ixRange - the range (1-based, begin inclusive, end exclusive)public void mergeAt(LegacyEncoder other, int row, int col)
Encoders are compatible with themselves and EncoderComposite is compatible with every
 other Encoder.other - the encoder that should be merged inrow - the row where it should be placed (1-based)col - the col where it should be placed (1-based)public void updateIndexRanges(long[] beginDims,
                              long[] endDims)
beginDims - begin dimensions of rangeendDims - end dimensions of rangepublic abstract FrameBlock getMetaData(FrameBlock out)
out - output frame blockpublic abstract void initMetaData(FrameBlock meta)
meta - frame blockpublic MatrixBlock getColMapping(FrameBlock meta, MatrixBlock out)
meta - meta data frame blockout - output matrixpublic 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 void shiftCols(int offset)
Copyright © 2021 The Apache Software Foundation. All rights reserved.