HBASE-10123 Change default ports; move them out of linux ephemeral port range

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1559200 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Hsieh 2014-01-17 17:37:25 +00:00
parent a8ec7232cc
commit 0e47eb67ff
12 changed files with 49 additions and 31 deletions

View File

@ -42,8 +42,8 @@ run_master () {
DN=$2
export HBASE_IDENT_STRING="$USER-$DN"
HBASE_MASTER_ARGS="\
-D hbase.master.port=`expr 60000 + $DN` \
-D hbase.master.info.port=`expr 60010 + $DN` \
-D hbase.master.port=`expr 16000 + $DN` \
-D hbase.master.info.port=`expr 16010 + $DN` \
--backup"
"$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $1 master $HBASE_MASTER_ARGS
}

View File

@ -95,7 +95,7 @@ public class TestClientNoCluster extends Configured implements Tool {
private static final Log LOG = LogFactory.getLog(TestClientNoCluster.class);
private Configuration conf;
public static final ServerName META_SERVERNAME =
ServerName.valueOf("meta.example.org", 60010, 12345);
ServerName.valueOf("meta.example.org", 16010, 12345);
@Before
public void setUp() throws Exception {
@ -651,7 +651,7 @@ public class TestClientNoCluster extends Configured implements Tool {
private static ServerName [] makeServerNames(final int count) {
ServerName [] sns = new ServerName[count];
for (int i = 0; i < count; i++) {
sns[i] = ServerName.valueOf("" + i + ".example.org", 60010, i);
sns[i] = ServerName.valueOf("" + i + ".example.org", 16010, i);
}
return sns;
}

View File

@ -181,7 +181,7 @@ public class HBaseConfiguration extends Configuration {
/** For debugging. Dump configurations to system output as xml format.
* Master and RS configurations can also be dumped using
* http services. e.g. "curl http://master:60010/dump"
* http services. e.g. "curl http://master:16010/dump"
*/
public static void main(String[] args) throws Exception {
HBaseConfiguration.create().writeXml(System.out);

View File

@ -139,10 +139,10 @@ public final class HConstants {
public static final String MASTER_PORT = "hbase.master.port";
/** default port that the master listens on */
public static final int DEFAULT_MASTER_PORT = 60000;
public static final int DEFAULT_MASTER_PORT = 16000;
/** default port for master web api */
public static final int DEFAULT_MASTER_INFOPORT = 60010;
public static final int DEFAULT_MASTER_INFOPORT = 16010;
/** Configuration key for master web API port */
public static final String MASTER_INFO_PORT = "hbase.master.info.port";
@ -217,10 +217,10 @@ public final class HConstants {
public static final String REGIONSERVER_PORT = "hbase.regionserver.port";
/** Default port region server listens on. */
public static final int DEFAULT_REGIONSERVER_PORT = 60020;
public static final int DEFAULT_REGIONSERVER_PORT = 16020;
/** default port for region server web api */
public static final int DEFAULT_REGIONSERVER_INFOPORT = 60030;
public static final int DEFAULT_REGIONSERVER_INFOPORT = 16030;
/** A configuration key for regionserver info port */
public static final String REGIONSERVER_INFO_PORT =
@ -943,7 +943,7 @@ public final class HConstants {
* The port to use for the multicast messages.
*/
public static final String STATUS_MULTICAST_PORT = "hbase.status.multicast.port";
public static final int DEFAULT_STATUS_MULTICAST_PORT = 60100;
public static final int DEFAULT_STATUS_MULTICAST_PORT = 16100;
public static final long NO_NONCE = 0;

View File

@ -98,12 +98,12 @@ possible configurations would overwhelm and obscure the important.
<!--Master configurations-->
<property >
<name>hbase.master.port</name>
<value>60000</value>
<value>16000</value>
<description>The port the HBase Master should bind to.</description>
</property>
<property>
<name>hbase.master.info.port</name>
<value>60010</value>
<value>16010</value>
<description>The port for the HBase Master web UI.
Set to -1 if you do not want a UI instance run.</description>
</property>
@ -169,12 +169,12 @@ possible configurations would overwhelm and obscure the important.
<!--RegionServer configurations-->
<property>
<name>hbase.regionserver.port</name>
<value>60020</value>
<value>16020</value>
<description>The port the HBase RegionServer binds to.</description>
</property>
<property>
<name>hbase.regionserver.info.port</name>
<value>60030</value>
<value>16030</value>
<description>The port for the HBase RegionServer web UI
Set to -1 if you do not want the RegionServer UI to run.</description>
</property>

View File

@ -44,7 +44,11 @@ ServerName [] serverNames = masters.toArray(new ServerName[masters.size()]);
<%if (!master.isActiveMaster()) %>
<%if serverNames[0] != null %>
<h2>Master</h2>
<a href="//<% serverNames[0].getHostname() %>:<% master.getConfiguration().getInt("hbase.master.info.port", 60010) %>/master-status" target="_blank"><% serverNames[0].getHostname() %></a>
<a href="//<% serverNames[0].getHostname() %>:
<% master.getConfiguration().getInt("hbase.master.info.port", 16010) %>/master-status"
target="_blank">
<% serverNames[0].getHostname() %>
</a>
<%else>
Unable to parse master hostname.
</%if>
@ -62,7 +66,11 @@ ServerName [] serverNames = masters.toArray(new ServerName[masters.size()]);
for (ServerName serverName : serverNames) {
</%java>
<tr>
<td><a href="//<% serverName.getHostname() %>:<% master.getConfiguration().getInt("hbase.master.info.port", 60010) %>/master-status" target="_blank"><% serverName.getHostname() %></a></td>
<td><a href="//<% serverName.getHostname() %>:
<% master.getConfiguration().getInt("hbase.master.info.port", 16010) %>/master-status"
target="_blank">
<% serverName.getHostname() %></a>
</td>
<td><% serverName.getPort() %></td>
<td><% new Date(serverName.getStartcode()) %></td>
</tr>

View File

@ -40,7 +40,7 @@ org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionLoad;
ServerInfo serverInfo = ProtobufUtil.getServerInfo(regionServer);
ServerName serverName = ProtobufUtil.toServerName(serverInfo.getServerName());
List<HRegionInfo> onlineRegions = ProtobufUtil.getOnlineRegions(regionServer);
int masterInfoPort = regionServer.getConfiguration().getInt("hbase.master.info.port", 60010);
int masterInfoPort = regionServer.getConfiguration().getInt("hbase.master.info.port", 16010);
</%java>
<!--[if IE]>
<!DOCTYPE html>

View File

@ -48,12 +48,12 @@ import org.apache.hadoop.hbase.util.JVMClusterUtil;
* to close it all down. {@link #join} the cluster is you want to wait on
* shutdown completion.
*
* <p>Runs master on port 60000 by default. Because we can't just kill the
* <p>Runs master on port 16000 by default. Because we can't just kill the
* process -- not till HADOOP-1700 gets fixed and even then.... -- we need to
* be able to find the master with a remote client to run shutdown. To use a
* port other than 60000, set the hbase.master to a value of 'local:PORT':
* port other than 16000, set the hbase.master to a value of 'local:PORT':
* that is 'local', not 'localhost', and the port number the master should use
* instead of 60000.
* instead of 16000.
*
*/
@InterfaceAudience.Public

View File

@ -578,7 +578,7 @@ MasterServices, Server {
this.masterAddressManager.start();
// Put up info server.
int port = this.conf.getInt("hbase.master.info.port", 60010);
int port = this.conf.getInt("hbase.master.info.port", HConstants.DEFAULT_MASTER_INFOPORT);
if (port >= 0) {
String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
this.infoServer = new InfoServer(MASTER, a, port, false, this.conf);

View File

@ -1652,7 +1652,8 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa
* @throws IOException
*/
private int putUpWebUI() throws IOException {
int port = this.conf.getInt(HConstants.REGIONSERVER_INFO_PORT, 60030);
int port = this.conf.getInt(HConstants.REGIONSERVER_INFO_PORT,
HConstants.DEFAULT_REGIONSERVER_INFOPORT);
// -1 is for disabling info server
if (port < 0) return port;
String addr = this.conf.get("hbase.regionserver.info.bindAddress", "0.0.0.0");

View File

@ -515,13 +515,16 @@ homed on the node <varname>h-24-30.example.com</varname>.
</para>
<para>To start up an extra backup master(s) on the same server run...
<programlisting>% bin/local-master-backup.sh start 1</programlisting>
... the '1' means use ports 60001 &amp; 60011, and this backup master's logfile will be at <filename>logs/hbase-${USER}-1-master-${HOSTNAME}.log</filename>.
... the '1' means use ports 16001 &amp; 16011, and this backup master's
logfile will be at
<filename>logs/hbase-${USER}-1-master-${HOSTNAME}.log</filename>.
</para>
<para>To startup multiple backup masters run... <programlisting>% bin/local-master-backup.sh start 2 3</programlisting> You can start up to 9 backup masters (10 total).
</para>
<para>To start up more regionservers...
<programlisting>% bin/local-regionservers.sh start 1</programlisting>
where '1' means use ports 60201 &amp; 60301 and its logfile will be at <filename>logs/hbase-${USER}-1-regionserver-${HOSTNAME}.log</filename>.
... where '1' means use ports 16201 &amp; 16301 and its logfile will be at
`<filename>logs/hbase-${USER}-1-regionserver-${HOSTNAME}.log</filename>.
</para>
<para>To add 4 more regionservers in addition to the one you just started by running... <programlisting>% bin/local-regionservers.sh start 2 3 4 5</programlisting>
This supports up to 99 extra regionservers (100 total).
@ -678,14 +681,18 @@ homed on the node <varname>h-24-30.example.com</varname>.
<para>HBase also puts up a UI listing vital attributes. By default its
deployed on the Master host at port 60010 (HBase RegionServers listen
on port 60020 by default and put up an informational http server at
60030). If the Master were running on a host named
deployed on the Master host at port 16010 (HBase RegionServers listen
on port 16020 by default and put up an informational http server at
16030). If the Master were running on a host named
<varname>master.example.org</varname> on the default port, to see the
Master's homepage you'd point your browser at
<filename>http://master.example.org:60010</filename>.</para>
<filename>http://master.example.org:16010</filename>.</para>
<para>Prior to HBase 0.98, the default ports the master ui was deployed
on port 16010, and the HBase RegionServers would listen
on port 16020 by default and put up an informational http server at
16030.
</para>
<para>Once HBase has started, see the <xref linkend="shell_exercises" /> for how to
create tables, add data, scan your insertions, and finally disable and

View File

@ -257,7 +257,8 @@ export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:NewSize=64m -XX:MaxNewSize=64m"
<title>Builtin Tools</title>
<section xml:id="trouble.tools.builtin.webmaster">
<title>Master Web Interface</title>
<para>The Master starts a web-interface on port 60010 by default.
<para>The Master starts a web-interface on port 16010 by default.
(Up to and including 0.98 this was port 60010)
</para>
<para>The Master web UI lists created tables and their definition (e.g., ColumnFamilies, blocksize, etc.). Additionally,
the available RegionServers in the cluster are listed along with selected high-level metrics (requests, number of regions, usedHeap, maxHeap).
@ -266,7 +267,8 @@ export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:NewSize=64m -XX:MaxNewSize=64m"
</section>
<section xml:id="trouble.tools.builtin.webregion">
<title>RegionServer Web Interface</title>
<para>RegionServers starts a web-interface on port 60030 by default.
<para>RegionServers starts a web-interface on port 16030 by default.
(Up to an including 0.98 this was port 60030)
</para>
<para>The RegionServer web UI lists online regions and their start/end keys, as well as point-in-time RegionServer metrics (requests, regions, storeFileIndexSize, compactionQueueSize, etc.).
</para>