HDFS-8894. Set SO_KEEPALIVE on DN server sockets. Contributed by Kanaka Kumar Avvaru.
(cherry picked from commit 49949a4bb03aa81cbb9115e91ab1c61cc6dc8a62)
This commit is contained in:
parent
e0abb0a4e7
commit
2796c1099f
@ -139,6 +139,7 @@ static Socket createSocketForPipeline(final DatanodeInfo first,
|
|||||||
NetUtils.connect(sock, isa, client.getRandomLocalInterfaceAddr(),
|
NetUtils.connect(sock, isa, client.getRandomLocalInterfaceAddr(),
|
||||||
conf.getSocketTimeout());
|
conf.getSocketTimeout());
|
||||||
sock.setSoTimeout(timeout);
|
sock.setSoTimeout(timeout);
|
||||||
|
sock.setKeepAlive(true);
|
||||||
if (conf.getSocketSendBufferSize() > 0) {
|
if (conf.getSocketSendBufferSize() > 0) {
|
||||||
sock.setSendBufferSize(conf.getSocketSendBufferSize());
|
sock.setSendBufferSize(conf.getSocketSendBufferSize());
|
||||||
}
|
}
|
||||||
|
@ -895,6 +895,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
HDFS-9535. Newly completed blocks in IBR should not be considered
|
HDFS-9535. Newly completed blocks in IBR should not be considered
|
||||||
under-replicated too quickly. (Mingliang Liu via jing9)
|
under-replicated too quickly. (Mingliang Liu via jing9)
|
||||||
|
|
||||||
|
HDFS-8894. Set SO_KEEPALIVE on DN server sockets.
|
||||||
|
(Kanaka Kumar Avvaru via wang)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||||
|
@ -710,6 +710,7 @@ public void writeBlock(final ExtendedBlock block,
|
|||||||
(HdfsConstants.WRITE_TIMEOUT_EXTENSION * targets.length);
|
(HdfsConstants.WRITE_TIMEOUT_EXTENSION * targets.length);
|
||||||
NetUtils.connect(mirrorSock, mirrorTarget, timeoutValue);
|
NetUtils.connect(mirrorSock, mirrorTarget, timeoutValue);
|
||||||
mirrorSock.setSoTimeout(timeoutValue);
|
mirrorSock.setSoTimeout(timeoutValue);
|
||||||
|
mirrorSock.setKeepAlive(true);
|
||||||
if (dnConf.getTransferSocketSendBufferSize() > 0) {
|
if (dnConf.getTransferSocketSendBufferSize() > 0) {
|
||||||
mirrorSock.setSendBufferSize(
|
mirrorSock.setSendBufferSize(
|
||||||
dnConf.getTransferSocketSendBufferSize());
|
dnConf.getTransferSocketSendBufferSize());
|
||||||
@ -1127,7 +1128,8 @@ public void replaceBlock(final ExtendedBlock block,
|
|||||||
proxySock = datanode.newSocket();
|
proxySock = datanode.newSocket();
|
||||||
NetUtils.connect(proxySock, proxyAddr, dnConf.socketTimeout);
|
NetUtils.connect(proxySock, proxyAddr, dnConf.socketTimeout);
|
||||||
proxySock.setSoTimeout(dnConf.socketTimeout);
|
proxySock.setSoTimeout(dnConf.socketTimeout);
|
||||||
|
proxySock.setKeepAlive(true);
|
||||||
|
|
||||||
OutputStream unbufProxyOut = NetUtils.getOutputStream(proxySock,
|
OutputStream unbufProxyOut = NetUtils.getOutputStream(proxySock,
|
||||||
dnConf.socketWriteTimeout);
|
dnConf.socketWriteTimeout);
|
||||||
InputStream unbufProxyIn = NetUtils.getInputStream(proxySock);
|
InputStream unbufProxyIn = NetUtils.getInputStream(proxySock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user