Revert "HDFS-11280. Allow WebHDFS to reuse HTTP connections to NN. Contributed by Zheng Shao."

This reverts commit d90f7412f2.
This commit is contained in:
Brahma Reddy Battula 2017-01-03 19:32:39 +05:30
parent d90f7412f2
commit a3f4ee53c8
1 changed files with 2 additions and 9 deletions

View File

@ -545,9 +545,7 @@ public class WebHdfsFileSystem extends FileSystem
url = new URL(conn.getHeaderField("Location"));
redirectHost = url.getHost() + ":" + url.getPort();
} finally {
// Don't call conn.disconnect() to allow connection reuse
// See http://tinyurl.com/java7-http-keepalive
conn.getInputStream().close();
conn.disconnect();
}
}
try {
@ -776,9 +774,7 @@ public class WebHdfsFileSystem extends FileSystem
}
throw ioe;
} finally {
// Don't call conn.disconnect() to allow connection reuse
// See http://tinyurl.com/java7-http-keepalive
conn.getInputStream().close();
conn.disconnect();
}
}
@ -824,9 +820,6 @@ public class WebHdfsFileSystem extends FileSystem
try {
validateResponse(op, conn, true);
} finally {
// This is a connection to DataNode. Let's disconnect since
// there is little chance that the connection will be reused
// any time soonl
conn.disconnect();
}
}