Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2871FECE6 for ; Thu, 3 Jan 2013 17:26:15 +0000 (UTC) Received: (qmail 79133 invoked by uid 500); 3 Jan 2013 17:26:14 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 79081 invoked by uid 500); 3 Jan 2013 17:26:14 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 79036 invoked by uid 99); 3 Jan 2013 17:26:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2013 17:26:14 +0000 Date: Thu, 3 Jan 2013 17:26:14 +0000 (UTC) From: "Kumar Ravi (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-6945) Compilation errors when using non-Sun JDKs to build HBase-0.94 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-6945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13543099#comment-13543099 ] Kumar Ravi commented on HBASE-6945: ----------------------------------- Lars, Sorry I was out for a few days, and didn't see you comment. I have some questions for you: 1. To confirm my understanding, it looks like you are proposing making JVM a static class? I need to try this out. 2. I just added the null check to make sure we didn't end up with an exception. 3. I think this is the line you are referring to: classRef = Class.forName("com.sun.management.UnixOperatingSystemMXBean"); Do you want this to be static? The reason I had taken the approach of not making these static was since these classes were not on the main path and have been used only by one testcase. If you think it makes sense to go the static route, we can try that. But it'll take me some time to do that. > Compilation errors when using non-Sun JDKs to build HBase-0.94 > -------------------------------------------------------------- > > Key: HBASE-6945 > URL: https://issues.apache.org/jira/browse/HBASE-6945 > Project: HBase > Issue Type: Sub-task > Components: build > Affects Versions: 0.94.1 > Environment: RHEL 6.3, IBM Java 7 > Reporter: Kumar Ravi > Assignee: Kumar Ravi > Labels: patch > Fix For: 0.96.0, 0.94.5 > > Attachments: 6945-v2.txt, HBASE_0.94.3.patch, HBASE-6945.patch > > > When using IBM Java 7 to build HBase-0.94.1, the following comilation error is seen. > [INFO] ------------------------------------------------------------- > [ERROR] COMPILATION ERROR : > [INFO] ------------------------------------------------------------- > [ERROR] /home/hadoop/hbase-0.94/src/test/java/org/apache/hadoop/hbase/ResourceChecker.java:[23,25] error: package com.sun.management does not exist > [ERROR] /home/hadoop/hbase-0.94/src/test/java/org/apache/hadoop/hbase/ResourceChecker.java:[46,25] error: cannot find symbol > [ERROR] symbol: class UnixOperatingSystemMXBean > location: class ResourceAnalyzer > /home/hadoop/hbase-0.94/src/test/java/org/apache/hadoop/hbase/ResourceChecker.java:[75,29] error: cannot find symbol > [ERROR] symbol: class UnixOperatingSystemMXBean > location: class ResourceAnalyzer > /home/hadoop/hbase-0.94/src/test/java/org/apache/hadoop/hbase/ResourceChecker.java:[76,23] error: cannot find symbol > [INFO] 4 errors > [INFO] ------------------------------------------------------------- > [INFO] ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] ------------------------------------------------------------------------ > I have a patch available which should work for all JDKs including Sun. > I am in the process of testing this patch. Preliminary tests indicate the build is working fine with this patch. I will post this patch when I am done testing. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira