Didnt used curl commands to test ; but have checked like if we do connection outside mapPartitions() and put sample request we get a response. If we do the same inside mapPartitions() it gives connection time out.
We use dataproc to submit spark ; since code in the driver gets response; when we do the same inside mapPartitions() it has to yield response.
Also we have referred this:
Declaring RestHighLevelClient as private , would lead to serialization issue; so we declared it as transient.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.