ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-532

java compiler should be target Java 1.5

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.3.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The jars released in 3.2.1 will not run on Java 1.5. With a small build change, it is possible to generate jars that will run on Java 1.5.

      1. ZOOKEEPER-532.patch
        3 kB
        Patrick Hunt
      2. ZOOKEEPER-532.patch
        4 kB
        Hiram Chirino

        Activity

        Hide
        Hiram Chirino added a comment -

        Attaching patch which updates the build so that javac targets 1.5.

        Show
        Hiram Chirino added a comment - Attaching patch which updates the build so that javac targets 1.5.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12420305/ZOOKEEPER-532.patch
        against trunk revision 815574.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/11/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/11/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/11/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12420305/ZOOKEEPER-532.patch against trunk revision 815574. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/11/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/11/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/11/console This message is automatically generated.
        Hide
        Patrick Hunt added a comment -

        FYI we dropped official 1.5 support in 3.1 with ZOOKEEPER-210

        Also, IIRC there were issues running the ZK JMX code with a 1.5 vm.

        I'm not adverse to targeting 1.5, but what's the impact of this change for everyone using java 6? (I realize it works, but what's the impact of targeting 1.5 vs 1.6 on 1.6).

        Show
        Patrick Hunt added a comment - FYI we dropped official 1.5 support in 3.1 with ZOOKEEPER-210 Also, IIRC there were issues running the ZK JMX code with a 1.5 vm. I'm not adverse to targeting 1.5, but what's the impact of this change for everyone using java 6? (I realize it works, but what's the impact of targeting 1.5 vs 1.6 on 1.6).
        Hide
        Patrick Hunt added a comment -

        Hiram responded through email:


        Not much. See:

        http://java.sun.com/javase/6/webnotes/compatibility.html

        Class file version bump seems mostly related to a new verification scheme.

        Show
        Patrick Hunt added a comment - Hiram responded through email: Not much. See: http://java.sun.com/javase/6/webnotes/compatibility.html Class file version bump seems mostly related to a new verification scheme.
        Hide
        Patrick Hunt added a comment -

        -1

        I just tried running the tests using this patch and JDK 1.5 – many tests fail.

        Additionally the server complains about JMX incompatibilities in 1.5, no such issues with 1.6. (this is probably what's causing
        the tests to fail, however unsure is that's the extent).

        I don't want to target 1.5 if we don't have confidence that the code works. Additionally we are only developing (incl
        Hudson) using 1.6 so 1.5 will get little exposure (no user requests for 1.5 previous to this patch). This patch does little
        but change the default target in build.xml. I think we should keep the current default, which would allow users to recompile
        with 1.5 if necessary for them. This would also make it more clear that we do not officially support 1.5.

        Show
        Patrick Hunt added a comment - -1 I just tried running the tests using this patch and JDK 1.5 – many tests fail. Additionally the server complains about JMX incompatibilities in 1.5, no such issues with 1.6. (this is probably what's causing the tests to fail, however unsure is that's the extent). I don't want to target 1.5 if we don't have confidence that the code works. Additionally we are only developing (incl Hudson) using 1.6 so 1.5 will get little exposure (no user requests for 1.5 previous to this patch). This patch does little but change the default target in build.xml. I think we should keep the current default, which would allow users to recompile with 1.5 if necessary for them. This would also make it more clear that we do not officially support 1.5.
        Hide
        Hiram Chirino added a comment -

        Naturally all the features are not going to work on 1.5, for example JMX. So tests will fail.
        I'm not sure why you expected otherwise.

        But the fact remains the the core server and client work just fine on 1.5. I've been running them on 1.5 for a long time now. If you want folks to rebuild your jars, you basically saying you want forks of the project floating around out there. If that's the official position that's cool, but it just adds more work onto your downstream users since they now need to re-compile and redistribute.

        Show
        Hiram Chirino added a comment - Naturally all the features are not going to work on 1.5, for example JMX. So tests will fail. I'm not sure why you expected otherwise. But the fact remains the the core server and client work just fine on 1.5. I've been running them on 1.5 for a long time now. If you want folks to rebuild your jars, you basically saying you want forks of the project floating around out there. If that's the official position that's cool, but it just adds more work onto your downstream users since they now need to re-compile and redistribute.
        Hide
        Patrick Hunt added a comment -

        The main reason is that we don't ship code that causes our own tests to fail. We try to the best of our
        ability to guarantee that our code is as reliable and as highly available as possible.

        We state in the release docs that only 1.6 is officially supported:
        http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html#sc_requiredSoftware

        Show
        Patrick Hunt added a comment - The main reason is that we don't ship code that causes our own tests to fail. We try to the best of our ability to guarantee that our code is as reliable and as highly available as possible. We state in the release docs that only 1.6 is officially supported: http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html#sc_requiredSoftware
        Hide
        Patrick Hunt added a comment -

        Latest patch is same as previous but fixes conflicts.

        Show
        Patrick Hunt added a comment - Latest patch is same as previous but fixes conflicts.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12424230/ZOOKEEPER-532.patch
        against trunk revision 833559.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/50/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/50/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/50/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12424230/ZOOKEEPER-532.patch against trunk revision 833559. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/50/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/50/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/50/console This message is automatically generated.
        Hide
        Benjamin Reed added a comment -

        +1

        Show
        Benjamin Reed added a comment - +1
        Hide
        Benjamin Reed added a comment -

        Committed revision 881841.
        thanx hiram!

        Show
        Benjamin Reed added a comment - Committed revision 881841. thanx hiram!
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #545 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/545/)

        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #545 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/545/ )

          People

          • Assignee:
            Hiram Chirino
            Reporter:
            Hiram Chirino
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development