[ 
https://issues.apache.org/jira/browse/HDFS-5175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14183034#comment-14183034
 ] 

Chris Nauroth commented on HDFS-5175:
-------------------------------------

bq. So with all these, httpclient seems to be most elegant approach, 
specifically org.apache.http.client.

I'm a bit hesitant to take org.apache.http.client as a dependency.  My 
experience has been very positive with it.  It's a great library.  The problem 
is that it's pervasive.  I've worked in large enterprises where nearly every 
single application linked to it, and they didn't necessarily link to the same 
version.  This could set up a situation where it becomes more difficult for 
downstream applications to link to HDFS if they're already using 
org.apache.http.client.  It could turn into another dependency management 
challenge like Guava.  Since we publish a library rather than an application, 
we always need to be mindful of our dependencies and their impact on downstream 
applications.

bq. Socket.setSocketFactroy() for the entire JVM works if you only need to set 
DSCP based on remote address and port. But there is no way to config different 
DSCP values for different sockets.

I see your point that the {{SocketFactory}} interface is set up entirely in 
terms of address parameters.  What additional information would you like to 
use?  It sounds like you want to detect HTTP URLs with the webhdfs scheme.  Is 
that everything, or is there more?

Have you considered putting that information in a thread-local variable 
somewhere that your {{SocketFactory}} could access it?  This could end up being 
brittle code, but perhaps it's a way to work around the limitations of 
{{URLConnection}}.

> Provide clients a way to set IP header bits on connections
> ----------------------------------------------------------
>
>                 Key: HDFS-5175
>                 URL: https://issues.apache.org/jira/browse/HDFS-5175
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.0.5-alpha
>            Reporter: Lohit Vijayarenu
>
> It would be very helpful if we had ability for clients to set IP headers when 
> they make socket connections for data transfers. We were looking into setting 
> up QoS using DSCP bit and saw that there is no easy way to let clients pass 
> down a specific value when clients make connection to DataNode.
> As a quick fix we did something similar to io.file.buffer.size where client 
> could pass down DSCP integer value and when DFSClient opens a stream, it 
> could set the value on socket using setTrafficClass
> Opening this JIRA to get more inputs from others who have had experience and 
> might have already thought about this. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to