James Clampffer created HDFS-11884:
--------------------------------------

             Summary: libhdfs++: Make use of socket wrappers consistent
                 Key: HDFS-11884
                 URL: https://issues.apache.org/jira/browse/HDFS-11884
             Project: Hadoop HDFS
          Issue Type: Sub-task
            Reporter: James Clampffer
            Assignee: James Clampffer


Different areas of the code alternate between hdfs::async_stream (and 
derivatives) and the more direct asio::ip::tcp::socket.  I propose getting the 
code to consistently do socket IO through the async_stream style classes.

-async_stream's async_read and async_write are virtual so we can get rid of 
classes that template the socket type to support trait injection for mock tests

-async_stream can have debug info attached to it e.g. a human readable host and 
port.  Extra info about status of the stream clears the way for implementing a 
DN connection cache + bookkeeping how many sockets are in use.

-gives a chance to have a mutex serialize read and write operations.  Not 
needed in current use cases but can be used to assert that there aren't 
concurrent reads and writes to the same socket happening unintentionally



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to