diff --git a/service/src/java/org/apache/hive/service/server/HiveServer2.java b/service/src/java/org/apache/hive/service/server/HiveServer2.java index 01251c3..222cb45 100644 --- a/service/src/java/org/apache/hive/service/server/HiveServer2.java +++ b/service/src/java/org/apache/hive/service/server/HiveServer2.java @@ -297,18 +297,6 @@ public synchronized void stop() { } } - private static void startPauseMonitor(HiveConf conf) throws Exception { - try { - Class.forName("org.apache.hadoop.util.JvmPauseMonitor"); - org.apache.hadoop.util.JvmPauseMonitor pauseMonitor = - new org.apache.hadoop.util.JvmPauseMonitor(conf); - pauseMonitor.start(); - } catch (Throwable t) { - LOG.warn("Could not initiate the JvmPauseMonitor thread." + - " GCs and Pauses may not be warned upon.", t); - } - } - private static void startHiveServer2() throws Throwable { long attempts = 0, maxAttempts = 1; while (true) { @@ -320,7 +308,7 @@ private static void startHiveServer2() throws Throwable { server = new HiveServer2(); server.init(hiveConf); server.start(); - startPauseMonitor(hiveConf); + ShimLoader.getHadoopShims().startPauseMonitor(hiveConf); // If we're supporting dynamic service discovery, we'll add the service uri for this // HiveServer2 instance to Zookeeper as a znode. if (hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_SUPPORT_DYNAMIC_SERVICE_DISCOVERY)) {