Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> deleteOnExit when JVM shutsdown non gracefully


Copy link to this message
-
deleteOnExit when JVM shutsdown non gracefully
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?
+
Ted Yu 2013-04-10, 11:40
+
Andrew Purtell 2013-04-10, 16:33
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB