After debugging enough, Came to know that socketTimeout should be set during client creation time and request timeout is something completely different from socketTimeout.
I started setting socketTimeout as below and worked fine.
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.