Details

    • Type: Umbrella Umbrella
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We need to make sure that HBase compiles and works with JDK 7. Once we verify it is reasonably stable, we can explore utilizing the G1 garbage collector. When all deployments are ready to move to JDK 7, we can start using new language features, but in the transition period we will need to maintain a codebase that compiles both with JDK 6 and JDK 7.

        Issue Links

          Activity

          Mikhail Bautin created issue -
          Mikhail Bautin made changes -
          Field Original Value New Value
          Assignee Mikhail Bautin [ mikhail ]
          Hide
          Lars Hofhansl added a comment -

          I think we need to be careful to maintain compatibility with JDK 6 for a loooong time. For many enterprises switched to JDK 7 is a major effort.

          Show
          Lars Hofhansl added a comment - I think we need to be careful to maintain compatibility with JDK 6 for a loooong time. For many enterprises switched to JDK 7 is a major effort.
          Hide
          Suraj Varma added a comment -

          Agreed - we need to maintain compatibility with JDK6 for sure. But given that JDK 6 is getting EOL in Nov 2012, we should see more companies moving to running on JDK 7 ...
          http://www.oracle.com/technetwork/java/eol-135779.html
          JDK6 Released: Dec 2006 End of Public Updates: Nov 2012

          Show
          Suraj Varma added a comment - Agreed - we need to maintain compatibility with JDK6 for sure. But given that JDK 6 is getting EOL in Nov 2012, we should see more companies moving to running on JDK 7 ... http://www.oracle.com/technetwork/java/eol-135779.html JDK6 Released: Dec 2006 End of Public Updates: Nov 2012
          Hide
          Andrew Purtell added a comment -

          I've recently switched to testing JDK6 built artifacts on a JDK7 runtime and have discovered no issues there. I can't comment on build issues but have not seen runtime issues so far.

          FWIW, I've not had success yet running HBase using the G1 GC. Always segfaults within a few hours of operation.

          Show
          Andrew Purtell added a comment - I've recently switched to testing JDK6 built artifacts on a JDK7 runtime and have discovered no issues there. I can't comment on build issues but have not seen runtime issues so far. FWIW, I've not had success yet running HBase using the G1 GC. Always segfaults within a few hours of operation.
          Hide
          Lars Hofhansl added a comment -

          I found that in order to build HBase with OpenJDK7 I need to make this change:

          --- pom.xml     (revision 1358499)
          +++ pom.xml     (working copy)
          @@ -395,6 +395,9 @@
                       <target>${compileSource}</target>
                       <showWarnings>true</showWarnings>
                       <showDeprecation>false</showDeprecation>
          +            <compilerArguments>
          +              <Xlint:-options/>
          +            </compilerArguments>
                     </configuration>
                   </plugin>
          

          That suppressed the following warning (which maven fails to parse and hence errors out):

          warning: [options] bootstrap class path not set in conjunction with -source 1.6

          G1 is supposed to be viable from OpenJDK7u4 onwards.

          Show
          Lars Hofhansl added a comment - I found that in order to build HBase with OpenJDK7 I need to make this change: --- pom.xml (revision 1358499) +++ pom.xml (working copy) @@ -395,6 +395,9 @@ <target>${compileSource}</target> <showWarnings> true </showWarnings> <showDeprecation> false </showDeprecation> + <compilerArguments> + <Xlint:-options/> + </compilerArguments> </configuration> </plugin> That suppressed the following warning (which maven fails to parse and hence errors out): warning: [options] bootstrap class path not set in conjunction with -source 1.6 G1 is supposed to be viable from OpenJDK7u4 onwards.
          Hide
          Lars Hofhansl added a comment -

          Also note that this message means that the result will not necessarily work on a JDK6 runtime. But I think this is OK.
          Should we make the above change in 0.96 and 0.94, so HBase can be built without error with JDK7?

          Show
          Lars Hofhansl added a comment - Also note that this message means that the result will not necessarily work on a JDK6 runtime. But I think this is OK. Should we make the above change in 0.96 and 0.94, so HBase can be built without error with JDK7?
          Hide
          stack added a comment -

          Do we need this addition if we are running on jdk7? I'm reading this: https://blogs.oracle.com/darcy/entry/bootclasspath_older_source What you reading?

          Show
          stack added a comment - Do we need this addition if we are running on jdk7? I'm reading this: https://blogs.oracle.com/darcy/entry/bootclasspath_older_source What you reading?
          Hide
          Lars Hofhansl added a comment -

          Yeah, that blog summarizes it nicely.

          We need this to compile HBase with JDK7. (As explained in the blog, even with -source 1.6 it will not necessarily run on a JDK6, because of missing/changed classes).

          We do not need this when we compile HBase with JDK6 and then run with JDK7.

          But since this option won't hurt anything, being able to compile HBase with JDK7 is nice.

          Show
          Lars Hofhansl added a comment - Yeah, that blog summarizes it nicely. We need this to compile HBase with JDK7. (As explained in the blog, even with -source 1.6 it will not necessarily run on a JDK6, because of missing/changed classes). We do not need this when we compile HBase with JDK6 and then run with JDK7. But since this option won't hurt anything, being able to compile HBase with JDK7 is nice.
          Hide
          stack added a comment -

          Above sounds good. What about case where we compile w/ jdk7 and run on jdk7? I wasn't clear what happens in this case from blog reading.

          Show
          stack added a comment - Above sounds good. What about case where we compile w/ jdk7 and run on jdk7? I wasn't clear what happens in this case from blog reading.
          Hide
          stack added a comment -

          Hmm... I suppose the -options flag has not effect in this case. So, +1 on patch.

          Show
          stack added a comment - Hmm... I suppose the -options flag has not effect in this case. So, +1 on patch.
          Hide
          Lars Hofhansl added a comment -

          Yep. When compiled with JDK7 it'll run fine against JDK7.
          The caveat is that there is no guarantee that the JDK7 compiled will run against JDK6.

          Show
          Lars Hofhansl added a comment - Yep. When compiled with JDK7 it'll run fine against JDK7. The caveat is that there is no guarantee that the JDK7 compiled will run against JDK6.
          Hide
          Kumar Ravi added a comment -

          I ran all the categories (Small, Medium and Large) of Junit tests on Hbase-0.94.1 (Revision 1392444) built using IBM Java 7 and all the categories ran without any failures.

          Show
          Kumar Ravi added a comment - I ran all the categories (Small, Medium and Large) of Junit tests on Hbase-0.94.1 (Revision 1392444) built using IBM Java 7 and all the categories ran without any failures.
          Andrew Purtell made changes -
          Issue Type Improvement [ 4 ] Umbrella [ 14 ]
          Andrew Purtell made changes -
          Link This issue incorporates HBASE-6182 [ HBASE-6182 ]
          Hide
          Lars Hofhansl added a comment -

          Listing all the issues Jimmy mentioned on the mailing lists (just so they do not get lost, I think Andy added most as subtasks already):

          HBASE-6182 (HBASE-6181, HBASE-6202, HBASE-6206)
          HBASE-7130 (a little trick, need to ignore the pb related stuff)
          HBASE-7113
          HBASE-6915
          HBASE-6917
          HBASE-6921
          HBASE-6355

          Show
          Lars Hofhansl added a comment - Listing all the issues Jimmy mentioned on the mailing lists (just so they do not get lost, I think Andy added most as subtasks already): HBASE-6182 ( HBASE-6181 , HBASE-6202 , HBASE-6206 ) HBASE-7130 (a little trick, need to ignore the pb related stuff) HBASE-7113 HBASE-6915 HBASE-6917 HBASE-6921 HBASE-6355
          Hide
          Lars Hofhansl added a comment -

          Interestingly in all these issues I do not see the reason why TestSplitTransactionOnCluster would time out with JDK7 in 0.94 but work fine in 0.96.

          Show
          Lars Hofhansl added a comment - Interestingly in all these issues I do not see the reason why TestSplitTransactionOnCluster would time out with JDK7 in 0.94 but work fine in 0.96.
          Hide
          stack added a comment -

          All subtasks are resolved. Should we just resolve this parent issue?

          Show
          stack added a comment - All subtasks are resolved. Should we just resolve this parent issue?
          Hide
          Lars Hofhansl added a comment -

          Unless anybody has anything else left, I'd say we close it.

          Show
          Lars Hofhansl added a comment - Unless anybody has anything else left, I'd say we close it.
          Hide
          stack added a comment -

          Reopen if I got this wrong.

          Show
          stack added a comment - Reopen if I got this wrong.
          stack made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Mikhail Bautin
              Reporter:
              Mikhail Bautin
            • Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development