コード例 #1
0
ファイル: avroio_test.py プロジェクト: zhoufek/beam
 def test_read_reantrant_with_splitting(self):
   file_name = self._write_data()
   source = _create_avro_source(file_name)
   splits = [split for split in source.split(desired_bundle_size=100000)]
   assert len(splits) == 1
   source_test_utils.assert_reentrant_reads_succeed(
       (splits[0].source, splits[0].start_position, splits[0].stop_position))
コード例 #2
0
 def test_read_reentrant_without_splitting(self):
     with TempDir() as tempdir:
         file_name = self._create_temp_vcf_file(
             _SAMPLE_HEADER_LINES + _SAMPLE_TEXT_LINES, tempdir)
         source = VcfSource(file_name)
         source_test_utils.assert_reentrant_reads_succeed(
             (source, None, None))
コード例 #3
0
ファイル: avroio_test.py プロジェクト: JavierRoger/beam
 def test_read_reantrant_with_splitting(self):
   file_name = self._write_data()
   source = AvroSource(file_name)
   splits = [
       split for split in source.split(desired_bundle_size=100000)]
   assert len(splits) == 1
   source_test_utils.assert_reentrant_reads_succeed(
       (splits[0].source, splits[0].start_position, splits[0].stop_position))
コード例 #4
0
 def test_read_reentrant_after_splitting(self):
   with TempDir() as tempdir:
     file_name = self._create_temp_vcf_file(_SAMPLE_HEADER_LINES +
                                            _SAMPLE_TEXT_LINES, tempdir)
     source = VcfSource(file_name)
     splits = [split for split in source.split(desired_bundle_size=100000)]
     assert len(splits) == 1
     source_test_utils.assert_reentrant_reads_succeed(
         (splits[0].source, splits[0].start_position, splits[0].stop_position))
コード例 #5
0
ファイル: textio_test.py プロジェクト: dpmills/incubator-beam
 def test_read_reentrant_after_splitting(self):
   file_name, expected_data = write_data(10)
   assert len(expected_data) == 10
   source = TextSource(file_name, 0, CompressionTypes.UNCOMPRESSED, True,
                       coders.StrUtf8Coder())
   splits = list(source.split(desired_bundle_size=100000))
   assert len(splits) == 1
   source_test_utils.assert_reentrant_reads_succeed(
       (splits[0].source, splits[0].start_position, splits[0].stop_position))
コード例 #6
0
 def test_read_reentrant_after_splitting(self):
   file_name, expected_data = write_data(10)
   assert len(expected_data) == 10
   source = TextSource(file_name, 0, CompressionTypes.UNCOMPRESSED, True,
                       coders.StrUtf8Coder())
   splits = list(source.split(desired_bundle_size=100000))
   assert len(splits) == 1
   source_test_utils.assert_reentrant_reads_succeed(
       (splits[0].source, splits[0].start_position, splits[0].stop_position))
コード例 #7
0
 def test_read_reentrant_after_splitting(self):
   with TempDir() as tempdir:
     file_name = self._create_temp_vcf_file(
         _SAMPLE_HEADER_LINES + _SAMPLE_TEXT_LINES, tempdir)
     source = VcfSource(file_name)
     splits = list(split for split in source.split(desired_bundle_size=100000))
     assert len(splits) == 1
     source_test_utils.assert_reentrant_reads_succeed(
         (splits[0].source, splits[0].start_position, splits[0].stop_position))
コード例 #8
0
 def test_read_reentrant_without_splitting(self):
   file_name, expected_data = write_data(10)
   assert len(expected_data) == 10
   source = TextSource(
       file_name,
       0,
       CompressionTypes.UNCOMPRESSED,
       True,
       coders.StrUtf8Coder())
   source_test_utils.assert_reentrant_reads_succeed((source, None, None))
コード例 #9
0
ファイル: textio_test.py プロジェクト: dpmills/incubator-beam
 def test_read_reentrant_without_splitting(self):
   file_name, expected_data = write_data(10)
   assert len(expected_data) == 10
   source = TextSource(file_name, 0, CompressionTypes.UNCOMPRESSED, True,
                       coders.StrUtf8Coder())
   source_test_utils.assert_reentrant_reads_succeed((source, None, None))
コード例 #10
0
ファイル: create_test.py プロジェクト: vikkyrk/incubator-beam
 def test_create_source_read_reentrant_with_initial_splits(self):
   source = Create._create_source_from_iterable(range(24), self.coder)
   for split in source.split(desired_bundle_size=5):
     source_test_utils.assert_reentrant_reads_succeed((split.source,
                                                       split.start_position,
                                                       split.stop_position))
コード例 #11
0
ファイル: create_test.py プロジェクト: vikkyrk/incubator-beam
 def test_create_source_read_reentrant(self):
   source = Create._create_source_from_iterable(range(9), self.coder)
   source_test_utils.assert_reentrant_reads_succeed((source, None, None))
コード例 #12
0
ファイル: parquetio_test.py プロジェクト: SofyanS/CH_redact
 def test_read_reentrant(self):
     file_name = self._write_data(count=6, row_group_size=3)
     source = _create_parquet_source(file_name)
     source_test_utils.assert_reentrant_reads_succeed((source, None, None))
コード例 #13
0
 def test_read_reentrant_without_splitting(self):
   file_name = self._write_data()
   source = _create_avro_source(file_name, use_fastavro=self.use_fastavro)
   source_test_utils.assert_reentrant_reads_succeed((source, None, None))
コード例 #14
0
 def test_read_reentrant_without_splitting(self):
   file_name = self._write_data()
   source = _create_avro_source(file_name, use_fastavro=self.use_fastavro)
   source_test_utils.assert_reentrant_reads_succeed((source, None, None))
コード例 #15
0
ファイル: avroio_test.py プロジェクト: JavierRoger/beam
 def test_read_reentrant_without_splitting(self):
   file_name = self._write_data()
   source = AvroSource(file_name)
   source_test_utils.assert_reentrant_reads_succeed((source, None, None))
コード例 #16
0
 def test_read_reentrant_without_splitting(self):
   with TempDir() as tempdir:
     file_name = self._create_temp_vcf_file(_SAMPLE_HEADER_LINES +
                                            _SAMPLE_TEXT_LINES, tempdir)
     source = VcfSource(file_name)
     source_test_utils.assert_reentrant_reads_succeed((source, None, None))
コード例 #17
0
ファイル: create_test.py プロジェクト: Sil1991/gcpdf-demo
 def test_create_source_read_reentrant_with_initial_splits(self):
     source = Create._create_source_from_iterable(range(24), self.coder)
     for split in source.split(desired_bundle_size=5):
         source_test_utils.assert_reentrant_reads_succeed(
             (split.source, split.start_position, split.stop_position))
コード例 #18
0
ファイル: create_test.py プロジェクト: Sil1991/gcpdf-demo
 def test_create_source_read_reentrant(self):
     source = Create._create_source_from_iterable(range(9), self.coder)
     source_test_utils.assert_reentrant_reads_succeed((source, None, None))
コード例 #19
0
 def test_read_reentrant_without_splitting(self):
     file_name = self._write_data()
     source = AvroSource(file_name)
     source_test_utils.assert_reentrant_reads_succeed((source, None, None))