public class SpillableProps extends Props
FlowConnector
before creating new Flow
instances.SpillableTupleList
,
SpillableTupleMap
Modifier and Type | Field and Description |
---|---|
static int |
defaultListThreshold |
static int |
defaultMapInitialCapacity |
static float |
defaultMapLoadFactor |
static int |
defaultMapThreshold |
static java.lang.String |
LIST_THRESHOLD
Number of tuples to hold in memory before spilling them to disk.
|
static java.lang.String |
MAP_CAPACITY
The initial hash map capacity.
|
static java.lang.String |
MAP_LOADFACTOR
The initial hash map load factor.
|
static java.lang.String |
MAP_THRESHOLD
The total number of tuple values (not keys) to attempt to keep in memory.
|
static java.lang.String |
SPILL_CODECS
A comma delimited list of possible codecs to try.
|
static java.lang.String |
SPILL_COMPRESS
Whether to enable compression of the spills or not, on by default.
|
Constructor and Description |
---|
SpillableProps() |
Modifier and Type | Method and Description |
---|---|
SpillableProps |
addCodec(java.lang.String codec)
Method addCodec adds a codec class names to use.
|
SpillableProps |
addCodecs(java.util.List<java.lang.String> codecs)
Method addCodecs adds a list of possible codec class names to use.
|
protected void |
addPropertiesTo(java.util.Properties properties) |
java.util.List<java.lang.String> |
getCodecs() |
int |
getListSpillThreshold() |
int |
getMapInitialCapacity() |
float |
getMapLoadFactor() |
int |
getMapSpillThreshold() |
boolean |
isCompressSpill() |
SpillableProps |
setCodecs(java.util.List<java.lang.String> codecs)
Method setCodecs sets list of possible codec class names to use.
|
SpillableProps |
setCompressSpill(boolean compressSpill)
Method setCompressSpill either enables or disables spill compression.
|
SpillableProps |
setListSpillThreshold(int listSpillThreshold)
Method setListSpillThreshold sets the number of tuples to hold in memory before spilling them to disk.
|
SpillableProps |
setMapInitialCapacity(int mapInitialCapacity)
Method setMapInitialCapacity sets the default capacity to be used by the backing Map implementation.
|
SpillableProps |
setMapLoadFactor(float mapLoadFactor)
Method setMapLoadFactor sets the default load factor to be used by the backing Map implementation.
|
SpillableProps |
setMapSpillThreshold(int mapSpillThreshold)
Method setMapSpillThreshold the total number of tuple values (not keys) to attempt to keep in memory.
|
static SpillableProps |
spillableProps()
Creates a new SpillableProps instance.
|
buildProperties, buildProperties, buildProperties, buildProperties, setProperties, setProperties
public static final java.lang.String SPILL_COMPRESS
Boolean.parseBoolean(String)
,
Constant Field Valuespublic static final java.lang.String SPILL_CODECS
public static final java.lang.String LIST_THRESHOLD
public static final java.lang.String MAP_THRESHOLD
public static final java.lang.String MAP_CAPACITY
HashMap
,
Constant Field Valuespublic static final java.lang.String MAP_LOADFACTOR
HashMap
,
Constant Field Valuespublic static final int defaultListThreshold
public static final int defaultMapThreshold
public static final int defaultMapInitialCapacity
public static final float defaultMapLoadFactor
public SpillableProps()
public static SpillableProps spillableProps()
public boolean isCompressSpill()
public SpillableProps setCompressSpill(boolean compressSpill)
setCodecs(java.util.List)
.compressSpill
- type booleanpublic java.util.List<java.lang.String> getCodecs()
public SpillableProps setCodecs(java.util.List<java.lang.String> codecs)
codecs
- type listpublic SpillableProps addCodecs(java.util.List<java.lang.String> codecs)
codecs
- type listpublic SpillableProps addCodec(java.lang.String codec)
codec
- type Stringpublic int getListSpillThreshold()
public SpillableProps setListSpillThreshold(int listSpillThreshold)
listSpillThreshold
- of type intpublic int getMapSpillThreshold()
public SpillableProps setMapSpillThreshold(int mapSpillThreshold)
mapSpillThreshold
- of type intpublic int getMapInitialCapacity()
public SpillableProps setMapInitialCapacity(int mapInitialCapacity)
mapInitialCapacity
- type intpublic float getMapLoadFactor()
public SpillableProps setMapLoadFactor(float mapLoadFactor)
mapLoadFactor
- type floatprotected void addPropertiesTo(java.util.Properties properties)
addPropertiesTo
in class Props
Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.