K
-V
-
public class SpatialJavaPairRDD<K,V>
extends org.apache.spark.api.java.JavaPairRDD<K,V>
SpatialJavaRDD
. This class accepts only SparkRecordInfoProvider
instances of type Tuple2<K,V>.Modifier and Type | Method and Description |
---|---|
SpatialTransformationContext<scala.Tuple2<K,V>> |
createSpatialTransformationContext()
Creates an instance of
SpatialTransformationContext |
SpatialTransformationContext<scala.Tuple2<K,V>> |
createSpatialTransformationContext(SpatialOperationConfig spatialOperationConf)
Creates an instance of
SpatialTransformationContext associated to the given SpatialOperationConfig . |
SpatialJavaPairRDD<K,V> |
filter(org.apache.spark.api.java.function.Function<scala.Tuple2<K,V>,java.lang.Boolean> f, SpatialOperationConfig spatialOpConf)
Returns a new spatial RDD containing only the elements that satisfy both, the filtering lambda function and the spatial operation
|
<R> org.apache.spark.api.java.JavaRDD<R> |
flatMap(org.apache.spark.api.java.function.FlatMapFunction<scala.Tuple2<K,V>,R> f, SpatialOperationConfig spatialOpConf)
Returns a new RDD by first spatially filtering the RDD elements using the spatial operation given by spatialOpConf, a function is applied to all the remaining elements.
|
static <K,V> SpatialJavaPairRDD<K,V> |
fromJavaPairRDD(org.apache.spark.api.java.JavaPairRDD<K,V> rdd, SparkRecordInfoProvider<scala.Tuple2<K,V>> recordInfoProvider, java.lang.Class<K> keyType, java.lang.Class<V> valType)
Creates a new spatial RDD from an existing JavaPairRDD
|
java.lang.Class<K> |
getKeyType()
Gets the type of the RDD's keys
|
double[] |
getMBR()
Gets the minimum bounding rectangle of the RDD
|
SparkRecordInfoProvider<scala.Tuple2<K,V>> |
getRecordInfoProvider()
Gets the RDD's
SparkRecordInfoProvider instance |
java.lang.Class<V> |
getValueType()
Gets the type of the RDD's values
|
java.util.List<scala.Tuple2<java.lang.Double,scala.Tuple2<K,V>>> |
nearestNeighbors(oracle.spatial.geometry.JGeometry qryWindow, int k, double tol)
Returns the k elements which are closest to the given query window
|
aggregate, aggregateByKey, aggregateByKey, aggregateByKey, cache, cartesian, checkpoint, classTag, coalesce, coalesce, cogroup, cogroup, cogroup, cogroup, cogroup, cogroup, cogroup, cogroup, cogroup, collect, collectAsMap, collectAsync, collectPartitions, combineByKey, combineByKey, combineByKey, context, count, countApprox, countApprox, countApproxDistinct, countApproxDistinctByKey, countApproxDistinctByKey, countApproxDistinctByKey, countAsync, countByKey, countByKeyApprox, countByKeyApprox, countByKeyApprox$default$2, countByValue, countByValueApprox, countByValueApprox, distinct, distinct, filter, first, flatMap, flatMapToDouble, flatMapToPair, flatMapValues, fold, foldByKey, foldByKey, foldByKey, foreach, foreachAsync, foreachPartition, foreachPartitionAsync, fromJavaRDD, fromRDD, fullOuterJoin, fullOuterJoin, fullOuterJoin, getCheckpointFile, getStorageLevel, glom, groupBy, groupBy, groupByKey, groupByKey, groupByKey, groupWith, groupWith, groupWith, id, intersection, isCheckpointed, isEmpty, iterator, join, join, join, kClassTag, keyBy, keys, leftOuterJoin, leftOuterJoin, leftOuterJoin, lookup, map, mapPartitions, mapPartitions, mapPartitionsToDouble, mapPartitionsToDouble, mapPartitionsToPair, mapPartitionsToPair, mapPartitionsWithIndex, mapPartitionsWithIndex$default$2, mapToDouble, mapToPair, mapValues, max, min, name, partitionBy, partitions, persist, pipe, pipe, pipe, rdd, reduce, reduceByKey, reduceByKey, reduceByKey, reduceByKeyLocally, repartition, repartitionAndSortWithinPartitions, repartitionAndSortWithinPartitions, rightOuterJoin, rightOuterJoin, rightOuterJoin, sample, sample, sampleByKey, sampleByKey, sampleByKeyExact, sampleByKeyExact, saveAsHadoopDataset, saveAsHadoopFile, saveAsHadoopFile, saveAsHadoopFile, saveAsNewAPIHadoopDataset, saveAsNewAPIHadoopFile, saveAsNewAPIHadoopFile, saveAsObjectFile, saveAsTextFile, saveAsTextFile, setName, sortByKey, sortByKey, sortByKey, sortByKey, sortByKey, sortByKey, splits, subtract, subtract, subtract, subtractByKey, subtractByKey, subtractByKey, take, takeAsync, takeOrdered, takeOrdered, takeSample, takeSample, toArray, toDebugString, toLocalIterator, top, top, toRDD, treeAggregate, treeAggregate, treeReduce, treeReduce, union, unpersist, unpersist, values, vClassTag, wrapRDD, zip, zipPartitions, zipWithIndex, zipWithUniqueId
public static <K,V> SpatialJavaPairRDD<K,V> fromJavaPairRDD(org.apache.spark.api.java.JavaPairRDD<K,V> rdd, SparkRecordInfoProvider<scala.Tuple2<K,V>> recordInfoProvider, java.lang.Class<K> keyType, java.lang.Class<V> valType)
rdd
- the source RDDrecordInfoProvider
- an instance of SparkRecordInfoProvider
used to extract spatial information from the RDD's keys and valueskeyType
- the type of the source RDD keysvalType
- the type of the source RDD valuespublic SparkRecordInfoProvider<scala.Tuple2<K,V>> getRecordInfoProvider()
SparkRecordInfoProvider
instanceSparkRecordInfoProvider
instancepublic java.lang.Class<K> getKeyType()
public java.lang.Class<V> getValueType()
public SpatialTransformationContext<scala.Tuple2<K,V>> createSpatialTransformationContext(SpatialOperationConfig spatialOperationConf)
SpatialTransformationContext
associated to the given SpatialOperationConfig
.spatialOperationConf
- a spatial operation used to filter recordsSpatialTransformationContext
public SpatialTransformationContext<scala.Tuple2<K,V>> createSpatialTransformationContext()
SpatialTransformationContext
SpatialTransformationContext
public SpatialJavaPairRDD<K,V> filter(org.apache.spark.api.java.function.Function<scala.Tuple2<K,V>,java.lang.Boolean> f, SpatialOperationConfig spatialOpConf)
f
- a filtering lambda functionspatialOpConf
- a spatial operation used to filter recordsSpatialJavaRDD
public <R> org.apache.spark.api.java.JavaRDD<R> flatMap(org.apache.spark.api.java.function.FlatMapFunction<scala.Tuple2<K,V>,R> f, SpatialOperationConfig spatialOpConf)
f
- a function to apply to each elementspatialOpConf
- a spatial operation used to filter recordspublic java.util.List<scala.Tuple2<java.lang.Double,scala.Tuple2<K,V>>> nearestNeighbors(oracle.spatial.geometry.JGeometry qryWindow, int k, double tol)
qryWindow
- a geometry from where the nearest neighbors will be calculatedk
- the number of neighborstol
- the tolerance usedpublic double[] getMBR()
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.