hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Clampffer (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-11884) libhdfs++: Make use of socket wrappers consistent
Date Thu, 25 May 2017 15:54:04 GMT
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

To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org

View raw message