hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: deleteOnExit when JVM shutsdown non gracefully
Date Wed, 10 Apr 2013 11:40:46 GMT
Interesting. 
File a JIRA ?

Thanks

On Apr 10, 2013, at 2:30 AM, Asaf Mesika <asaf.mesika@gmail.com> wrote:

> Hi,
> 
> In the CoprocessorHost.java file, there's the following code section used
> to load a coprocessor jar:
> 
>      fs.copyToLocalFile(path, dst);
> 
>      File tmpLocal = new File(dst.toString());
> 
>      tmpLocal.deleteOnExit();
> 
> There's an assumption here that the JVM will gracefully shutdown (as
> opposed to machine went dead, kill -9, OutOfMemory which cause kill -9 in
> plain vanilla HBase).
> 
> If this happens, the temp jar and CRC files will remain there.
> 
> We saw in a production environment a case where there were 300k files there
> (only jar and crc files releated to our coprocessor jar filename).
> 
> It seems right to me, to add code section which deletes the stale files
> upon startup of the region server (just deletes all *.jar before a certain
> timestamp). Or better - place them in /tmp/hbase, and delete the contents
> of this folder upon startup.
> 
> What do you think?

Mime
View raw message