Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Implemented
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: Core
    • Labels:
      None

      Description

      While reviewing test coverage for FLINK-4705 I have come across that Either only implements partial object reuse (when from and to are both Right). We can implement full object reuse if Left stores a reference to a Right and Right to a Left. These references will be private and will remain null until set by EitherSerializer when copying or deserializing with object reuse.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user greghogan opened a pull request:

          https://github.com/apache/flink/pull/3680

          FLINK-6268 [core] Object reuse for Either type

          Implement object reuse for Flink's Either type by storing a reference to Right in Left and Left in Right. These references are private and remain null until set by EitherSerializer when copying or deserializing with object reuse.

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

          $ git pull https://github.com/greghogan/flink 6268_object_reuse_for_either_type

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

          https://github.com/apache/flink/pull/3680.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 #3680


          commit aa8df2f75a2cfc225db0770f1b56aa36c7bed361
          Author: Greg Hogan <code@greghogan.com>
          Date: 2017-04-05T14:12:04Z

          FLINK-6268 [core] Object reuse for Either type

          Implement object reuse for Flink's Either type by storing a reference to
          Right in Left and Left in Right. These references are private and remain
          null until set by EitherSerializer when copying or deserializing with
          object reuse.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user greghogan opened a pull request: https://github.com/apache/flink/pull/3680 FLINK-6268 [core] Object reuse for Either type Implement object reuse for Flink's Either type by storing a reference to Right in Left and Left in Right. These references are private and remain null until set by EitherSerializer when copying or deserializing with object reuse. You can merge this pull request into a Git repository by running: $ git pull https://github.com/greghogan/flink 6268_object_reuse_for_either_type Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3680.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 #3680 commit aa8df2f75a2cfc225db0770f1b56aa36c7bed361 Author: Greg Hogan <code@greghogan.com> Date: 2017-04-05T14:12:04Z FLINK-6268 [core] Object reuse for Either type Implement object reuse for Flink's Either type by storing a reference to Right in Left and Left in Right. These references are private and remain null until set by EitherSerializer when copying or deserializing with object reuse.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zentol commented on the issue:

          https://github.com/apache/flink/pull/3680

          +1.

          Show
          githubbot ASF GitHub Bot added a comment - Github user zentol commented on the issue: https://github.com/apache/flink/pull/3680 +1.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user greghogan commented on the issue:

          https://github.com/apache/flink/pull/3680

          @zentol thanks for the review. I pushed a second commit to mark the added static methods as `@Internal` and renamed from `asLeft/Right` to `obtainLeft/Right`.

          Show
          githubbot ASF GitHub Bot added a comment - Github user greghogan commented on the issue: https://github.com/apache/flink/pull/3680 @zentol thanks for the review. I pushed a second commit to mark the added static methods as `@Internal` and renamed from `asLeft/Right` to `obtainLeft/Right`.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zentol commented on the issue:

          https://github.com/apache/flink/pull/3680

          Additional changes look good as well

          Show
          githubbot ASF GitHub Bot added a comment - Github user zentol commented on the issue: https://github.com/apache/flink/pull/3680 Additional changes look good as well
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3680

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3680
          Hide
          greghogan Greg Hogan added a comment -

          Implemented in ae17718fb9262f65b89b4551d2aecaab3ee23d9e

          Show
          greghogan Greg Hogan added a comment - Implemented in ae17718fb9262f65b89b4551d2aecaab3ee23d9e

            People

            • Assignee:
              greghogan Greg Hogan
              Reporter:
              greghogan Greg Hogan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development