def test_split_points(self):
    num_records = 12000
    sync_interval = 16000
    file_name = self._write_data(count=num_records, sync_interval=sync_interval)
    source = _create_avro_source(file_name, use_fastavro=self.use_fastavro)
    splits = [split for split in source.split(desired_bundle_size=float('inf'))]
    assert (len(splits) == 1)
    range_tracker = splits[0].source.get_range_tracker(splits[0].start_position, splits[0].stop_position)
    split_points_report = []
    for _ in splits[0].source.read(range_tracker):
        split_points_report.append(range_tracker.split_points())
    num_blocks = int(math.ceil(((14.5 * num_records) / sync_interval)))
    assert (num_blocks > 1)
    self.assertEqual(split_points_report[:10], ([(0, iobase.RangeTracker.SPLIT_POINTS_UNKNOWN)] * 10))
    self.assertEqual(split_points_report[(- 10):], ([((num_blocks - 1), 1)] * 10))
def test_split_points(self):
    num_records = 12000
    sync_interval = 16000
    file_name = self._write_data(count=num_records, sync_interval=sync_interval)
    source = _create_avro_source(file_name, use_fastavro=self.use_fastavro)
    splits = [split for split in source.split(desired_bundle_size=float('inf'))]
    assert (len(splits) == 1)
    range_tracker = splits[0].source.get_range_tracker(splits[0].start_position, splits[0].stop_position)
    split_points_report = []
    for _ in splits[0].source.read(range_tracker):
        split_points_report.append(range_tracker.split_points())
    num_blocks = int(math.ceil(((14.5 * num_records) / sync_interval)))
    assert (num_blocks > 1)
    self.assertEqual(split_points_report[:10], ([(0, iobase.RangeTracker.SPLIT_POINTS_UNKNOWN)] * 10))
    self.assertEqual(split_points_report[(- 10):], ([((num_blocks - 1), 1)] * 10))