public class OperationsParams
extends Configuration
Configuration
which makes it easier to pass around to mappers and reducers. It can be
initialized from a configuration and/or a list of command line arguments.Modifier and Type | Class and Description |
---|---|
static class |
OperationsParams.Direction
Data type for the direction of skyline to compute
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ShapeValueSeparator
Separator between shape type and value
|
Constructor and Description |
---|
OperationsParams() |
OperationsParams(Configuration params,
java.lang.String... additionalArgs)
Initialize the command line arguments from an existing configuration and
a list of additional arguments.
|
OperationsParams(GenericOptionsParser parser) |
OperationsParams(GenericOptionsParser parser,
boolean autodetectShape) |
Modifier and Type | Method and Description |
---|---|
boolean |
autoDetectShape()
Auto detect shape type based on input format
|
boolean |
checkInput()
Checks that there is at least one input path and that all input paths
exist.
|
boolean |
checkInputOutput() |
boolean |
checkInputOutput(boolean outputRequired)
Makes standard checks for input and output files.
|
boolean |
checkOutput() |
void |
clearAllPaths() |
static java.awt.Color |
getColor(Configuration conf,
java.lang.String key,
java.awt.Color defaultValue) |
java.awt.Color |
getColor(java.lang.String key,
java.awt.Color defaultValue) |
static OperationsParams.Direction |
getDirection(Configuration conf,
java.lang.String key,
OperationsParams.Direction defaultDirection) |
OperationsParams.Direction |
getDirection(java.lang.String key,
OperationsParams.Direction defaultDirection) |
static NASAPoint.GradientType |
getGradientType(Configuration conf,
java.lang.String key,
NASAPoint.GradientType defaultValue) |
NASAPoint.GradientType |
getGradientType(java.lang.String key,
NASAPoint.GradientType defaultValue) |
Path |
getInputPath() |
Path[] |
getInputPaths() |
Path |
getOutputPath() |
Path |
getPath() |
Path[] |
getPaths() |
static Path |
getRepartitionJoinIndexPath(Configuration conf,
java.lang.String key) |
static Shape |
getShape(Configuration job,
java.lang.String key) |
static Shape |
getShape(Configuration conf,
java.lang.String key,
Shape defaultValue) |
Shape |
getShape(java.lang.String key) |
Shape |
getShape(java.lang.String key,
Shape defaultValue) |
<S extends Shape> |
getShapes(java.lang.String key,
S stock) |
static long |
getSize(Configuration conf,
java.lang.String key) |
long |
getSize(java.lang.String key) |
long |
getSJMRGridPartitioiningFactor(java.lang.String key) |
static long |
getSJMRPartitioningGrid(Configuration conf,
java.lang.String key) |
static TextSerializable |
getTextSerializable(Configuration conf,
java.lang.String key,
TextSerializable defaultValue) |
void |
initialize(java.lang.String... args) |
boolean |
is(java.lang.String flag) |
boolean |
is(java.lang.String flag,
boolean defaultValue) |
static boolean |
isLocal(JobConf job,
Path... input)
Checks whether the operation should work in local or MapReduce mode.
|
static boolean |
isWildcard(Path path) |
void |
setOutputPath(java.lang.String newPath) |
static void |
setRepartitionJoinIndexPath(Configuration conf,
java.lang.String param,
Path indexPath) |
static void |
setShape(Configuration conf,
java.lang.String param,
Shape shape)
Sets the specified configuration parameter to the current value of the
shape.
|
public static final java.lang.String ShapeValueSeparator
public OperationsParams()
public OperationsParams(GenericOptionsParser parser)
public OperationsParams(GenericOptionsParser parser, boolean autodetectShape)
public OperationsParams(Configuration params, java.lang.String... additionalArgs)
params
- additionalArgs
- public void initialize(java.lang.String... args)
public Path[] getPaths()
public Path getPath()
public Path getOutputPath()
public void setOutputPath(java.lang.String newPath)
public Path getInputPath()
public Path[] getInputPaths()
public boolean is(java.lang.String flag, boolean defaultValue)
public boolean is(java.lang.String flag)
public boolean checkInput() throws java.io.IOException
java.io.IOException
public boolean checkInputOutput() throws java.io.IOException
java.io.IOException
public boolean checkInputOutput(boolean outputRequired) throws java.io.IOException
true
if all checks pass. false
otherwise.java.io.IOException
public boolean checkOutput() throws java.io.IOException
java.io.IOException
public static boolean isWildcard(Path path)
public java.awt.Color getColor(java.lang.String key, java.awt.Color defaultValue)
public static java.awt.Color getColor(Configuration conf, java.lang.String key, java.awt.Color defaultValue)
public Shape getShape(java.lang.String key)
public static Shape getShape(Configuration job, java.lang.String key)
public static TextSerializable getTextSerializable(Configuration conf, java.lang.String key, TextSerializable defaultValue)
public <S extends Shape> S[] getShapes(java.lang.String key, S stock)
public long getSize(java.lang.String key)
public long getSJMRGridPartitioiningFactor(java.lang.String key)
public static void setShape(Configuration conf, java.lang.String param, Shape shape)
SpatialSite.getShape(Configuration, String)
.conf
- param
- shape
- public static long getSize(Configuration conf, java.lang.String key)
public static long getSJMRPartitioningGrid(Configuration conf, java.lang.String key)
public static Path getRepartitionJoinIndexPath(Configuration conf, java.lang.String key)
public static void setRepartitionJoinIndexPath(Configuration conf, java.lang.String param, Path indexPath)
public OperationsParams.Direction getDirection(java.lang.String key, OperationsParams.Direction defaultDirection)
public static OperationsParams.Direction getDirection(Configuration conf, java.lang.String key, OperationsParams.Direction defaultDirection)
public NASAPoint.GradientType getGradientType(java.lang.String key, NASAPoint.GradientType defaultValue)
public static NASAPoint.GradientType getGradientType(Configuration conf, java.lang.String key, NASAPoint.GradientType defaultValue)
public boolean autoDetectShape()
true
if a shape is already present in the
configuration or it is auto detected from input files.
false
if it was not set and could not be detected.public static boolean isLocal(JobConf job, Path... input)
true
to run in local mode, false
to run
in MapReduce mode.public void clearAllPaths()