You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Weihua Jiang (JIRA)" <ji...@apache.org> on 2011/07/07 09:47:17 UTC

[jira] [Created] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

When a RS has hostname with uppercase letter, there are two RS entries in master
--------------------------------------------------------------------------------

                 Key: HBASE-4074
                 URL: https://issues.apache.org/jira/browse/HBASE-4074
             Project: HBase
          Issue Type: Bug
          Components: regionserver
    Affects Versions: 0.90.3, 0.90.2, 0.90.1
            Reporter: Weihua Jiang


When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
 harpertown08-15.sh.intel.com
 Harpertown08-15.sh.intel.com

This leads to wrong region allocation.

This problem is caused by the implementation of java.net.InetSocketAddress.

The logic is:
1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Weihua Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weihua Jiang updated HBASE-4074:
--------------------------------

    Attachment: 4074.patch

A patch based on 0.90.3. 

The basic idea is to use DNS-resolved hostname. 

It fixed the problem in our environment.

> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>         Attachments: 4074.patch
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061436#comment-13061436 ] 

Ted Yu commented on HBASE-4074:
-------------------------------

Integrated to branch and TRUNK.

Thanks for the patch Weihua.

> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>            Assignee: Weihua Jiang
>             Fix For: 0.90.4
>
>         Attachments: 4074.patch, 4074.trunk
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061537#comment-13061537 ] 

stack commented on HBASE-4074:
------------------------------

I committed this as part of this issue:

{code}
Index: src/main/java/org/apache/hadoop/hbase/ServerName.java
===================================================================
--- src/main/java/org/apache/hadoop/hbase/ServerName.java       (revision 1143654)
+++ src/main/java/org/apache/hadoop/hbase/ServerName.java       (working copy)
@@ -184,7 +184,8 @@
 
   @Override
   public int compareTo(ServerName other) {
-    int compare = this.getHostname().compareTo(other.getHostname());
+    int compare = this.getHostname().toLowerCase().
+      compareTo(other.getHostname().toLowerCase());
     if (compare != 0) return compare;
     compare = this.getPort() - other.getPort();
     if (compare != 0) return compare;
{code}

This should do for TRUNK what the branch patch does (It changes HSA but HSA is not really used in TRUNK.  ServerName is used instead).

> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>            Assignee: Weihua Jiang
>             Fix For: 0.90.4
>
>         Attachments: 4074.patch, 4074.trunk
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated HBASE-4074:
--------------------------

    Attachment: 4074.trunk

Patch for trunk.

> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>         Attachments: 4074.patch, 4074.trunk
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated HBASE-4074:
--------------------------

    Fix Version/s: 0.90.4

> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>            Assignee: Weihua Jiang
>             Fix For: 0.90.4
>
>         Attachments: 4074.patch, 4074.trunk
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu reassigned HBASE-4074:
-----------------------------

    Assignee: Weihua Jiang

> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>            Assignee: Weihua Jiang
>         Attachments: 4074.patch, 4074.trunk
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu resolved HBASE-4074.
---------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]

> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>            Assignee: Weihua Jiang
>             Fix For: 0.90.4
>
>         Attachments: 4074.patch, 4074.trunk
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061667#comment-13061667 ] 

Hudson commented on HBASE-4074:
-------------------------------

Integrated in HBase-TRUNK #2011 (See [https://builds.apache.org/job/HBase-TRUNK/2011/])
    HBASE-4074 When a RS has hostname with uppercase letter, there are two RS entries in master -- addendum

stack : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/ServerName.java


> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>            Assignee: Weihua Jiang
>             Fix For: 0.90.4
>
>         Attachments: 4074.patch, 4074.trunk
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061544#comment-13061544 ] 

Hudson commented on HBASE-4074:
-------------------------------

Integrated in HBase-TRUNK #2010 (See [https://builds.apache.org/job/HBase-TRUNK/2010/])
    HBASE-4074  When a RS has hostname with uppercase letter, there are two
               RS entries in master

tedyu : 
Files : 
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/HServerAddress.java


> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>            Assignee: Weihua Jiang
>             Fix For: 0.90.4
>
>         Attachments: 4074.patch, 4074.trunk
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061208#comment-13061208 ] 

Ted Yu commented on HBASE-4074:
-------------------------------

@Weihua:
The patch doesn't apply to TRUNK.
Can you provide patch for TRUNK ?

Thanks

> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>         Attachments: 4074.patch
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4074) When a RS has hostname with uppercase letter, there are two RS entries in master

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061394#comment-13061394 ] 

Andrew Purtell commented on HBASE-4074:
---------------------------------------

We fixed this issue privately in our security branch during a period of firefighting. Apologies for not getting it upstream. Another option is to simply always lowercase the hostname in the master just prior to using it to determine RS identity.

> When a RS has hostname with uppercase letter, there are two RS entries in master
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-4074
>                 URL: https://issues.apache.org/jira/browse/HBASE-4074
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: Weihua Jiang
>         Attachments: 4074.patch
>
>
> When a RS has uppercase letter in its hostname, e.g. Harpertown08-15.sh.intel.com. Then, there will be two RS entries in master report, they are
>  harpertown08-15.sh.intel.com
>  Harpertown08-15.sh.intel.com
> This leads to wrong region allocation.
> This problem is caused by the implementation of java.net.InetSocketAddress.
> The logic is:
> 1. RS Harpertown08-15.sh.intel.com sends its DNS resolved hostname harpertown08-15.sh.intel.com to master for registration in HRegionServer.reportForDuty().
> 2. Master handles it and returns harpertown08-15.sh.intel.com via HServerAddress object to RS to notify it this new name (actually the same as the one reported by RS).
> 3. HServerAddress deserialize this object by first read out hostname as string ("harpertown08-15.sh.intel.com") and construct a InetSocketAddress object.
> 4. RS get the new name by call this InetSocketAddress.getHostName() method which returns Harpertown08-15.sh.intel.com instead.
> 5. In latter hearbeat communication (HRegionServer.tryRegionServerReport()), RS uses this new name (Harpertown08-15.sh.intel.com) to report to master and master regard it as a new RS. Thus, two RS entries exist. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira