You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a streaming processor for some large files in a Hadoop cluster. The files are too big to keep in memory, so I want to use async get! requests into a Stream.resource. The Hadoop cluster will provide a redirect from the name node to the cluster node with the file actually on it. However, follow_redirect doesn't seem to work with an async request.
If I do an async request without follow_redirect, I get back a %HTTPoison.AsyncStatus, %HTTPoison.AsyncHeaders and %HTTPoison.AsyncEnd messages showing the 307 status along with the redirect "Location" in the headers.
If I do an async request with follow_redirect, I only get a %HTTPoison.AsyncRedirect. There is no %HTTPoison.AsyncStatus message with a 307, or a %HTTPoison.AsyncEnd, only the redirect. There are no other messages in the mailbox, and the request doesn't follow the redirect even though it's a GET, and the status is 307.
The text was updated successfully, but these errors were encountered:
Since this seems to be a hackney bug/"feature", my work around is to synchronously check the header for a 307 status first. If it is, follow the Location field in the header.
Documentation should probably be updated to reflect the hackney comment.
I'm writing a streaming processor for some large files in a Hadoop cluster. The files are too big to keep in memory, so I want to use async get! requests into a Stream.resource. The Hadoop cluster will provide a redirect from the name node to the cluster node with the file actually on it. However, follow_redirect doesn't seem to work with an async request.
If I do an async request without follow_redirect, I get back a %HTTPoison.AsyncStatus, %HTTPoison.AsyncHeaders and %HTTPoison.AsyncEnd messages showing the 307 status along with the redirect "Location" in the headers.
If I do an async request with follow_redirect, I only get a %HTTPoison.AsyncRedirect. There is no %HTTPoison.AsyncStatus message with a 307, or a %HTTPoison.AsyncEnd, only the redirect. There are no other messages in the mailbox, and the request doesn't follow the redirect even though it's a GET, and the status is 307.
The text was updated successfully, but these errors were encountered: