[ https://issues.apache.org/jira/browse/TEZ-4080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16949257#comment-16949257 ]
Zoltan Haindrich commented on TEZ-4080: --------------------------------------- [~jeagles] how we should proceed here? Should I first submit it for the master - and only then for 0.9.x ? > TezClient should close FileSystem objects to prevent leak > --------------------------------------------------------- > > Key: TEZ-4080 > URL: https://issues.apache.org/jira/browse/TEZ-4080 > Project: Apache Tez > Issue Type: Bug > Affects Versions: 0.9.1 > Reporter: Zoltan Haindrich > Priority: Major > Attachments: TEZ-4080.branch-0.9.1.02.patch, > TEZ-4080.branch-0.9.1.patch > > > When opening/closing a lot of tez clients; some FileSystem object references > are retained even after the client is closed - due to the fact the > FileSystem has a "cache" which collects all open FileSystem objects - to be > able to close all of them from a single shutdownhook. > Not closing these FileSystem objects causes them to pile up in the "cache" > which has hard references to them > In a simple hive test which was run with 150M of memory; these "lost" > filesystem objects could result in an OOM after ~170 sessions. > A sample creation stack trace of a FileSystem object: > {code} > at > org.apache.hadoop.hive.ql.io.ProxyLocalFileSystem.<init>(ProxyLocalFileSystem.java:49) > at sun.reflect.GeneratedConstructorAccessor83.newInstance(Unknown > Source) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:423) > at > org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) > at > org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3353) > at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:124) > at > org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3403) > at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3371) > at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:477) > at org.apache.hadoop.fs.Path.getFileSystem(Path.java:361) > at > org.apache.tez.dag.app.DAGAppMaster.serviceInit(DAGAppMaster.java:502) > at > org.apache.hadoop.service.AbstractService.init(AbstractService.java:164) > at org.apache.tez.dag.app.DAGAppMaster$9.run(DAGAppMaster.java:2663) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)