Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-10004

ZeroDivisionError if source bundle smaller than 1mb

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • 2.20.0
    • 2.23.0
    • io-py-mongodb
    • None

    Description

      If the desired_bundle_size is lower than 1mb, then split returns only SourceBundles with weight=0 which leads to a ZeroDivisionError down the line. 

      ZeroDivisionError: float division by zero

      This error is raised from _compute_cumulative_weights here:

      https://github.com/apache/beam/blob/9f0cb649d39ee6236ea27f111acb4b66591a80ec/sdks/python/apache_beam/io/concat_source.py#L154

       

      Worked for me: Pulling the truncation from _get_split_keys (here) into split instead.

       

       

      Attachments

        Issue Links

          Activity

            People

              corvin Corvin Deboeser
              corvin Corvin Deboeser
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m