public class VisualizationPartitioner extends org.apache.spark.Partitioner implements Serializable
Modifier and Type | Field and Description |
---|---|
int |
partitionIntervalX
The partition interval Y.
|
int |
partitionIntervalY
The partition interval Y.
|
int |
partitionX
The partition interval Y.
|
int |
partitionY
The partition interval Y.
|
int |
resolutionX
The partition interval Y.
|
int |
resolutionY
The partition interval Y.
|
Constructor and Description |
---|
VisualizationPartitioner(int resolutionX,
int resolutionY,
int partitionX,
int partitionY)
Instantiates a new visualization partitioner.
|
Modifier and Type | Method and Description |
---|---|
scala.Tuple2<Pixel,Double> |
assignPartitionID(scala.Tuple2<Pixel,Double> pixelDoubleTuple2)
Assign partition ID.
|
List<scala.Tuple2<Pixel,Double>> |
assignPartitionIDs(scala.Tuple2<Pixel,Double> pixelDoubleTuple2,
int photoFilterRadius)
Assign partition I ds.
|
static scala.Tuple2<Integer,Integer> |
Calculate2DPartitionId(int resolutionX,
int resolutionY,
int partitionX,
int partitionY,
int coordinateX,
int coordinateY)
Calculate the 2D partition ID, in a
|
static int |
CalculatePartitionId(int resolutionX,
int resolutionY,
int partitionX,
int partitionY,
int coordinateX,
int coordinateY)
Calculate partition id.
|
int |
getPartition(Object key) |
int |
numPartitions() |
public int resolutionX
public int resolutionY
public int partitionX
public int partitionY
public int partitionIntervalX
public int partitionIntervalY
public VisualizationPartitioner(int resolutionX, int resolutionY, int partitionX, int partitionY) throws Exception
resolutionX
- the resolution XresolutionY
- the resolution YpartitionX
- the partition XpartitionY
- the partition YException
- the exceptionpublic static int CalculatePartitionId(int resolutionX, int resolutionY, int partitionX, int partitionY, int coordinateX, int coordinateY)
resolutionX
- the resolution XresolutionY
- the resolution YpartitionX
- the partition XpartitionY
- the partition YcoordinateX
- the coordinate XcoordinateY
- the coordinate Ypublic static scala.Tuple2<Integer,Integer> Calculate2DPartitionId(int resolutionX, int resolutionY, int partitionX, int partitionY, int coordinateX, int coordinateY)
resolutionX
- resolutionY
- partitionX
- partitionY
- coordinateX
- coordinateY
- public int getPartition(Object key)
getPartition
in class org.apache.spark.Partitioner
public int numPartitions()
numPartitions
in class org.apache.spark.Partitioner
public List<scala.Tuple2<Pixel,Double>> assignPartitionIDs(scala.Tuple2<Pixel,Double> pixelDoubleTuple2, int photoFilterRadius)
pixelDoubleTuple2
- the pixel double tuple 2photoFilterRadius
- the photo filter radiusCopyright © 2025 The Apache Software Foundation. All rights reserved.