Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - deleteOnExit when JVM shutsdown non gracefully


Copy link to this message
-
Re: deleteOnExit when JVM shutsdown non gracefully
Ted Yu 2013-04-10, 11:40
Interesting.
File a JIRA ?

Thanks

On Apr 10, 2013, at 2:30 AM, Asaf Mesika <[EMAIL PROTECTED]> 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?