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

Colin Patrick McCabe commented on HADOOP-6311:
----------------------------------------------

Thanks for the review, Andy.

bq. [red-black, splay tree implementations]

We already use the same red-black tree implementation in libhdfs.  It comes 
directly out of the BSD kernel and is released under a liberal license.  It has 
to be a tree because hash tables are unordered, and we have to expire old file 
descriptors that were not claimed within a certain time period.  That means 
ordering by time.  The trees are also much more flexible in a lot of ways.

bq. I think [ {{unixDomainSetupSockaddr}} ] can be static, right?

It's also used in fd_client.c.

bq. Put a maximum count on [RETRY_ON_EINTR]

This is basically my version of {{TEMP_FAILURE_RETRY}}, a fine macro which 
happens to be a Linux-ism.  
[http://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html#Interrupted-Primitives]
  {{TEMP_FAILURE_RETRY}} doesn't have a maximum count, and as far as I know, 
there's no reason why you would need one.

bq. [safe write]

I'll add the extra check for too-large write() results.

The contract is "write exactly the given amount or return an error."  If we get 
an error while writing to the socket, the exact amount written prior to that is 
not interesting (in this case at least.)

bq. [dup / fseek issues]

I don't think it's an issue in the particular use cases we have planned (i.e., 
HDFS-347.)  But it should definitely be documented.

bq. [Use /dev/urandom]

It's a Linux-ism.  but I guess we could do it on that platform.
                
> Add support for unix domain sockets to JNI libs
> -----------------------------------------------
>
>                 Key: HADOOP-6311
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6311
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: native
>    Affects Versions: 0.20.0
>            Reporter: Todd Lipcon
>            Assignee: Colin Patrick McCabe
>         Attachments: 6311-trunk-inprogress.txt, HADOOP-6311.014.patch, 
> HADOOP-6311.016.patch, HADOOP-6311.018.patch, HADOOP-6311.020b.patch, 
> HADOOP-6311.020.patch, HADOOP-6311.021.patch, HADOOP-6311-0.patch, 
> HADOOP-6311-1.patch, hadoop-6311.txt
>
>
> For HDFS-347 we need to use unix domain sockets. This JIRA is to include a 
> library in common which adds a o.a.h.net.unix package based on the code from 
> Android (apache 2 license)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to