@Test public void test_3_partitions() { final int numPartitions = 3; assertEquals(0, isinPartitioner.getPartition(new LongWritable(10001L), null, numPartitions)); assertEquals(1, isinPartitioner.getPartition(new LongWritable(100020002L), null, numPartitions)); assertEquals(2, isinPartitioner.getPartition(new LongWritable(200030003L), null, numPartitions)); assertEquals(0, isinPartitioner.getPartition(new LongWritable(300040004L), null, numPartitions)); assertEquals(1, isinPartitioner.getPartition(new LongWritable(160400050005L), null, numPartitions)); assertEquals(2, isinPartitioner.getPartition(new LongWritable(160500060006L), null, numPartitions)); assertEquals(0, isinPartitioner.getPartition(new LongWritable(160600070007L), null, numPartitions)); }
@Override public int getPartition(LongWritable binIndex, L3SpatialBin spatialBin, int numPartitions) { long idx = binIndex.get(); final IsinPoint isinPoint = IsinPlanetaryGrid.toIsinPoint(idx); return (isinPoint.getTile_line() * NUM_TILE_COLUMNS + isinPoint.getTile_col()) % numPartitions; }
IsinPartitioner extends Partitioner<LongWritable, L3SpatialBin> implements Configurable { @Override public int getPartition(LongWritable binIndex, L3SpatialBin spatialBin, int numPartitions) { long idx = binIndex.get(); final IsinPoint isinPoint = IsinPlanetaryGrid.toIsinPoint(idx); return (isinPoint.getTile_line() * NUM_TILE_COLUMNS + isinPoint.getTile_col()) % numPartitions; } }
IsinPartitioner extends Partitioner<LongWritable, L3SpatialBin> implements Configurable { @Override public int getPartition(LongWritable binIndex, L3SpatialBin spatialBin, int numPartitions) { long idx = binIndex.get(); final IsinPoint isinPoint = IsinPlanetaryGrid.toIsinPoint(idx); return (isinPoint.getTile_line() * NUM_TILE_COLUMNS + isinPoint.getTile_col()) % numPartitions; }  }
IsinPartitioner extends Partitioner<LongWritable, L3SpatialBin> implements Configurable { @Override public int getPartition(LongWritable binIndex, L3SpatialBin spatialBin, int numPartitions) { long idx = binIndex.get(); final IsinPoint isinPoint = IsinPlanetaryGrid.toIsinPoint(idx); return (isinPoint.getTile_line() * NUM_TILE_COLUMNS + isinPoint.getTile_col()) % numPartitions; }  @Override int getPartition(LongWritable binIndex, L3SpatialBin spatialBin, int numPartitions); @Override void setConf(Configuration conf); @Override Configuration getConf(); }
IsinPartitioner extends Partitioner<LongWritable, L3SpatialBin> implements Configurable { @Override public int getPartition(LongWritable binIndex, L3SpatialBin spatialBin, int numPartitions) { long idx = binIndex.get(); final IsinPoint isinPoint = IsinPlanetaryGrid.toIsinPoint(idx); return (isinPoint.getTile_line() * NUM_TILE_COLUMNS + isinPoint.getTile_col()) % numPartitions; }  @Override int getPartition(LongWritable binIndex, L3SpatialBin spatialBin, int numPartitions); @Override void setConf(Configuration conf); @Override Configuration getConf();  }