Hello Neha - Adding to the user@ list.
Thank you for your question and interesting Apache Knox! I think that we need to clarify what the clients are up front here... When I talk about Hadoop Java client, I am referring to the client class in the Hadoop project that is used for things like the dfs CLI commands, etc. Not custom client code that you write in Java. Custom java code to request Hadoop REST APIs, resources will work just fine. You can use the KnoxShell classes directly in Java as an SDK or you can use the groovy DSL that was built on top to leverage some of the conveniences and async capabilities of that scripting language. The reason the content-length is dropped is due to the fact that we need to rewrite the response so that subsequent calls, redirects, etc go back through the gateway. That means we are changing the original content-length. In order to know the new length we would need to have the entire response in memory so that we could set it before sending. That isn't a good idea. Hope that is helpful. --larry On Thu, Nov 30, 2017 at 10:49 AM, Neha Godwal <[email protected]> wrote: > Adding Kevin Minder to extend my help space. > @Kevin, Please take a look at my below questions. Any help from you and > Larry would be highly appreciated. > > Thanks. > > Best, > Neha > > > On Thu, Nov 30, 2017 at 9:31 AM, Neha Godwal <[email protected]> wrote: > >> Hi Larry, >> >> I have been going through this email thread:- https://mail-archives >> .apache.org/mod_mbox/knox-user/201511.mbox/%3CCACRbFyiy7 >> [email protected]%3E >> >> I have a specific requirement to use Java API for REST via Knox. So I >> have been looking how can I make it work. With respect to your responses in >> above thread, I have few clarifying questions to move forward and you help >> could save me a lot of time: >> 1) Are there any specific cases where content-length wasn't correct and >> that's why its dropped in final http response from Knox? If yes, can you >> state few examples? >> 2) In case of hadoop-auth, you said "doesn't support the redirect to >> datanodes with the file access token instead of SPNEGO challenge yet". I >> am not understanding it completely, can you please explain a bit more? >> 3) Do you know what are the other options than using Java Api? Can I use >> KnoxShell libraries in Java program? Why is it recommended to write groovy >> scripts for KnoxShell? >> >> Any help to understand this would be really appreciated. >> >> Thanks. >> >> Best, >> Neha >> >> >
