public class TupleSerializationProps extends Props
FlowConnector
before creating new Flow
instances.
See TupleSerialization
for details on these properties.TupleSerialization
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HADOOP_IO_SERIALIZATIONS |
static java.lang.String |
IGNORE_TYPES |
static java.lang.String |
REQUIRE_TYPES |
static java.lang.String |
SERIALIZATION_COMPARISON_BITWISE_PREVENT |
static java.lang.String |
SERIALIZATION_TOKENS |
Constructor and Description |
---|
TupleSerializationProps() |
Modifier and Type | Method and Description |
---|---|
TupleSerializationProps |
addHadoopSerialization(java.lang.String hadoopSerializationClassName)
Method addHadoopSerialization adds a Hadoop serialization className to be used as properties.
|
TupleSerializationProps |
addHadoopSerializations(java.util.List<java.lang.String> hadoopSerializationClassNames)
Method addHadoopSerializations adds the Hadoop serialization classNames to be used as properties.
|
protected void |
addPropertiesTo(java.util.Properties properties) |
static void |
addSerialization(java.util.Map<java.lang.Object,java.lang.Object> properties,
java.lang.String className)
Adds the given className as a Hadoop IO serialization class.
|
TupleSerializationProps |
addSerializationToken(int token,
java.lang.String serializationClassName)
Method addSerializationToken adds the given integer token and classNames as a serialization properties.
|
static void |
addSerializationToken(java.util.Map<java.lang.Object,java.lang.Object> properties,
int token,
java.lang.String className)
Adds the given token and className pair as a serialization token property.
|
TupleSerializationProps |
addSerializationTokens(java.util.Map<java.lang.Integer,java.lang.String> serializationTokens)
Method addSerializationTokens adds the given integer tokens and classNames Map as a serialization properties.
|
java.util.List<java.lang.String> |
getHadoopSerializations() |
java.lang.Boolean |
getIgnoreTypes() |
boolean |
getPreventBitWiseComparisons() |
java.lang.Boolean |
getRequireTypes() |
java.util.Map<java.lang.Integer,java.lang.String> |
getSerializationTokens() |
static java.lang.String |
getSerializationTokens(java.util.Map<java.lang.Object,java.lang.Object> properties)
Returns the serialization tokens property.
|
TupleSerializationProps |
preventBitWiseComparison(boolean preventBitWiseComparisons)
|
TupleSerializationProps |
setHadoopSerializations(java.util.List<java.lang.String> hadoopSerializationClassNames)
Method setHadoopSerializations sets the Hadoop serialization classNames to be used as properties.
|
TupleSerializationProps |
setIgnoreTypes(java.lang.Boolean ignoreTypes)
Method setIgnoreTypes forces the
TupleSerialization class to ignore any and all
declared types causing the serialization to write each type or SerializationToken
per Tuple element. |
TupleSerializationProps |
setRequireTypes(java.lang.Boolean requireTypes)
Method setRequireTypes forces
TupleSerialization to fail if field types are not declared. |
TupleSerializationProps |
setSerializationTokens(java.util.Map<java.lang.Integer,java.lang.String> serializationTokens)
Method setSerializationTokens sets the given integer tokens and classNames Map as a serialization properties.
|
static TupleSerializationProps |
tupleSerializationProps()
Creates a new TupleSerializationProps instance.
|
buildProperties, buildProperties, buildProperties, buildProperties, setProperties, setProperties
public static final java.lang.String SERIALIZATION_TOKENS
public static final java.lang.String SERIALIZATION_COMPARISON_BITWISE_PREVENT
public static final java.lang.String IGNORE_TYPES
public static final java.lang.String REQUIRE_TYPES
public static final java.lang.String HADOOP_IO_SERIALIZATIONS
public TupleSerializationProps()
public static void addSerializationToken(java.util.Map<java.lang.Object,java.lang.Object> properties, int token, java.lang.String className)
properties
- of type Maptoken
- of type intclassName
- of type Stringpublic static java.lang.String getSerializationTokens(java.util.Map<java.lang.Object,java.lang.Object> properties)
properties
- of type Mappublic static void addSerialization(java.util.Map<java.lang.Object,java.lang.Object> properties, java.lang.String className)
properties
- of type MapclassName
- of type Stringpublic static TupleSerializationProps tupleSerializationProps()
public java.util.Map<java.lang.Integer,java.lang.String> getSerializationTokens()
public TupleSerializationProps setSerializationTokens(java.util.Map<java.lang.Integer,java.lang.String> serializationTokens)
serializationTokens
- Map of Integer tokens and String classnamespublic TupleSerializationProps addSerializationTokens(java.util.Map<java.lang.Integer,java.lang.String> serializationTokens)
serializationTokens
- Map of Integer tokens and String classnamespublic TupleSerializationProps addSerializationToken(int token, java.lang.String serializationClassName)
token
- type intserializationClassName
- type Stringpublic java.util.List<java.lang.String> getHadoopSerializations()
public TupleSerializationProps setHadoopSerializations(java.util.List<java.lang.String> hadoopSerializationClassNames)
hadoopSerializationClassNames
- List of classNamespublic TupleSerializationProps addHadoopSerializations(java.util.List<java.lang.String> hadoopSerializationClassNames)
hadoopSerializationClassNames
- List of classNamespublic TupleSerializationProps addHadoopSerialization(java.lang.String hadoopSerializationClassName)
hadoopSerializationClassName
- List of classNamespublic java.lang.Boolean getIgnoreTypes()
public TupleSerializationProps setIgnoreTypes(java.lang.Boolean ignoreTypes)
TupleSerialization
class to ignore any and all
declared types causing the serialization to write each type or SerializationToken
per Tuple
element.
This disables the declared type optimizations.
See setRequireTypes(Boolean)
to force a failure if field type information is missing.ignoreTypes
- public java.lang.Boolean getRequireTypes()
public TupleSerializationProps setRequireTypes(java.lang.Boolean requireTypes)
TupleSerialization
to fail if field types are not declared.
This ensures the field type optimizations are leveraged.
See setIgnoreTypes(Boolean)
to force field type information to be discarded.requireTypes
- public TupleSerializationProps preventBitWiseComparison(boolean preventBitWiseComparisons)
GroupBy
and CoGroup
).
If natural ordering of grouping/join keys is required, disable bit wise comparisons. They are enabled
by default (subject to the below conditions).
Bit wise comparisons will only apply if the Fields
used in the grouping/join are
declared and no custom Comparator
instances are provided on the grouping/key Fields, or
no secondary sorting is being performed on a GroupBy.preventBitWiseComparisons
- set to true to disable bit wise comparisonspublic boolean getPreventBitWiseComparisons()
protected void addPropertiesTo(java.util.Properties properties)
addPropertiesTo
in class Props
Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.