Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6157

Make TypeInformation fully serializable

    Details

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

      Description

      TypeInformation is already declared serializable, however, there are no tests that verify that all classes are really serializable.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user twalthr opened a pull request:

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

          FLINK-6157 [core] Make TypeInformation fully serializable

          This PR ensures that all type information in flink-core, flink-java, flink-scala is serializable. It introduces a test base for type information.

          @StephanEwen as you suggested, I added a test that scans the class path for type information and checks test coverage, however, I had to modify many Maven pom.xml to achieve this. I don't know if we want that. Type information in other modules such as Gelly or Table API is not checked yet.

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

          $ git pull https://github.com/twalthr/flink FLINK-6157

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

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


          commit d59900417e48e00d3f4e6a682231937cbd185418
          Author: twalthr <twalthr@apache.org>
          Date: 2017-03-27T08:33:58Z

          FLINK-6157 [core] Make TypeInformation fully serializable


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user twalthr opened a pull request: https://github.com/apache/flink/pull/3619 FLINK-6157 [core] Make TypeInformation fully serializable This PR ensures that all type information in flink-core, flink-java, flink-scala is serializable. It introduces a test base for type information. @StephanEwen as you suggested, I added a test that scans the class path for type information and checks test coverage, however, I had to modify many Maven pom.xml to achieve this. I don't know if we want that. Type information in other modules such as Gelly or Table API is not checked yet. You can merge this pull request into a Git repository by running: $ git pull https://github.com/twalthr/flink FLINK-6157 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3619.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 #3619 commit d59900417e48e00d3f4e6a682231937cbd185418 Author: twalthr <twalthr@apache.org> Date: 2017-03-27T08:33:58Z FLINK-6157 [core] Make TypeInformation fully serializable
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zentol commented on the issue:

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

          Related test failure on travis:
          ```
          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project flink-core: Compilation failure: Compilation failure:
          [ERROR] /home/travis/build/apache/flink/flink-core/src/test/java/org/apache/flink/api/java/typeutils/EnumTypeInfoTest.java:[31,41] incompatible types: cannot infer type arguments for org.apache.flink.api.java.typeutils.EnumTypeInfo<>
          [ERROR] reason: inference variable T has incompatible bounds
          [ERROR] equality constraints: org.apache.flink.api.java.typeutils.EnumTypeInfoTest.TestEnum
          [ERROR] upper bounds: java.lang.Enum<capture#1 of ?>,java.lang.Enum<T>
          [ERROR] /home/travis/build/apache/flink/flink-core/src/test/java/org/apache/flink/api/java/typeutils/EnumTypeInfoTest.java:[32,41] incompatible types: cannot infer type arguments for org.apache.flink.api.java.typeutils.EnumTypeInfo<>
          [ERROR] reason: inference variable T has incompatible bounds
          [ERROR] equality constraints: org.apache.flink.api.java.typeutils.EnumTypeInfoTest.AlternativeEnum
          [ERROR] upper bounds: java.lang.Enum<capture#1 of ?>,java.lang.Enum<T>
          [ERROR] -> [Help 1]
          ```

          Show
          githubbot ASF GitHub Bot added a comment - Github user zentol commented on the issue: https://github.com/apache/flink/pull/3619 Related test failure on travis: ``` [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project flink-core: Compilation failure: Compilation failure: [ERROR] /home/travis/build/apache/flink/flink-core/src/test/java/org/apache/flink/api/java/typeutils/EnumTypeInfoTest.java: [31,41] incompatible types: cannot infer type arguments for org.apache.flink.api.java.typeutils.EnumTypeInfo<> [ERROR] reason: inference variable T has incompatible bounds [ERROR] equality constraints: org.apache.flink.api.java.typeutils.EnumTypeInfoTest.TestEnum [ERROR] upper bounds: java.lang.Enum<capture#1 of ?>,java.lang.Enum<T> [ERROR] /home/travis/build/apache/flink/flink-core/src/test/java/org/apache/flink/api/java/typeutils/EnumTypeInfoTest.java: [32,41] incompatible types: cannot infer type arguments for org.apache.flink.api.java.typeutils.EnumTypeInfo<> [ERROR] reason: inference variable T has incompatible bounds [ERROR] equality constraints: org.apache.flink.api.java.typeutils.EnumTypeInfoTest.AlternativeEnum [ERROR] upper bounds: java.lang.Enum<capture#1 of ?>,java.lang.Enum<T> [ERROR] -> [Help 1] ```
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user greghogan commented on the issue:

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

          +1 LGTM.

          My only thought is if a user passes test data with more than one implementation of `TypeInformation` (and passing the `canEquals` test) then the check for `hashCode` and `equals` would only run on the first instance.

          Show
          githubbot ASF GitHub Bot added a comment - Github user greghogan commented on the issue: https://github.com/apache/flink/pull/3619 +1 LGTM. My only thought is if a user passes test data with more than one implementation of `TypeInformation` (and passing the `canEquals` test) then the check for `hashCode` and `equals` would only run on the first instance.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user twalthr commented on the issue:

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

          @greghogan thanks for reviewing. I will add a loop around the test you mentioned such that every test datum is compared with every other test datum.

          Show
          githubbot ASF GitHub Bot added a comment - Github user twalthr commented on the issue: https://github.com/apache/flink/pull/3619 @greghogan thanks for reviewing. I will add a loop around the test you mentioned such that every test datum is compared with every other test datum.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

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

          master: 6cf4a93ebbf36f6c1dd4cc2c9b17dd58880c17c2
          release-1.3: 2e044d468157576fa6dd8946590b4ab684c2c043

          Show
          greghogan Greg Hogan added a comment - master: 6cf4a93ebbf36f6c1dd4cc2c9b17dd58880c17c2 release-1.3: 2e044d468157576fa6dd8946590b4ab684c2c043

            People

            • Assignee:
              twalthr Timo Walther
              Reporter:
              twalthr Timo Walther
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development