public class SpatialIndexInputFormat extends org.apache.hadoop.mapred.SequenceFileInputFormat<org.apache.hadoop.io.Text,RecordInfo>
RTreeWritable
value.SpatialOperationConfig
.SpatialOperationConfig
can be configured to be used only by this InputFormat by calling setFilterSpatialOperationConfig(SpatialOperationConfig, Configuration)
.SpatialOperation.AnyInteract
will be performed taking as query window the boundaries defined in the SpatialConfig
(if any).Modifier and Type | Class and Description |
---|---|
class |
SpatialIndexInputFormat.SpatialIndexRecordReader
Reads records from a spatial index split
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONF_DEFAULT_FILTER_OPERATION
Default spatial operation to be performed when there is not a
SpatialOperationConfig set. |
static java.lang.String |
CONF_NON_GEODETIC_FILTER
Boolean job configuration value.
|
protected static java.lang.String[] |
SPATIAL_OP_LU_CHAIN |
static java.lang.String |
TAG_SPATIAL_INDEX_SPATIAL_OP_CONFIG
Tag used to identify an InputFormat-specific
SpatialOperationConfig in a job's configuration. |
Constructor and Description |
---|
SpatialIndexInputFormat() |
Modifier and Type | Method and Description |
---|---|
static SpatialOperationConfig |
getFilterSpatialOperationConfig(org.apache.hadoop.conf.Configuration conf)
Gets the
SpatialOperationConfig used to filter records for the given job's configuration. |
static SpatialOperationConfig |
getFilterSpatialOperationConfig(java.lang.Integer dataSetId, org.apache.hadoop.conf.Configuration conf)
Gets the
SpatialOperationConfig used to filter records for the given job's configuration and data set. |
org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,RecordInfo> |
getRecordReader(org.apache.hadoop.mapred.InputSplit split, org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.mapred.Reporter reporter) |
static void |
setFilterSpatialOperationConfig(SpatialOperationConfig spatialOpConf, org.apache.hadoop.conf.Configuration conf)
Sets an input-format specific
SpatialOperationConfig . |
static void |
setFilterSpatialOperationConfig(SpatialOperationConfig spatialOpConf, java.lang.Integer dataSetId, org.apache.hadoop.conf.Configuration conf)
Sets an input-format-dataset specific
SpatialOperationConfig . |
public static final java.lang.String TAG_SPATIAL_INDEX_SPATIAL_OP_CONFIG
SpatialOperationConfig
in a job's configuration.public static final java.lang.String CONF_NON_GEODETIC_FILTER
public static final java.lang.String CONF_DEFAULT_FILTER_OPERATION
SpatialOperationConfig
set.protected static final java.lang.String[] SPATIAL_OP_LU_CHAIN
public static void setFilterSpatialOperationConfig(SpatialOperationConfig spatialOpConf, org.apache.hadoop.conf.Configuration conf)
SpatialOperationConfig
.spatialOpConf
- a spatial operation configuration defining how the data should be spatially filtered.conf
- the job's configuration.public static void setFilterSpatialOperationConfig(SpatialOperationConfig spatialOpConf, java.lang.Integer dataSetId, org.apache.hadoop.conf.Configuration conf)
SpatialOperationConfig
. Used when there are multiple input data sets that use SpatialIndexInputFormat with different filter requirements.spatialOpConf
- a spatial operation configuration defining how the data should be spatially filtered.dataSetId
- the data set id as assigned by MultipleInputsConfig
conf
- the job's configurationpublic static SpatialOperationConfig getFilterSpatialOperationConfig(org.apache.hadoop.conf.Configuration conf)
SpatialOperationConfig
used to filter records for the given job's configuration.conf
- the job configuration.SpatialOperationConfig
instancepublic static SpatialOperationConfig getFilterSpatialOperationConfig(java.lang.Integer dataSetId, org.apache.hadoop.conf.Configuration conf)
SpatialOperationConfig
used to filter records for the given job's configuration and data set.dataSetId
- the data set id as assigned by MultipleInputsConfig
conf
- the job configurationSpatialOperationConfig
instancepublic org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,RecordInfo> getRecordReader(org.apache.hadoop.mapred.InputSplit split, org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.mapred.Reporter reporter) throws java.io.IOException
getRecordReader
in interface org.apache.hadoop.mapred.InputFormat<org.apache.hadoop.io.Text,RecordInfo>
getRecordReader
in class org.apache.hadoop.mapred.SequenceFileInputFormat<org.apache.hadoop.io.Text,RecordInfo>
java.io.IOException
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.