cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Dusbabek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-1061) GCInspector uses com.sun.management - Exception under IBM JDK
Date Thu, 29 Jul 2010 15:53:16 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893668#action_12893668
] 

Gary Dusbabek commented on CASSANDRA-1061:
------------------------------------------

The other approach is to move GCInspector out to its own area so that it gets compiled separately
and ends up in its own jar, then loaded dynamically by the application if GCInspector is in
the cp.

This makes the code look nicer (no reflection), but complicates the set up of the project.

> GCInspector uses com.sun.management - Exception under IBM JDK
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-1061
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1061
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.6
>         Environment: IBM JDK 1.6 on Ubuntu
>            Reporter: Davanum Srinivas
>            Assignee: Gary Dusbabek
>             Fix For: 0.7 beta 1
>
>         Attachments: 0001-use-reflection-so-GCInspector-can-build-on-non-sun-j.patch
>
>
> com.sun.management.* classes are not available on IBM JDK's a relatively quick patch
would be to just log a message and let StorageService go on even if the GCInspector does not
start. With this, at least the released versions of cassandra compiled on sun jdk's will work
on IBM JDK. Is this enough of a work around? (cassandra won't compile on IBM JDK unless GCInspector
is re-written for both environments using reflection and platform specific classes)
> Index: src/java/org/apache/cassandra/service/StorageService.java
> ===================================================================
> --- src/java/org/apache/cassandra/service/StorageService.java   (revision 941276)
> +++ src/java/org/apache/cassandra/service/StorageService.java   (working copy)
> @@ -341,7 +341,14 @@
>          }
>  
>          DatabaseDescriptor.createAllDirectories();
> -        GCInspector.instance.start();
> +        try
> +        {
> +            GCInspector.instance.start();
> +        }
> +        catch (Throwable t)
> +        {
> +            logger_.info("GCInspector is disabled");
> +        }
>          logger_.info("Starting up server gossip");
>  
>          MessagingService.instance.listen(FBUtilities.getLocalAddress());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message