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 String |
HADOOP_IO_SERIALIZATIONS |
static String |
IGNORE_TYPES |
static String |
REQUIRE_TYPES |
static String |
SERIALIZATION_COMPARISON_BITWISE_PREVENT |
static String |
SERIALIZATION_TOKENS |
Constructor and Description |
---|
TupleSerializationProps() |
Modifier and Type | Method and Description |
---|---|
TupleSerializationProps |
addHadoopSerialization(String hadoopSerializationClassName)
Method addHadoopSerialization adds a Hadoop serialization className to be used as properties.
|
TupleSerializationProps |
addHadoopSerializations(List<String> hadoopSerializationClassNames)
Method addHadoopSerializations adds the Hadoop serialization classNames to be used as properties.
|
protected void |
addPropertiesTo(Properties properties) |
static void |
addSerialization(Map<Object,Object> properties,
String className)
Adds the given className as a Hadoop IO serialization class.
|
TupleSerializationProps |
addSerializationToken(int token,
String serializationClassName)
Method addSerializationToken adds the given integer token and classNames as a serialization properties.
|
static void |
addSerializationToken(Map<Object,Object> properties,
int token,
String className)
Adds the given token and className pair as a serialization token property.
|
TupleSerializationProps |
addSerializationTokens(Map<Integer,String> serializationTokens)
Method addSerializationTokens adds the given integer tokens and classNames Map as a serialization properties.
|
List<String> |
getHadoopSerializations() |
Boolean |
getIgnoreTypes() |
boolean |
getPreventBitWiseComparisons() |
Boolean |
getRequireTypes() |
Map<Integer,String> |
getSerializationTokens() |
static String |
getSerializationTokens(Map<Object,Object> properties)
Returns the serialization tokens property.
|
TupleSerializationProps |
preventBitWiseComparison(boolean preventBitWiseComparisons)
|
TupleSerializationProps |
setHadoopSerializations(List<String> hadoopSerializationClassNames)
Method setHadoopSerializations sets the Hadoop serialization classNames to be used as properties.
|
TupleSerializationProps |
setIgnoreTypes(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(Boolean requireTypes)
Method setRequireTypes forces
TupleSerialization to fail if field types are not declared. |
TupleSerializationProps |
setSerializationTokens(Map<Integer,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 String SERIALIZATION_TOKENS
public static final String SERIALIZATION_COMPARISON_BITWISE_PREVENT
public static final String IGNORE_TYPES
public static final String REQUIRE_TYPES
public static final String HADOOP_IO_SERIALIZATIONS
public TupleSerializationProps()
public static void addSerializationToken(Map<Object,Object> properties, int token, String className)
properties
- of type Maptoken
- of type intclassName
- of type Stringpublic static String getSerializationTokens(Map<Object,Object> properties)
properties
- of type Mappublic static void addSerialization(Map<Object,Object> properties, String className)
properties
- of type MapclassName
- of type Stringpublic static TupleSerializationProps tupleSerializationProps()
public Map<Integer,String> getSerializationTokens()
public TupleSerializationProps setSerializationTokens(Map<Integer,String> serializationTokens)
serializationTokens
- Map of Integer tokens and String classnamespublic TupleSerializationProps addSerializationTokens(Map<Integer,String> serializationTokens)
serializationTokens
- Map of Integer tokens and String classnamespublic TupleSerializationProps addSerializationToken(int token, String serializationClassName)
token
- type intserializationClassName
- type Stringpublic List<String> getHadoopSerializations()
public TupleSerializationProps setHadoopSerializations(List<String> hadoopSerializationClassNames)
hadoopSerializationClassNames
- List of classNamespublic TupleSerializationProps addHadoopSerializations(List<String> hadoopSerializationClassNames)
hadoopSerializationClassNames
- List of classNamespublic TupleSerializationProps addHadoopSerialization(String hadoopSerializationClassName)
hadoopSerializationClassName
- List of classNamespublic Boolean getIgnoreTypes()
public TupleSerializationProps setIgnoreTypes(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 Boolean getRequireTypes()
public TupleSerializationProps setRequireTypes(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(Properties properties)
addPropertiesTo
in class Props
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.