public class ColumnEncoderRecode extends ColumnEncoder
ColumnEncoder.EncoderType| Modifier and Type | Field and Description |
|---|---|
static boolean |
SORT_RECODE_MAP |
BUILD_ROW_BLOCKS_PER_COLUMN| Constructor and Description |
|---|
ColumnEncoderRecode() |
ColumnEncoderRecode(int colID) |
| Modifier and Type | Method and Description |
|---|---|
void |
build(CacheBlock 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).
|
static String |
constructRecodeMapEntry(String token,
Long code)
Returns the Recode map entry which consists of concatenation of code, delimiter and token.
|
boolean |
equals(Object o) |
Callable<Object> |
getBuildTask(CacheBlock in) |
HashMap<String,Long> |
getCPRecodeMaps() |
HashSet<Object> |
getCPRecodeMapsPartial() |
FrameBlock |
getMetaData(FrameBlock meta)
Construct a frame block out of the transform meta data.
|
int |
getNumDistinctValues() |
Callable<Object> |
getPartialBuildTask(CacheBlock in,
int startRow,
int blockSize,
HashMap<Integer,Object> ret) |
Callable<Object> |
getPartialMergeBuildTask(HashMap<Integer,?> ret) |
HashMap<String,Long> |
getRcdMap() |
int |
hashCode() |
void |
initMetaData(FrameBlock meta)
Construct the recodemaps from the given input frame for all columns registered for recode.
|
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 |
sortCPRecodeMaps() |
static String[] |
splitRecodeMapEntry(String value)
Splits a Recode map entry into its token and code.
|
void |
writeExternal(ObjectOutput out)
Redirects the default java serialization via externalizable to our default hadoop writable serialization for
efficient broadcast/rdd serialization.
|
apply, apply, compareTo, getApplyTasks, getBuildTasks, getColID, getColMapping, getSparseRowsWZeros, isApplicable, isApplicable, setColID, shiftCol, updateIndexRangespublic ColumnEncoderRecode(int colID)
public ColumnEncoderRecode()
public static String constructRecodeMapEntry(String token, Long code)
token - is part of Recode mapcode - is code for tokenpublic static String[] splitRecodeMapEntry(String value)
value - concatenation of token and code with delimiter in betweenpublic void sortCPRecodeMaps()
public void build(CacheBlock in)
Encoderin - input frame blockpublic Callable<Object> getBuildTask(CacheBlock in)
getBuildTask in class ColumnEncoderpublic Callable<Object> getPartialBuildTask(CacheBlock in, int startRow, int blockSize, HashMap<Integer,Object> ret)
getPartialBuildTask in class ColumnEncoderpublic Callable<Object> getPartialMergeBuildTask(HashMap<Integer,?> ret)
getPartialMergeBuildTask in class ColumnEncoderpublic void prepareBuildPartial()
ColumnEncoderprepareBuildPartial in interface EncoderprepareBuildPartial in class ColumnEncoderpublic void buildPartial(FrameBlock in)
ColumnEncoderbuildPartial in interface EncoderbuildPartial in class ColumnEncoderin - input frame blockpublic void mergeAt(ColumnEncoder other)
ColumnEncoderColumnEncoders are compatible with themselves and EncoderComposite is compatible with
every other ColumnEncoders. MultiColumnEncoders are compatible with every encodermergeAt in class ColumnEncoderother - the encoder that should be merged inpublic int getNumDistinctValues()
public FrameBlock getMetaData(FrameBlock meta)
Encodermeta - output frame blockpublic void initMetaData(FrameBlock meta)
meta - frame blockpublic void writeExternal(ObjectOutput out) throws IOException
ColumnEncoderwriteExternal in interface ExternalizablewriteExternal in class ColumnEncoderout - object outputIOException - if IOException occurspublic void readExternal(ObjectInput in) throws IOException
ColumnEncoderreadExternal in interface ExternalizablereadExternal in class ColumnEncoderin - object inputIOException - if IOException occurCopyright © 2021 The Apache Software Foundation. All rights reserved.