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:
parent
a8ec7232cc
commit
0e47eb67ff
|
@ -42,8 +42,8 @@ run_master () {
|
||||||
DN=$2
|
DN=$2
|
||||||
export HBASE_IDENT_STRING="$USER-$DN"
|
export HBASE_IDENT_STRING="$USER-$DN"
|
||||||
HBASE_MASTER_ARGS="\
|
HBASE_MASTER_ARGS="\
|
||||||
-D hbase.master.port=`expr 60000 + $DN` \
|
-D hbase.master.port=`expr 16000 + $DN` \
|
||||||
-D hbase.master.info.port=`expr 60010 + $DN` \
|
-D hbase.master.info.port=`expr 16010 + $DN` \
|
||||||
--backup"
|
--backup"
|
||||||
"$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $1 master $HBASE_MASTER_ARGS
|
"$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $1 master $HBASE_MASTER_ARGS
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class TestClientNoCluster extends Configured implements Tool {
|
||||||
private static final Log LOG = LogFactory.getLog(TestClientNoCluster.class);
|
private static final Log LOG = LogFactory.getLog(TestClientNoCluster.class);
|
||||||
private Configuration conf;
|
private Configuration conf;
|
||||||
public static final ServerName META_SERVERNAME =
|
public static final ServerName META_SERVERNAME =
|
||||||
ServerName.valueOf("meta.example.org", 60010, 12345);
|
ServerName.valueOf("meta.example.org", 16010, 12345);
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
|
@ -651,7 +651,7 @@ public class TestClientNoCluster extends Configured implements Tool {
|
||||||
private static ServerName [] makeServerNames(final int count) {
|
private static ServerName [] makeServerNames(final int count) {
|
||||||
ServerName [] sns = new ServerName[count];
|
ServerName [] sns = new ServerName[count];
|
||||||
for (int i = 0; i < count; i++) {
|
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;
|
return sns;
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class HBaseConfiguration extends Configuration {
|
||||||
|
|
||||||
/** For debugging. Dump configurations to system output as xml format.
|
/** For debugging. Dump configurations to system output as xml format.
|
||||||
* Master and RS configurations can also be dumped using
|
* 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 {
|
public static void main(String[] args) throws Exception {
|
||||||
HBaseConfiguration.create().writeXml(System.out);
|
HBaseConfiguration.create().writeXml(System.out);
|
||||||
|
|
|
@ -139,10 +139,10 @@ public final class HConstants {
|
||||||
public static final String MASTER_PORT = "hbase.master.port";
|
public static final String MASTER_PORT = "hbase.master.port";
|
||||||
|
|
||||||
/** default port that the master listens on */
|
/** 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 */
|
/** 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 */
|
/** Configuration key for master web API port */
|
||||||
public static final String MASTER_INFO_PORT = "hbase.master.info.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";
|
public static final String REGIONSERVER_PORT = "hbase.regionserver.port";
|
||||||
|
|
||||||
/** Default port region server listens on. */
|
/** 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 */
|
/** 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 */
|
/** A configuration key for regionserver info port */
|
||||||
public static final String 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.
|
* The port to use for the multicast messages.
|
||||||
*/
|
*/
|
||||||
public static final String STATUS_MULTICAST_PORT = "hbase.status.multicast.port";
|
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;
|
public static final long NO_NONCE = 0;
|
||||||
|
|
||||||
|
|
|
@ -98,12 +98,12 @@ possible configurations would overwhelm and obscure the important.
|
||||||
<!--Master configurations-->
|
<!--Master configurations-->
|
||||||
<property >
|
<property >
|
||||||
<name>hbase.master.port</name>
|
<name>hbase.master.port</name>
|
||||||
<value>60000</value>
|
<value>16000</value>
|
||||||
<description>The port the HBase Master should bind to.</description>
|
<description>The port the HBase Master should bind to.</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.master.info.port</name>
|
<name>hbase.master.info.port</name>
|
||||||
<value>60010</value>
|
<value>16010</value>
|
||||||
<description>The port for the HBase Master web UI.
|
<description>The port for the HBase Master web UI.
|
||||||
Set to -1 if you do not want a UI instance run.</description>
|
Set to -1 if you do not want a UI instance run.</description>
|
||||||
</property>
|
</property>
|
||||||
|
@ -169,12 +169,12 @@ possible configurations would overwhelm and obscure the important.
|
||||||
<!--RegionServer configurations-->
|
<!--RegionServer configurations-->
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.port</name>
|
<name>hbase.regionserver.port</name>
|
||||||
<value>60020</value>
|
<value>16020</value>
|
||||||
<description>The port the HBase RegionServer binds to.</description>
|
<description>The port the HBase RegionServer binds to.</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.info.port</name>
|
<name>hbase.regionserver.info.port</name>
|
||||||
<value>60030</value>
|
<value>16030</value>
|
||||||
<description>The port for the HBase RegionServer web UI
|
<description>The port for the HBase RegionServer web UI
|
||||||
Set to -1 if you do not want the RegionServer UI to run.</description>
|
Set to -1 if you do not want the RegionServer UI to run.</description>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -44,7 +44,11 @@ ServerName [] serverNames = masters.toArray(new ServerName[masters.size()]);
|
||||||
<%if (!master.isActiveMaster()) %>
|
<%if (!master.isActiveMaster()) %>
|
||||||
<%if serverNames[0] != null %>
|
<%if serverNames[0] != null %>
|
||||||
<h2>Master</h2>
|
<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>
|
<%else>
|
||||||
Unable to parse master hostname.
|
Unable to parse master hostname.
|
||||||
</%if>
|
</%if>
|
||||||
|
@ -62,7 +66,11 @@ ServerName [] serverNames = masters.toArray(new ServerName[masters.size()]);
|
||||||
for (ServerName serverName : serverNames) {
|
for (ServerName serverName : serverNames) {
|
||||||
</%java>
|
</%java>
|
||||||
<tr>
|
<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><% serverName.getPort() %></td>
|
||||||
<td><% new Date(serverName.getStartcode()) %></td>
|
<td><% new Date(serverName.getStartcode()) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -40,7 +40,7 @@ org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionLoad;
|
||||||
ServerInfo serverInfo = ProtobufUtil.getServerInfo(regionServer);
|
ServerInfo serverInfo = ProtobufUtil.getServerInfo(regionServer);
|
||||||
ServerName serverName = ProtobufUtil.toServerName(serverInfo.getServerName());
|
ServerName serverName = ProtobufUtil.toServerName(serverInfo.getServerName());
|
||||||
List<HRegionInfo> onlineRegions = ProtobufUtil.getOnlineRegions(regionServer);
|
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>
|
</%java>
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
|
@ -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
|
* to close it all down. {@link #join} the cluster is you want to wait on
|
||||||
* shutdown completion.
|
* 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
|
* 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
|
* 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
|
* that is 'local', not 'localhost', and the port number the master should use
|
||||||
* instead of 60000.
|
* instead of 16000.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
|
|
|
@ -578,7 +578,7 @@ MasterServices, Server {
|
||||||
this.masterAddressManager.start();
|
this.masterAddressManager.start();
|
||||||
|
|
||||||
// Put up info server.
|
// 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) {
|
if (port >= 0) {
|
||||||
String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
|
String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
|
||||||
this.infoServer = new InfoServer(MASTER, a, port, false, this.conf);
|
this.infoServer = new InfoServer(MASTER, a, port, false, this.conf);
|
||||||
|
|
|
@ -1652,7 +1652,8 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
private int putUpWebUI() 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
|
// -1 is for disabling info server
|
||||||
if (port < 0) return port;
|
if (port < 0) return port;
|
||||||
String addr = this.conf.get("hbase.regionserver.info.bindAddress", "0.0.0.0");
|
String addr = this.conf.get("hbase.regionserver.info.bindAddress", "0.0.0.0");
|
||||||
|
|
|
@ -515,13 +515,16 @@ homed on the node <varname>h-24-30.example.com</varname>.
|
||||||
</para>
|
</para>
|
||||||
<para>To start up an extra backup master(s) on the same server run...
|
<para>To start up an extra backup master(s) on the same server run...
|
||||||
<programlisting>% bin/local-master-backup.sh start 1</programlisting>
|
<programlisting>% bin/local-master-backup.sh start 1</programlisting>
|
||||||
... the '1' means use ports 60001 & 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 & 16011, and this backup master's
|
||||||
|
logfile will be at
|
||||||
|
<filename>logs/hbase-${USER}-1-master-${HOSTNAME}.log</filename>.
|
||||||
</para>
|
</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>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>
|
||||||
<para>To start up more regionservers...
|
<para>To start up more regionservers...
|
||||||
<programlisting>% bin/local-regionservers.sh start 1</programlisting>
|
<programlisting>% bin/local-regionservers.sh start 1</programlisting>
|
||||||
where '1' means use ports 60201 & 60301 and its logfile will be at <filename>logs/hbase-${USER}-1-regionserver-${HOSTNAME}.log</filename>.
|
... where '1' means use ports 16201 & 16301 and its logfile will be at
|
||||||
|
`<filename>logs/hbase-${USER}-1-regionserver-${HOSTNAME}.log</filename>.
|
||||||
</para>
|
</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>
|
<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).
|
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
|
<para>HBase also puts up a UI listing vital attributes. By default its
|
||||||
deployed on the Master host at port 60010 (HBase RegionServers listen
|
deployed on the Master host at port 16010 (HBase RegionServers listen
|
||||||
on port 60020 by default and put up an informational http server at
|
on port 16020 by default and put up an informational http server at
|
||||||
60030). If the Master were running on a host named
|
16030). If the Master were running on a host named
|
||||||
<varname>master.example.org</varname> on the default port, to see the
|
<varname>master.example.org</varname> on the default port, to see the
|
||||||
Master's homepage you'd point your browser at
|
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
|
<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
|
create tables, add data, scan your insertions, and finally disable and
|
||||||
|
|
|
@ -257,7 +257,8 @@ export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:NewSize=64m -XX:MaxNewSize=64m"
|
||||||
<title>Builtin Tools</title>
|
<title>Builtin Tools</title>
|
||||||
<section xml:id="trouble.tools.builtin.webmaster">
|
<section xml:id="trouble.tools.builtin.webmaster">
|
||||||
<title>Master Web Interface</title>
|
<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>
|
||||||
<para>The Master web UI lists created tables and their definition (e.g., ColumnFamilies, blocksize, etc.). Additionally,
|
<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).
|
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>
|
||||||
<section xml:id="trouble.tools.builtin.webregion">
|
<section xml:id="trouble.tools.builtin.webregion">
|
||||||
<title>RegionServer Web Interface</title>
|
<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>
|
||||||
<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>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>
|
</para>
|
||||||
|
|
Loading…
Reference in New Issue