From 0f6c5e0ae890a670ae26e3c8b77a2f8c5355dad1 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 8 Feb 2008 22:50:35 +0000 Subject: [PATCH] HBASE-418 Move HMaster and related classes into master package Part 2 (Previous patch moved these classes but turns out new version also had changes in them -- adding these now). git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@620022 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/hadoop/hbase/master/HMaster.java | 35 +++++++++++++++++-- .../hadoop/hbase/master/HMasterInterface.java | 5 ++- .../hbase/master/HMasterRegionInterface.java | 4 ++- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/hadoop/hbase/master/HMaster.java b/src/java/org/apache/hadoop/hbase/master/HMaster.java index afa9cdabde1..209a001c4ed 100644 --- a/src/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/src/java/org/apache/hadoop/hbase/master/HMaster.java @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.hbase; +package org.apache.hadoop.hbase.master; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -64,6 +64,33 @@ import org.apache.hadoop.io.Writable; import org.apache.hadoop.ipc.RemoteException; import org.apache.hadoop.ipc.Server; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.Leases; +import org.apache.hadoop.hbase.HServerAddress; +import org.apache.hadoop.hbase.HConnection; +import org.apache.hadoop.hbase.HConnectionManager; +import org.apache.hadoop.hbase.HColumnDescriptor; +import org.apache.hadoop.hbase.HTableDescriptor; +import org.apache.hadoop.hbase.Chore; +import org.apache.hadoop.hbase.HRegionInterface; +import org.apache.hadoop.hbase.HRegionInfo; +import org.apache.hadoop.hbase.HServerLoad; +import org.apache.hadoop.hbase.HRegion; +import org.apache.hadoop.hbase.RemoteExceptionHandler; +import org.apache.hadoop.hbase.HMsg; +import org.apache.hadoop.hbase.HBaseAdmin; +import org.apache.hadoop.hbase.LocalHBaseCluster; +import org.apache.hadoop.hbase.HStoreKey; +import org.apache.hadoop.hbase.HStoreFile; +import org.apache.hadoop.hbase.HStore; +import org.apache.hadoop.hbase.HServerInfo; +import org.apache.hadoop.hbase.TableExistsException; +import org.apache.hadoop.hbase.TableNotDisabledException; +import org.apache.hadoop.hbase.MasterNotRunningException; +import org.apache.hadoop.hbase.UnknownScannerException; +import org.apache.hadoop.hbase.LeaseListener; +import org.apache.hadoop.hbase.HLog; /** * HMaster is the "master server" for a HBase. @@ -133,6 +160,10 @@ public class HMaster extends Thread implements HConstants, HMasterInterface, /** Name of master server */ public static final String MASTER = "master"; + public InfoServer getInfoServer() { + return infoServer; + } + /** * Base HRegion scanner class. Holds utilty common to ROOT and * META HRegion scanners. @@ -2574,7 +2605,7 @@ public class HMaster extends Thread implements HConstants, HMasterInterface, BatchUpdate b = new BatchUpdate(regionName); b.put(COL_REGIONINFO, Writables.getBytes(info)); server.batchUpdate(metaRegionName, b); - + // 4. Close the new region to flush it to disk. Close its log file too. region.close(); diff --git a/src/java/org/apache/hadoop/hbase/master/HMasterInterface.java b/src/java/org/apache/hadoop/hbase/master/HMasterInterface.java index 978387be815..a32c78b4aea 100644 --- a/src/java/org/apache/hadoop/hbase/master/HMasterInterface.java +++ b/src/java/org/apache/hadoop/hbase/master/HMasterInterface.java @@ -17,10 +17,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.hbase; +package org.apache.hadoop.hbase.master; import org.apache.hadoop.io.Text; import org.apache.hadoop.ipc.VersionedProtocol; +import org.apache.hadoop.hbase.HTableDescriptor; +import org.apache.hadoop.hbase.HColumnDescriptor; +import org.apache.hadoop.hbase.HServerAddress; import java.io.IOException; diff --git a/src/java/org/apache/hadoop/hbase/master/HMasterRegionInterface.java b/src/java/org/apache/hadoop/hbase/master/HMasterRegionInterface.java index 694da9975a4..22b7a150e9d 100644 --- a/src/java/org/apache/hadoop/hbase/master/HMasterRegionInterface.java +++ b/src/java/org/apache/hadoop/hbase/master/HMasterRegionInterface.java @@ -17,12 +17,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.hbase; +package org.apache.hadoop.hbase.master; import java.io.IOException; import org.apache.hadoop.hbase.io.HbaseMapWritable; import org.apache.hadoop.ipc.VersionedProtocol; +import org.apache.hadoop.hbase.HServerInfo; +import org.apache.hadoop.hbase.HMsg; /** * HRegionServers interact with the HMasterRegionInterface to report on local