You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Alejandro Abdelnur <tu...@gmail.com> on 2007/12/19 09:49:04 UTC

FileSystem close() method

If using the FileSystem API directly, is there any side effect i the
FileSystem instances (normally HDFS ones) are not being closed? Like
open sockets, open file handles, memory leaks, etc.

I'm using it from continuously running applications (webapps) so I
want to ensure I won't have any issue.

Normal usage pattern is getting a FileSystem instance using a JobConf,
doing something and then dropping the FS instance.

Thxs.

A

Re: FileSystem close() method

Posted by Raghu Angadi <ra...@yahoo-inc.com>.
DFS and LocalFS don't keep track of the files opened. I think you need 
to close all the files explicitly.

Raghu.

Alejandro Abdelnur wrote:
> If using the FileSystem API directly, is there any side effect i the
> FileSystem instances (normally HDFS ones) are not being closed? Like
> open sockets, open file handles, memory leaks, etc.
> 
> I'm using it from continuously running applications (webapps) so I
> want to ensure I won't have any issue.
> 
> Normal usage pattern is getting a FileSystem instance using a JobConf,
> doing something and then dropping the FS instance.
> 
> Thxs.
> 
> A