I have a Spark image running in a Docker container. I want to access the results saved by Spark in HDFS using WebHDFS from the host machine outside the container.
For this I am using the OPEN API which has a redirect before serving the file contents. I am forwarding all ports using -P
flag while running the docker image.
I am able to execute other operations like Listing a Directory using the exposed high port on the host machine. But for reading a file the REST call fails as there is a HTTP Redirect.
Any ideas how I can solve this?