[ 
https://issues.apache.org/jira/browse/HBASE-19192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16256808#comment-16256808
 ] 

Janos Gub commented on HBASE-19192:
-----------------------------------

A quick question: Isn't regionServerInfo.getInfoPort coming from the 
Regionserver's set up REGRIONSERVER_INFO_PORT?
In HRegionServer.java:
{code:java}
private void createMyEphemeralNode() throws KeeperException, IOException {
    RegionServerInfo.Builder rsInfo = RegionServerInfo.newBuilder();
    rsInfo.setInfoPort(infoServer != null ? infoServer.getPort() : -1);
    rsInfo.setVersionInfo(ProtobufUtil.getVersionInfo());
    byte[] data = ProtobufUtil.prependPBMagic(rsInfo.build().toByteArray());
    ZKUtil.createEphemeralNodeAndWatch(this.zooKeeper, 
getMyEphemeralNodePath(), data);
  }
{code}

I think the ephemeral node contains the correct info port for a regionserver. 
The code in the description fetches this information. In this case this is not 
an error.
[~tedyu] Could you please confirm?

> HMaster#getRegionServerInfoPort() should respect config value of -1
> -------------------------------------------------------------------
>
>                 Key: HBASE-19192
>                 URL: https://issues.apache.org/jira/browse/HBASE-19192
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>   public int getRegionServerInfoPort(final ServerName sn) {
>     RegionServerInfo info = this.regionServerTracker.getRegionServerInfo(sn);
>     if (info == null || info.getInfoPort() == 0) {
>       return conf.getInt(HConstants.REGIONSERVER_INFO_PORT,
>         HConstants.DEFAULT_REGIONSERVER_INFOPORT);
>     }
>     return info.getInfoPort();
> {code}
> hbase.regionserver.info.port config is only checked when regionServerTracker 
> doesn't have info port.
> When hbase.regionserver.info.port is set to -1 by user, we should respect the 
> config value and disable UI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to