Revert "HDFS-11280. Allow WebHDFS to reuse HTTP connections to NN. Contributed by Zheng Shao."
This reverts commit 1bc9b316ba
.
This commit is contained in:
parent
d6e5e4288c
commit
029b6fbe71
|
@ -667,9 +667,7 @@ public class WebHdfsFileSystem extends FileSystem
|
||||||
url = new URL(conn.getHeaderField("Location"));
|
url = new URL(conn.getHeaderField("Location"));
|
||||||
redirectHost = url.getHost() + ":" + url.getPort();
|
redirectHost = url.getHost() + ":" + url.getPort();
|
||||||
} finally {
|
} finally {
|
||||||
// Don't call conn.disconnect() to allow connection reuse
|
conn.disconnect();
|
||||||
// See http://tinyurl.com/java7-http-keepalive
|
|
||||||
conn.getInputStream().close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -901,9 +899,7 @@ public class WebHdfsFileSystem extends FileSystem
|
||||||
LOG.debug("Response decoding failure.", e);
|
LOG.debug("Response decoding failure.", e);
|
||||||
throw ioe;
|
throw ioe;
|
||||||
} finally {
|
} finally {
|
||||||
// Don't call conn.disconnect() to allow connection reuse
|
conn.disconnect();
|
||||||
// See http://tinyurl.com/java7-http-keepalive
|
|
||||||
conn.getInputStream().close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -950,9 +946,6 @@ public class WebHdfsFileSystem extends FileSystem
|
||||||
try {
|
try {
|
||||||
validateResponse(op, conn, true);
|
validateResponse(op, conn, true);
|
||||||
} finally {
|
} 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();
|
conn.disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue