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:
parent
0f6c5e0ae8
commit
1bc3a436dc
|
@ -160,7 +160,7 @@ unset IFS
|
||||||
if [ "$COMMAND" = "shell" ] ; then
|
if [ "$COMMAND" = "shell" ] ; then
|
||||||
CLASS='org.apache.hadoop.hbase.Shell'
|
CLASS='org.apache.hadoop.hbase.Shell'
|
||||||
elif [ "$COMMAND" = "master" ] ; then
|
elif [ "$COMMAND" = "master" ] ; then
|
||||||
CLASS='org.apache.hadoop.hbase.HMaster'
|
CLASS='org.apache.hadoop.hbase.master.HMaster'
|
||||||
elif [ "$COMMAND" = "regionserver" ] ; then
|
elif [ "$COMMAND" = "regionserver" ] ; then
|
||||||
CLASS='org.apache.hadoop.hbase.HRegionServer'
|
CLASS='org.apache.hadoop.hbase.HRegionServer'
|
||||||
elif [ "$COMMAND" = "rest" ] ; then
|
elif [ "$COMMAND" = "rest" ] ; then
|
||||||
|
|
|
@ -30,6 +30,13 @@
|
||||||
a single process.
|
a single process.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</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>
|
<property>
|
||||||
<name>hbase.master.info.port</name>
|
<name>hbase.master.info.port</name>
|
||||||
<value>60010</value>
|
<value>60010</value>
|
||||||
|
@ -69,12 +76,6 @@
|
||||||
opening proxy to remote region server.
|
opening proxy to remote region server.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
|
||||||
<name>hbase.rootdir</name>
|
|
||||||
<value>${hadoop.tmp.dir}/hbase</value>
|
|
||||||
<description>The directory shared by region servers.
|
|
||||||
</description>
|
|
||||||
</property>
|
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.client.pause</name>
|
<name>hbase.client.pause</name>
|
||||||
<value>10000</value>
|
<value>10000</value>
|
||||||
|
|
|
@ -22,4 +22,10 @@
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<property>
|
||||||
|
<name>hbase.rootdir</name>
|
||||||
|
<value>${hadoop.tmp.dir}/hbase</value>
|
||||||
|
<description>The directory shared by region servers.
|
||||||
|
</description>
|
||||||
|
</property>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.apache.hadoop.hbase.util.Writables;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
import org.apache.hadoop.io.Writable;
|
import org.apache.hadoop.io.Writable;
|
||||||
import org.apache.hadoop.ipc.RemoteException;
|
import org.apache.hadoop.ipc.RemoteException;
|
||||||
|
import org.apache.hadoop.hbase.master.HMasterInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides administrative functions for HBase
|
* Provides administrative functions for HBase
|
||||||
|
|
|
@ -23,6 +23,7 @@ import java.io.IOException;
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
|
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
|
import org.apache.hadoop.hbase.master.HMasterInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -40,6 +40,7 @@ import org.apache.hadoop.hbase.io.HbaseMapWritable;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
import org.apache.hadoop.io.Writable;
|
import org.apache.hadoop.io.Writable;
|
||||||
import org.apache.hadoop.ipc.RemoteException;
|
import org.apache.hadoop.ipc.RemoteException;
|
||||||
|
import org.apache.hadoop.hbase.master.HMasterInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A non-instantiable class that manages connections to multiple tables in
|
* A non-instantiable class that manages connections to multiple tables in
|
||||||
|
|
|
@ -494,7 +494,7 @@ public class HLog implements HConstants {
|
||||||
* @param conf HBaseConfiguration
|
* @param conf HBaseConfiguration
|
||||||
* @throws IOException
|
* @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 {
|
Configuration conf) throws IOException {
|
||||||
Path logfiles[] = fs.listPaths(new Path[] { srcDir });
|
Path logfiles[] = fs.listPaths(new Path[] { srcDir });
|
||||||
LOG.info("splitting " + logfiles.length + " log(s) in " +
|
LOG.info("splitting " + logfiles.length + " log(s) in " +
|
||||||
|
|
|
@ -1788,7 +1788,7 @@ public class HRegion implements HConstants {
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @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 {
|
final HBaseConfiguration conf) throws IOException {
|
||||||
Path tableDir =
|
Path tableDir =
|
||||||
HTableDescriptor.getTableDir(rootDir, info.getTableDesc().getName());
|
HTableDescriptor.getTableDir(rootDir, info.getTableDesc().getName());
|
||||||
|
@ -1811,7 +1811,8 @@ public class HRegion implements HConstants {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @see {@link #removeRegionFromMETA(HRegion, HRegion)}
|
* @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();
|
meta.checkResources();
|
||||||
// The row key is the region name
|
// The row key is the region name
|
||||||
Text row = r.getRegionName();
|
Text row = r.getRegionName();
|
||||||
|
@ -1839,7 +1840,7 @@ public class HRegion implements HConstants {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @see {@link #addRegionToMETA(HRegion, HRegion)}
|
* @see {@link #addRegionToMETA(HRegion, HRegion)}
|
||||||
*/
|
*/
|
||||||
static void removeRegionFromMETA(final HRegionInterface srvr,
|
public static void removeRegionFromMETA(final HRegionInterface srvr,
|
||||||
final Text metaRegionName, final Text regionName)
|
final Text metaRegionName, final Text regionName)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
srvr.deleteAll(metaRegionName, regionName, HConstants.LATEST_TIMESTAMP);
|
srvr.deleteAll(metaRegionName, regionName, HConstants.LATEST_TIMESTAMP);
|
||||||
|
@ -1854,7 +1855,7 @@ public class HRegion implements HConstants {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @see {@link #addRegionToMETA(HRegion, HRegion)}
|
* @see {@link #addRegionToMETA(HRegion, HRegion)}
|
||||||
*/
|
*/
|
||||||
static void offlineRegionInMETA(final HRegionInterface srvr,
|
public static void offlineRegionInMETA(final HRegionInterface srvr,
|
||||||
final Text metaRegionName, final HRegionInfo info)
|
final Text metaRegionName, final HRegionInfo info)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
BatchUpdate b = new BatchUpdate(info.getRegionName());
|
BatchUpdate b = new BatchUpdate(info.getRegionName());
|
||||||
|
@ -1876,7 +1877,8 @@ public class HRegion implements HConstants {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @return True if deleted.
|
* @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 {
|
throws IOException {
|
||||||
Path p = HRegion.getRegionDir(rootdir, info);
|
Path p = HRegion.getRegionDir(rootdir, info);
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
|
|
|
@ -66,6 +66,7 @@ import org.apache.hadoop.io.Writable;
|
||||||
import org.apache.hadoop.ipc.Server;
|
import org.apache.hadoop.ipc.Server;
|
||||||
import org.apache.hadoop.net.DNS;
|
import org.apache.hadoop.net.DNS;
|
||||||
import org.apache.hadoop.util.StringUtils;
|
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
|
* HRegionServer makes a set of HRegions available to clients. It checks in with
|
||||||
|
|
|
@ -521,19 +521,19 @@ public class HStoreFile implements HConstants {
|
||||||
((encodedRegionName != null) ? "." + encodedRegionName : "");
|
((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,
|
return new Path(dir, new Path(encodedRegionName,
|
||||||
new Path(colFamily.toString(), HSTORE_DATFILE_DIR)));
|
new Path(colFamily.toString(), HSTORE_DATFILE_DIR)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return the info directory path */
|
/** @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,
|
return new Path(dir, new Path(encodedRegionName,
|
||||||
new Path(colFamily.toString(), HSTORE_INFO_DIR)));
|
new Path(colFamily.toString(), HSTORE_INFO_DIR)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return the bloom filter directory path */
|
/** @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,
|
return new Path(dir, new Path(encodedRegionName,
|
||||||
new Path(colFamily.toString(), HSTORE_FILTER_DIR)));
|
new Path(colFamily.toString(), HSTORE_FILTER_DIR)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.ReflectionUtils;
|
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
|
* 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
|
* @return The passed <code>c</code> configuration modified if hbase.master
|
||||||
* value was 'local' otherwise, unaltered.
|
* value was 'local' otherwise, unaltered.
|
||||||
*/
|
*/
|
||||||
static HBaseConfiguration doLocal(final HBaseConfiguration c) {
|
public static HBaseConfiguration doLocal(final HBaseConfiguration c) {
|
||||||
if (!isLocal(c)) {
|
if (!isLocal(c)) {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,9 @@ import javax.servlet.jsp.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
import org.apache.hadoop.util.VersionInfo;
|
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.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.HBaseAdmin;
|
||||||
import org.apache.hadoop.hbase.HServerInfo;
|
import org.apache.hadoop.hbase.HServerInfo;
|
||||||
import org.apache.hadoop.hbase.HServerAddress;
|
import org.apache.hadoop.hbase.HServerAddress;
|
||||||
|
|
|
@ -22,13 +22,6 @@
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
<configuration>
|
<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>
|
<property>
|
||||||
<name>hbase.regionserver.msginterval</name>
|
<name>hbase.regionserver.msginterval</name>
|
||||||
<value>1000</value>
|
<value>1000</value>
|
||||||
|
@ -106,8 +99,9 @@
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.rootdir</name>
|
<name>hbase.rootdir</name>
|
||||||
<value>/hbase</value>
|
<value>hdfs://localhost:42273/hbase</value>
|
||||||
<description>location of HBase instance in dfs</description>
|
<description>Location of HBase test hbase instance (42273 is hbase
|
||||||
|
on a telephone pad)</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.hregion.max.filesize</name>
|
<name>hbase.hregion.max.filesize</name>
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.apache.hadoop.fs.Path;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import org.apache.hadoop.hbase.util.FSUtils;
|
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
|
* This class creates a single process HBase cluster. One thread is created for
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class TestInfoServers extends HBaseTestCase {
|
||||||
a.createTable(new HTableDescriptor(getName()));
|
a.createTable(new HTableDescriptor(getName()));
|
||||||
assertTrue(a.tableExists(new Text(getName())));
|
assertTrue(a.tableExists(new Text(getName())));
|
||||||
try {
|
try {
|
||||||
int port = miniHbase.getMaster().infoServer.getPort();
|
int port = miniHbase.getMaster().getInfoServer().getPort();
|
||||||
assertHasExpectedContent(new URL("http://localhost:" + port +
|
assertHasExpectedContent(new URL("http://localhost:" + port +
|
||||||
"/index.html"), "Master");
|
"/index.html"), "Master");
|
||||||
port = miniHbase.getRegionThreads().get(0).getRegionServer().
|
port = miniHbase.getRegionThreads().get(0).getRegionServer().
|
||||||
|
|
|
@ -17,13 +17,17 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hbase;
|
package org.apache.hadoop.hbase.master;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.hadoop.fs.Path;
|
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.
|
* An HMaster that runs out of memory.
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
import="java.util.*"
|
import="java.util.*"
|
||||||
import="org.apache.hadoop.io.Text"
|
import="org.apache.hadoop.io.Text"
|
||||||
import="org.apache.hadoop.util.VersionInfo"
|
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.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.HBaseAdmin"
|
||||||
import="org.apache.hadoop.hbase.HServerInfo"
|
import="org.apache.hadoop.hbase.HServerInfo"
|
||||||
import="org.apache.hadoop.hbase.HServerAddress"
|
import="org.apache.hadoop.hbase.HServerAddress"
|
||||||
|
|
Loading…
Reference in New Issue