Basically the subject combined with the single-line patch should make it clear, what follows is the long story.
I am unable to get HBase to work when using BYON nodes due to the following error:
The situation is I'm using two VirtualBox instances whose hostnames I defined manually through /etc/hosts
In the byon yaml file, I specify the host by IP address:
When specifying the hostname instead, I get an error when starting Whirr:
invalid IP address: ubuntutest2
This message is produced in the constructor of Cluster.Instance, earlier Whirr got the address by calling NodeMetadata.getPublicAddresses(), so jclouds returns there a hostname rather than an address (which might be considered a bug in jclouds, but even if it returned an ip address, the problem described next stays true).
Back to the case where I specify the IP address in the byon yaml:
The address in the hdfs URL is determined in HBaseMasterClusterActionHandler and comes down to:
which is determined by xbill/dnsjava (see DnsUtil), which does not make use of /etc/hosts.
As fix (see attached patch), I propose to fall back to Java's getCanonicalHostName() in case dnsjava did not return any results.