beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tgroh <...@git.apache.org>
Subject [GitHub] incubator-beam pull request #1210: [BEAM-847] Use a Random Long instead of a...
Date Thu, 27 Oct 2016 17:23:22 GMT
GitHub user tgroh opened a pull request:

    https://github.com/apache/incubator-beam/pull/1210

    [BEAM-847] Use a Random Long instead of a Random UUID for Aggregator IDs

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
    
     - [ ] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [ ] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).
    
    ---
    
    Aggregator IDs are used to ensure that an Aggregator's identity is
    consistent across synchronization barriers. This is only relevant when
    constructing the map of Step -> Aggregator to enable querying, as the
    DoFns represented within the graph may be serialized. The identity has
    no impact on the interaction between the runner and aggregator, which is
    the responsibility of the ProcessContext object and
    setupDelegateAggregators.
    
    UUID#randomUUID uses a shared SecureRandom to create the bytes of the
    UUID; SecureRandom#nextBytes is a synchronized method, so regardless of
    the underlying source of randomness, only one random UUID can be
    generated at a time. Instead, use a random long to identify aggregators.
    This should be sufficient for user-created aggregators, and system
    aggregators should not care about the id.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tgroh/incubator-beam stop_using_random_uuids

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-beam/pull/1210.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1210
    
----
commit ed8ebc59b00aa3add17b7fbacd0b3629d58f4136
Author: Thomas Groh <tgroh@google.com>
Date:   2016-10-27T17:19:03Z

    Use a Random Long instead of a Random UUID for Aggregator IDs
    
    Aggregator IDs are used to ensure that an Aggregator's identity is
    consistent across synchronization barriers. This is only relevant when
    constructing the map of Step -> Aggregator to enable querying, as the
    DoFns represented within the graph may be serialized. The identity has
    no impact on the interaction between the runner and aggregator, which is
    the responsibility of the ProcessContext object and
    setupDelegateAggregators.
    
    UUID#randomUUID uses a shared SecureRandom to create the bytes of the
    UUID; SecureRandom#nextBytes is a synchronized method, so regardless of
    the underlying source of randomness, only one random UUID can be
    generated at a time. Instead, use a random long to identify aggregators.
    This should be sufficient for user-created aggregators, and system
    aggregators should not care about the id.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message