|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcascading.property.Props
cascading.tap.hadoop.HfsProps
public class HfsProps
Class HfsProps is a fluent helper for setting various Hadoop FS level properties that some
Flow
may or may not be required to have set. These properties are typically passed to a Flow
via a FlowConnector
.
Field Summary | |
---|---|
static String |
COMBINE_INPUT_FILES
Field COMBINE_INPUT_FILES |
static String |
COMBINE_INPUT_FILES_SAFE_MODE
Field COMBINE_INPUT_FILES_SAFEMODE |
static String |
COMBINE_INPUT_FILES_SIZE_MAX
Field COMBINE_INPUT_FILES_SIZE_MAX |
protected Long |
combinedInputMaxSize
|
protected Boolean |
combinedInputSafeMode
|
static String |
LOCAL_MODE_SCHEME
Fields LOCAL_MODE_SCHEME * |
protected String |
localModeScheme
|
static String |
TEMPORARY_DIRECTORY
Field TEMPORARY_DIRECTORY |
protected String |
temporaryDirectory
|
protected Boolean |
useCombinedInput
|
Constructor Summary | |
---|---|
HfsProps()
|
Method Summary | |
---|---|
protected void |
addPropertiesTo(Properties properties)
|
Long |
getCombinedInputMaxSize()
|
String |
getLocalModeScheme()
|
String |
getTemporaryDirectory()
|
static HfsProps |
hfsProps()
Creates a new HfsProps instance. |
boolean |
isUseCombinedInput()
|
boolean |
isUseCombinedInputSafeMode()
|
HfsProps |
setCombinedInputMaxSize(long combinedInputMaxSize)
Method setCombinedInputMaxSize sets the maximum input split size to be used. |
static void |
setCombinedInputMaxSize(Map<Object,Object> properties,
Long size)
Method setCombinedInputMaxSize sets the maximum input split size to be used. |
static void |
setLocalModeScheme(Map<Object,Object> properties,
String scheme)
Method setLocalModeScheme provides a means to change the scheme value used to detect when a MapReduce job should be run in Hadoop local mode. |
HfsProps |
setLocalModeScheme(String localModeScheme)
Method setLocalModeScheme provides a means to change the scheme value used to detect when a MapReduce job should be run in Hadoop local mode. |
static void |
setTemporaryDirectory(Map<Object,Object> properties,
String temporaryDirectory)
Method setTemporaryDirectory sets the temporary directory on the given properties object. |
HfsProps |
setTemporaryDirectory(String temporaryDirectory)
Method setTemporaryDirectory sets the temporary directory for use on the underlying filesystem. |
HfsProps |
setUseCombinedInput(boolean useCombinedInput)
Method setUseCombinedInput provides a means to indicate whether to leverage CombineFileInputFormat for the input format. |
static void |
setUseCombinedInput(Map<Object,Object> properties,
Boolean combine)
Method setUseCombinedInput provides a means to indicate whether to leverage CombineFileInputFormat for the input format. |
HfsProps |
setUseCombinedInputSafeMode(boolean combinedInputSafeMode)
Method setUseCombinedInputSafeMode toggles safe mode when using CombineFileInputFormat . |
static void |
setUseCombinedInputSafeMode(Map<Object,Object> properties,
Boolean safeMode)
Method setUseCombinedInputSafeMode toggles safe mode when using CombineFileInputFormat . |
Methods inherited from class cascading.property.Props |
---|
buildProperties, buildProperties, buildProperties, buildProperties, setProperties, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TEMPORARY_DIRECTORY
public static final String LOCAL_MODE_SCHEME
public static final String COMBINE_INPUT_FILES
public static final String COMBINE_INPUT_FILES_SAFE_MODE
public static final String COMBINE_INPUT_FILES_SIZE_MAX
protected String temporaryDirectory
protected String localModeScheme
protected Boolean useCombinedInput
protected Long combinedInputMaxSize
protected Boolean combinedInputSafeMode
Constructor Detail |
---|
public HfsProps()
Method Detail |
---|
public static void setTemporaryDirectory(Map<Object,Object> properties, String temporaryDirectory)
properties
- of type Mappublic static void setLocalModeScheme(Map<Object,Object> properties, String scheme)
"file"
, set to
"none"
to disable entirely.
properties
- of type Mappublic static void setUseCombinedInput(Map<Object,Object> properties, Boolean combine)
CombineFileInputFormat
for the input format. By default it is false.
Use setCombinedInputMaxSize(long)
to set the max split/combined input size. Other specific
properties must be specified directly if needed. Specifically "mapred.min.split.size.per.node" and
"mapred.min.split.size.per.rack", which are 0 by default.
properties
- of type Mappublic static void setUseCombinedInputSafeMode(Map<Object,Object> properties, Boolean safeMode)
CombineFileInputFormat
. Safe mode will throw an exception if the underlying
InputFormat is not of type FileInputFormat
. If safeMode is off a warning will
be logged instead. safeMode is on by default.
Setting this property when not setting setUseCombinedInput(boolean)
to true has no effect.
properties
- of type Mappublic static void setCombinedInputMaxSize(Map<Object,Object> properties, Long size)
properties
- of type Mappublic static HfsProps hfsProps()
public String getTemporaryDirectory()
public HfsProps setTemporaryDirectory(String temporaryDirectory)
temporaryDirectory
- of type String
public String getLocalModeScheme()
public HfsProps setLocalModeScheme(String localModeScheme)
"file"
, set to
"none"
to disable entirely.
localModeScheme
- of type String
public boolean isUseCombinedInput()
public HfsProps setUseCombinedInput(boolean useCombinedInput)
CombineFileInputFormat
for the input format. By default it is false.
useCombinedInput
- boolean
public Long getCombinedInputMaxSize()
public HfsProps setCombinedInputMaxSize(long combinedInputMaxSize)
setUseCombinedInput(boolean)
is true
.
combinedInputMaxSize
- of type long
public boolean isUseCombinedInputSafeMode()
public HfsProps setUseCombinedInputSafeMode(boolean combinedInputSafeMode)
CombineFileInputFormat
. Safe mode will throw an exception if the underlying
InputFormat is not of type FileInputFormat
. If safeMode is off a warning will
be logged instead. safeMode is on by default.
Setting this property when not setting setUseCombinedInput(boolean)
to true has no effect.
combinedInputSafeMode
- boolean
protected void addPropertiesTo(Properties properties)
addPropertiesTo
in class Props
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |