[
https://issues.apache.org/jira/browse/ZOOKEEPER-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406658#comment-13406658
]
Adalberto Medeiros commented on ZOOKEEPER-1474:
-----------------------------------------------
I'm working on a patch, considering the following solution:
I created a wrapper class OSMXBean that implements the methods to get
information about system file descriptors (this is actually what the interface
com.sun.management.UnixOperatingSystemMXBean does). When calling one of those
methods in OSMXBean, it will identify which java vendor the system is using.
If it's Sun, it uses reflections to load the sun interface and it calls the
methods as it does in the code today.
However, if it's IBM java, the OSMXBean execute runtime system calls to get the
information needed (number of open file descriptors or maximum allowed). Since
i'm using system calls, the commands are Linux specific, so the class also
checks the OS.
I'm adding the patch soon, but I wanted to check beforehand if there are any
concerns with that implementation.
> Cannot build Zookeeper with IBM Java: use of Sun MXBean classes
> ---------------------------------------------------------------
>
> Key: ZOOKEEPER-1474
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1474
> Project: ZooKeeper
> Issue Type: Bug
> Components: build
> Affects Versions: 3.4.0, 3.4.3
> Reporter: Adalberto Medeiros
> Assignee: Adalberto Medeiros
>
> zookeeper.server.NIOServerCnxn and zookeeper.server.NettyServerCnxn imports
> com.sun.management.UnixOperatingSystemMXBean . This OperatingSystemMXBean
> class is not implemented by IBM or open java.
> In my case, I need IBM Java so I can run zookeeper in Power ppc64 servers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira