Commit eaf4e5f5 authored by Patrick D. Hunt's avatar Patrick D. Hunt
Browse files

ZOOKEEPER-1973. Jetty Server changes broke ibm6 support (Bill Havanki via phunt)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1612359 13f79535-47bb-0310-9956-ffa450edef68
parent f411e56f
......@@ -714,6 +714,9 @@ BUGFIXES:
ZOOKEEPER-1972. Fix invalid volatile long/int increment (++)
(Hongchao Deng via phunt)
ZOOKEEPER-1973. Jetty Server changes broke ibm6 support
(Bill Havanki via phunt)
IMPROVEMENTS:
ZOOKEEPER-1170. Fix compiler (eclipse) warnings: unused imports,
......
......@@ -18,8 +18,6 @@
package org.apache.zookeeper.server.admin;
import java.lang.management.ManagementFactory;
import java.lang.management.OperatingSystemMXBean;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
......@@ -38,11 +36,10 @@ import org.apache.zookeeper.server.ZooTrace;
import org.apache.zookeeper.server.quorum.Leader;
import org.apache.zookeeper.server.quorum.LeaderZooKeeperServer;
import org.apache.zookeeper.server.quorum.ReadOnlyZooKeeperServer;
import org.apache.zookeeper.server.util.OSMXBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sun.management.UnixOperatingSystemMXBean;
/**
* Class containing static methods for registering and running Commands, as well
* as default Command definitions.
......@@ -310,13 +307,9 @@ public class Commands {
response.put("ephemerals_count", zkdb.getDataTree().getEphemeralsCount());
response.put("approximate_data_size", zkdb.getDataTree().approximateDataSize());
OperatingSystemMXBean osMbean = ManagementFactory.getOperatingSystemMXBean();
if (osMbean != null && osMbean instanceof UnixOperatingSystemMXBean) {
UnixOperatingSystemMXBean unixos = (UnixOperatingSystemMXBean) osMbean;
response.put("open_file_descriptor_count", unixos.getOpenFileDescriptorCount());
response.put("max_file_descriptor_count", unixos.getMaxFileDescriptorCount());
}
OSMXBean osMbean = new OSMXBean();
response.put("open_file_descriptor_count", osMbean.getOpenFileDescriptorCount());
response.put("max_file_descriptor_count", osMbean.getMaxFileDescriptorCount());
if (zkServer instanceof LeaderZooKeeperServer) {
Leader leader = ((LeaderZooKeeperServer) zkServer).getLeader();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment