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

Need to be able to set QuerySplitter in DatastoreIO.v1()

Details

    • New Feature
    • Status: Resolved
    • P3
    • Resolution: Won't Fix
    • 2.4.0
    • 2.4.0
    • io-java-gcp
    • None
    • Hide
      I would like to use Dataflow to be able to split queries of the form

      SELECT * FROM ledger  WHERE type = 'purchase'
           AND eventTime >= DATETIME("2017-01-01T00:00:00Z")
           AND eventTime < DATETIME("2018-01-01T00:00:00Z")

      the default query splitter (QuerySplitterImpl) refuses to split queries of this sort.  However it is obvious that this this query could be split by eventTime.  400 shards would break this up into pieces slightly shorter than a day.  50,000 shards would give you chunks of 11 minutes.

      I have already written such a query splitter.  However I need to be able to tell DatastoreV1 to replace the default query splitter with mine in order to get this to work.
      Show
      I would like to use Dataflow to be able to split queries of the form SELECT * FROM ledger  WHERE type = 'purchase'      AND eventTime >= DATETIME("2017-01-01T00:00:00Z")      AND eventTime < DATETIME("2018-01-01T00:00:00Z") the default query splitter (QuerySplitterImpl) refuses to split queries of this sort.  However it is obvious that this this query could be split by eventTime.  400 shards would break this up into pieces slightly shorter than a day.  50,000 shards would give you chunks of 11 minutes. I have already written such a query splitter.  However I need to be able to tell DatastoreV1 to replace the default query splitter with mine in order to get this to work.

    Description

      I want to add a method

            withQuerySplitter(QuerySplitter querySplitter)

      to DatastoreV1.Reader.  The implementation is fairly straightforward, except for enforcing the requirement that the query splitter must be Serializable for this to work.

       

       

      Attachments

        Issue Links

          Activity

            People

              fyellin Frank Yellin
              fyellin Frank Yellin
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 1h 10m
                  1h 10m