diff --git a/core/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java b/core/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java index 2b94b42e940..bced3862eae 100644 --- a/core/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java +++ b/core/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java @@ -249,4 +249,4 @@ public class ClusterStatus extends VersionedWritable { this.intransition.put(key, value); } } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/apache/hadoop/hbase/master/RegionServerOperationQueue.java b/core/src/main/java/org/apache/hadoop/hbase/master/RegionServerOperationQueue.java index 2a6b3027e96..b004f530849 100644 --- a/core/src/main/java/org/apache/hadoop/hbase/master/RegionServerOperationQueue.java +++ b/core/src/main/java/org/apache/hadoop/hbase/master/RegionServerOperationQueue.java @@ -1,3 +1,22 @@ +/** + * Copyright 2010 The Apache Software Foundation + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.hadoop.hbase.master; import java.io.IOException; diff --git a/core/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java b/core/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java index 40e993764ae..20adba7403a 100644 --- a/core/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java +++ b/core/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java @@ -24,7 +24,7 @@ import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.master.HMaster; import org.apache.hadoop.hbase.regionserver.HRegionServer; @@ -74,12 +74,12 @@ public class JVMClusterUtil { * @throws IOException * @return Region server added. */ - public static JVMClusterUtil.RegionServerThread createRegionServerThread(final HBaseConfiguration c, + public static JVMClusterUtil.RegionServerThread createRegionServerThread(final Configuration c, final Class hrsc, final int index) throws IOException { HRegionServer server; try { - server = hrsc.getConstructor(HBaseConfiguration.class).newInstance(c); + server = hrsc.getConstructor(Configuration.class).newInstance(c); } catch (Exception e) { IOException ioe = new IOException(); ioe.initCause(e); @@ -112,15 +112,6 @@ public class JVMClusterUtil { public static void shutdown(final HMaster master, final List regionservers) { LOG.debug("Shutting down HBase Cluster"); - // Be careful how the hdfs shutdown thread runs in context where more than - // one regionserver in the mix. - Thread hdfsClientFinalizer = null; - for (JVMClusterUtil.RegionServerThread t: regionservers) { - Thread tt = t.getRegionServer().setHDFSShutdownThreadOnExit(null); - if (hdfsClientFinalizer == null && tt != null) { - hdfsClientFinalizer = tt; - } - } if (master != null) { master.shutdown(); } @@ -147,16 +138,8 @@ public class JVMClusterUtil { } } } - if (hdfsClientFinalizer != null) { - // Don't run the shutdown thread. Plays havoc if we try to start a - // minihbasecluster immediately after this one has gone down (In - // Filesystem, the shutdown thread is kept in a static and is created - // on classloading. Can only run it once). - // hdfsClientFinalizer.start(); - // Threads.shutdown(hdfsClientFinalizer); - } LOG.info("Shutdown " + ((regionservers != null)? master.getName(): "0 masters") + " " + regionservers.size() + " region server(s)"); } -} \ No newline at end of file +} diff --git a/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java b/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java index 8cae4c8f54a..864ace4df7d 100644 --- a/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java +++ b/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java @@ -44,4 +44,4 @@ public class TestRegionServerOperationQueue { @After public void tearDown() throws Exception { } -} \ No newline at end of file +}