예제 #1
0
 def prepare_rdd(self, object_rdd: SpatialRDD, window_rdd: SpatialRDD,
                 grid_type: GridType):
     object_rdd.analyze()
     window_rdd.analyze()
     object_rdd.rawSpatialRDD.repartition(4)
     object_rdd.spatialPartitioning(grid_type)
     object_rdd.buildIndex(IndexType.RTREE, True)
     window_rdd.spatialPartitioning(object_rdd.getPartitioner())
예제 #2
0
    def compare_spatial_rdd(self, spatial_rdd: SpatialRDD, envelope: Envelope) -> bool:

        spatial_rdd.analyze()

        assert input_count == spatial_rdd.approximateTotalCount
        assert envelope == spatial_rdd.boundaryEnvelope

        return True
예제 #3
0
 def compare_count(self, spatial_rdd: SpatialRDD, cnt: int,
                   envelope: Envelope):
     spatial_rdd.analyze()
     assert cnt == spatial_rdd.approximateTotalCount
     assert envelope == spatial_rdd.boundaryEnvelope