Details
Description
When we use WebHdfsFileSystem for HttpFS, some connections remain for a while after the filesystems are closed until GC runs. After investigating it for a while, I found that there is a potential connection leak in WebHdfsFileSystem.
// Close both the InputStream and the connection. @VisibleForTesting void closeInputStream(RunnerState rs) throws IOException { if (in != null) { IOUtils.close(cachedConnection); in = null; } cachedConnection = null; runnerState = rs; }
In the above code, if the variable of in is null and cachedConnection is not null, cachedConnection doesn't close and the connection remains. I think this is the cause of our problem.
Attachments
Issue Links
- links to