[ https://issues.apache.org/jira/browse/HADOOP-6311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colin Patrick McCabe updated HADOOP-6311: ----------------------------------------- Attachment: HADOOP-6311.014.patch This patch abstracts out the file descriptor passing code into two classes, {{FdServer}} and {{FdClient}}. {{FdServer}} can publish file descriptors which the {{FdClient}} (possibly in another process) can retrieve. Unlike UNIX domain sockets, this is not platform-specific. As a side effect, there is no Android-derived code in this patch. The {{FdClient}} uses a 64-bit random number called a "cookie" to identify the file descriptor it wants to fetch. The idea is that the HDFS Client will receive the cookie from the {{DataNode}} via the usual TCP communication. Then, it can be used to fetch the {{FileDescriptor}} from the {{DataNode}}. There are two defenses against a malicious process trying to grab {{FileDescriptors}} from the {{DataNode}} without authorization: the randomly generated socket path, and the randomly generated 64-bit cookie, which serves as a kind of shared secret. The latter is the stronger defense. I also factored out the exception generating code into two separate files, {{exception.c}} and {{native_io_exception.c}}. The code was formerly integrated into NativeIO.c; however, I did not want to duplicate it. It should prove useful in general for code that needs to raise Java {{RuntimeException}} and {{IOException}}. tree.h is included to implement a red-black tree (similar to a {{TreeMap}} in Java). This code is already in the hadoop-hdfs project. Finally, there are some pretty extensive unit tests, including a multi-threaded one which really puts the server through its paces. > 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-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