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, updateIndexRanges
public 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)
Encoder
in
- input frame blockpublic Callable<Object> getBuildTask(CacheBlock in)
getBuildTask
in class ColumnEncoder
public Callable<Object> getPartialBuildTask(CacheBlock in, int startRow, int blockSize, HashMap<Integer,Object> ret)
getPartialBuildTask
in class ColumnEncoder
public Callable<Object> getPartialMergeBuildTask(HashMap<Integer,?> ret)
getPartialMergeBuildTask
in class ColumnEncoder
public void prepareBuildPartial()
ColumnEncoder
prepareBuildPartial
in interface Encoder
prepareBuildPartial
in class ColumnEncoder
public void buildPartial(FrameBlock in)
ColumnEncoder
buildPartial
in interface Encoder
buildPartial
in class ColumnEncoder
in
- input frame blockpublic void mergeAt(ColumnEncoder other)
ColumnEncoder
ColumnEncoders
are compatible with themselves and EncoderComposite
is compatible with
every other ColumnEncoders
. MultiColumnEncoders
are compatible with every encodermergeAt
in class ColumnEncoder
other
- the encoder that should be merged inpublic int getNumDistinctValues()
public FrameBlock getMetaData(FrameBlock meta)
Encoder
meta
- output frame blockpublic void initMetaData(FrameBlock meta)
meta
- frame blockpublic void writeExternal(ObjectOutput out) throws IOException
ColumnEncoder
writeExternal
in interface Externalizable
writeExternal
in class ColumnEncoder
out
- object outputIOException
- if IOException occurspublic void readExternal(ObjectInput in) throws IOException
ColumnEncoder
readExternal
in interface Externalizable
readExternal
in class ColumnEncoder
in
- object inputIOException
- if IOException occurCopyright © 2021 The Apache Software Foundation. All rights reserved.