[
https://issues.apache.org/jira/browse/HBASE-3254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935585#action_12935585
]
Eric Tschetter commented on HBASE-3254:
---------------------------------------
Ok, so I looked into this some more as I ran into *another* DNS issue when I
went to deploy our client application in EC2. It turns out the problem is
somewhat confounded. There are two places that IP addresses are taken from.
#1, when the client tries to locate the Root region, it uses the IP address in
zookeeper. From what I can tell this is the *only* time the addresses in
zookeeper matter. This IP address is determined by HServerInfo.getAddress()
#2, when the client tries to load up data from a specific HRegionServer (i.e.
tries to access a user-created table) it looks at the meta data for the table
to find the region that has the key(s) it's looking for. This gets the
HRegionServer address from the meta data itself which is populated by the
ProcessRegionOpen through a call to HServerInfo.getHostnamePort().
HServerInfo.getHostnamePort() is very close to HServerInfo.getServerName().
So, it looks like the changes required are actually two fold, but would work:
1) Adjust the address reported to ZK to be .getHostnamePort() instead of
getAddress()
2) Adjust line 260 of HRegionServer (the constructor) from
{code}
machineName = DNS.getDefaultHost(
conf.get("hbase.regionserver.dns.interface","default"),
conf.get("hbase.regionserver.dns.nameserver","default"));
{code}
to
{code}
machineName = DNS.getDefaultHost(
conf.get("hbase.regionserver.dns.interface","default"),
conf.get("hbase.regionserver.dns.nameserver","default"));
machineName = conf.get("hbase.regionserver.machineName.override",
machineName);
{code}
will have the intended effect. Does this sound reasonable? If so, I'll try to
figure out how our guys did the CDH deployment to EC2, so that I can figure out
how to test out a patched version...
> Ability to specify the "host" published in zookeeper
> ----------------------------------------------------
>
> Key: HBASE-3254
> URL: https://issues.apache.org/jira/browse/HBASE-3254
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 0.89.20100924
> Reporter: Eric Tschetter
>
> We are running HBase on EC2 and I'm trying to get a client external from EC2
> to connect to the cluster. But, each of the nodes appears to be publishing
> its IP address into zookeeper. The problem is that the nodes on EC2 see a
> 10. IP address that is only resolvable inside of EC2.
> Specifically for EC2, there is a DNS name that will resolve properly both
> externally and internally, so it would be nice if I could tell each of the
> processes what host to publish into zookeeper via a property. As it stands,
> I have to do ssh tunnelling/muck with the hosts file in order to get my
> client to connect.
>
> This problem could occur anywhere that you have a different DNS entry for
> public vs. private access. That might only ever happen on EC2, but it might
> happen elsewhere. I don't really know :).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.