HADOOP-2312 talks about using FileChannel's
transferTo()
and
transferFrom()
in DataNode.
At the time DataNode neither used NIO sockets nor wrote large chunks of contiguous block data to socket. Hadoop 0.17 does both when data is seved to clients (and other datanodes). I am planning to try using transferTo() in the trunk. This might reduce DataNode's cpu by another 50% or more.
Once HADOOP-1702 is committed, we can look into using transferFrom().