HBASE-418 Move HMaster and related classes into master package

Part 3: Missed non-moved file edits.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@620024 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-02-08 22:56:57 +00:00
parent 0f6c5e0ae8
commit 1bc3a436dc
17 changed files with 47 additions and 34 deletions

View File

@ -160,7 +160,7 @@ unset IFS
if [ "$COMMAND" = "shell" ] ; then
CLASS='org.apache.hadoop.hbase.Shell'
elif [ "$COMMAND" = "master" ] ; then
CLASS='org.apache.hadoop.hbase.HMaster'
CLASS='org.apache.hadoop.hbase.master.HMaster'
elif [ "$COMMAND" = "regionserver" ] ; then
CLASS='org.apache.hadoop.hbase.HRegionServer'
elif [ "$COMMAND" = "rest" ] ; then

View File

@ -30,6 +30,13 @@
a single process.
</description>
</property>
<property>
<name>hbase.rootdir</name>
<value>file:///${hadoop.tmp.dir}/hbase</value>
<description>The directory shared by region servers.
Should be fully-qualified to include the filesystem.
</description>
</property>
<property>
<name>hbase.master.info.port</name>
<value>60010</value>
@ -69,12 +76,6 @@
opening proxy to remote region server.
</description>
</property>
<property>
<name>hbase.rootdir</name>
<value>${hadoop.tmp.dir}/hbase</value>
<description>The directory shared by region servers.
</description>
</property>
<property>
<name>hbase.client.pause</name>
<value>10000</value>

View File

@ -22,4 +22,10 @@
*/
-->
<configuration>
<property>
<name>hbase.rootdir</name>
<value>${hadoop.tmp.dir}/hbase</value>
<description>The directory shared by region servers.
</description>
</property>
</configuration>

View File

@ -31,6 +31,7 @@ import org.apache.hadoop.hbase.util.Writables;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.ipc.RemoteException;
import org.apache.hadoop.hbase.master.HMasterInterface;
/**
* Provides administrative functions for HBase

View File

@ -23,6 +23,7 @@ import java.io.IOException;
import java.util.SortedMap;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.hbase.master.HMasterInterface;
/**
*

View File

@ -40,6 +40,7 @@ import org.apache.hadoop.hbase.io.HbaseMapWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.ipc.RemoteException;
import org.apache.hadoop.hbase.master.HMasterInterface;
/**
* A non-instantiable class that manages connections to multiple tables in

View File

@ -494,7 +494,7 @@ public class HLog implements HConstants {
* @param conf HBaseConfiguration
* @throws IOException
*/
static void splitLog(Path rootDir, Path srcDir, FileSystem fs,
public static void splitLog(Path rootDir, Path srcDir, FileSystem fs,
Configuration conf) throws IOException {
Path logfiles[] = fs.listPaths(new Path[] { srcDir });
LOG.info("splitting " + logfiles.length + " log(s) in " +

View File

@ -1788,7 +1788,7 @@ public class HRegion implements HConstants {
*
* @throws IOException
*/
static HRegion createHRegion(final HRegionInfo info, final Path rootDir,
public static HRegion createHRegion(final HRegionInfo info, final Path rootDir,
final HBaseConfiguration conf) throws IOException {
Path tableDir =
HTableDescriptor.getTableDir(rootDir, info.getTableDesc().getName());
@ -1811,7 +1811,8 @@ public class HRegion implements HConstants {
* @throws IOException
* @see {@link #removeRegionFromMETA(HRegion, HRegion)}
*/
static void addRegionToMETA(HRegion meta, HRegion r) throws IOException {
public static void addRegionToMETA(HRegion meta, HRegion r)
throws IOException {
meta.checkResources();
// The row key is the region name
Text row = r.getRegionName();
@ -1839,7 +1840,7 @@ public class HRegion implements HConstants {
* @throws IOException
* @see {@link #addRegionToMETA(HRegion, HRegion)}
*/
static void removeRegionFromMETA(final HRegionInterface srvr,
public static void removeRegionFromMETA(final HRegionInterface srvr,
final Text metaRegionName, final Text regionName)
throws IOException {
srvr.deleteAll(metaRegionName, regionName, HConstants.LATEST_TIMESTAMP);
@ -1854,7 +1855,7 @@ public class HRegion implements HConstants {
* @throws IOException
* @see {@link #addRegionToMETA(HRegion, HRegion)}
*/
static void offlineRegionInMETA(final HRegionInterface srvr,
public static void offlineRegionInMETA(final HRegionInterface srvr,
final Text metaRegionName, final HRegionInfo info)
throws IOException {
BatchUpdate b = new BatchUpdate(info.getRegionName());
@ -1876,7 +1877,8 @@ public class HRegion implements HConstants {
* @throws IOException
* @return True if deleted.
*/
static boolean deleteRegion(FileSystem fs, Path rootdir, HRegionInfo info)
public static boolean deleteRegion(FileSystem fs, Path rootdir,
HRegionInfo info)
throws IOException {
Path p = HRegion.getRegionDir(rootdir, info);
if (LOG.isDebugEnabled()) {

View File

@ -66,6 +66,7 @@ import org.apache.hadoop.io.Writable;
import org.apache.hadoop.ipc.Server;
import org.apache.hadoop.net.DNS;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.hbase.master.HMasterRegionInterface;
/**
* HRegionServer makes a set of HRegions available to clients. It checks in with

View File

@ -521,19 +521,19 @@ public class HStoreFile implements HConstants {
((encodedRegionName != null) ? "." + encodedRegionName : "");
}
static Path getMapDir(Path dir, String encodedRegionName, Text colFamily) {
public static Path getMapDir(Path dir, String encodedRegionName, Text colFamily) {
return new Path(dir, new Path(encodedRegionName,
new Path(colFamily.toString(), HSTORE_DATFILE_DIR)));
}
/** @return the info directory path */
static Path getInfoDir(Path dir, String encodedRegionName, Text colFamily) {
public static Path getInfoDir(Path dir, String encodedRegionName, Text colFamily) {
return new Path(dir, new Path(encodedRegionName,
new Path(colFamily.toString(), HSTORE_INFO_DIR)));
}
/** @return the bloom filter directory path */
static Path getFilterDir(Path dir, String encodedRegionName, Text colFamily) {
public static Path getFilterDir(Path dir, String encodedRegionName, Text colFamily) {
return new Path(dir, new Path(encodedRegionName,
new Path(colFamily.toString(), HSTORE_FILTER_DIR)));
}

View File

@ -29,6 +29,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.util.ReflectionUtils;
import org.apache.hadoop.hbase.master.HMaster;
/**
* This class creates a single process HBase cluster. One thread is created for
@ -268,7 +269,7 @@ public class LocalHBaseCluster implements HConstants {
* @return The passed <code>c</code> configuration modified if hbase.master
* value was 'local' otherwise, unaltered.
*/
static HBaseConfiguration doLocal(final HBaseConfiguration c) {
public static HBaseConfiguration doLocal(final HBaseConfiguration c) {
if (!isLocal(c)) {
return c;
}

View File

@ -6,9 +6,9 @@ import javax.servlet.jsp.*;
import java.util.*;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.util.VersionInfo;
import org.apache.hadoop.hbase.HMaster;
import org.apache.hadoop.hbase.master.HMaster;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HMaster.MetaRegion;
import org.apache.hadoop.hbase.master.HMaster.MetaRegion;
import org.apache.hadoop.hbase.HBaseAdmin;
import org.apache.hadoop.hbase.HServerInfo;
import org.apache.hadoop.hbase.HServerAddress;

View File

@ -22,13 +22,6 @@
*/
-->
<configuration>
<property>
<name>fs.default.name</name>
<value></value>
<description>Use hdfs as file system by default. Modify this to run on
local file system.
</description>
</property>
<property>
<name>hbase.regionserver.msginterval</name>
<value>1000</value>
@ -106,8 +99,9 @@
</property>
<property>
<name>hbase.rootdir</name>
<value>/hbase</value>
<description>location of HBase instance in dfs</description>
<value>hdfs://localhost:42273/hbase</value>
<description>Location of HBase test hbase instance (42273 is hbase
on a telephone pad)</description>
</property>
<property>
<name>hbase.hregion.max.filesize</name>

View File

@ -29,6 +29,7 @@ import org.apache.hadoop.fs.Path;
import org.apache.log4j.Logger;
import org.apache.hadoop.hbase.util.FSUtils;
import org.apache.hadoop.hbase.master.HMaster;
/**
* This class creates a single process HBase cluster. One thread is created for

View File

@ -58,7 +58,7 @@ public class TestInfoServers extends HBaseTestCase {
a.createTable(new HTableDescriptor(getName()));
assertTrue(a.tableExists(new Text(getName())));
try {
int port = miniHbase.getMaster().infoServer.getPort();
int port = miniHbase.getMaster().getInfoServer().getPort();
assertHasExpectedContent(new URL("http://localhost:" + port +
"/index.html"), "Master");
port = miniHbase.getRegionThreads().get(0).getRegionServer().

View File

@ -17,13 +17,17 @@
* 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.util.ArrayList;
import java.util.List;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.HServerAddress;
import org.apache.hadoop.hbase.HServerInfo;
import org.apache.hadoop.hbase.HMsg;
/**
* An HMaster that runs out of memory.

View File

@ -2,9 +2,9 @@
import="java.util.*"
import="org.apache.hadoop.io.Text"
import="org.apache.hadoop.util.VersionInfo"
import="org.apache.hadoop.hbase.HMaster"
import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.HConstants"
import="org.apache.hadoop.hbase.HMaster.MetaRegion"
import="org.apache.hadoop.hbase.master.HMaster.MetaRegion"
import="org.apache.hadoop.hbase.HBaseAdmin"
import="org.apache.hadoop.hbase.HServerInfo"
import="org.apache.hadoop.hbase.HServerAddress"