Skip to content

Conversation

pbamba
Copy link

@pbamba pbamba commented Dec 15, 2015

This request is a proposition to fix the following situation :

With the parameters :
es.nodes.discovery = false
es.nodes.client.only = false
es.nodes.data.only = true
es.nodes = abc.example.com

With abc.example.com resolving to 1.2.3.4

The data node on abc.example is incorrectly filtered because the InitializationUtils class performs a comparison between the ip extracted from "_nodes/http" and the hostname which resolves to that ip.

When enabling debug, you then get the following situation:

"DEBUG ScalaEsRDD: Found data nodes [1.2.3.4:9200]"
"DEBUG ScalaEsRDD: Filtered discovered only nodes [abc.example.com:9200] to data-only []"

Which raises an EsHadoopIllegalArgumentException : "No data nodes with HTTP-enabled available; node discovery is disabled and none of nodes specified fits the criterion [abc.example.com:9200]"

The proposed solution resolves the ip for the hostname when qualifying nodes which allows consistency for subsequent comparisons.

@costin
Copy link
Member

costin commented Dec 29, 2015

Thanks for raising this. Please sign the CLA in order to consider it.

@costin
Copy link
Member

costin commented Jan 8, 2016

Merged in master. Thanks for your contribution!

@costin costin closed this Jan 8, 2016
@pbamba
Copy link
Author

pbamba commented Jan 11, 2016

No problem @costin, thank you looking at it !

@shamak
Copy link

shamak commented Jan 13, 2016

This still doesn't work with a URL as such:

https://example.com

@pbamba any possible chance for a fix? It seems like the code is stripping out the 'https://' from the URL and then trying to resolve the hostname.

@costin
Copy link
Member

costin commented Jan 13, 2016

@shamak This has been fixed through #652 in master. And please, open up a new issue instead of commenting on a close PR.
Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants