hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rosenstrauch <dar...@darose.net>
Subject Re: Getting a temporary directory in map jobs
Date Wed, 22 Dec 2010 17:40:00 GMT
On 12/21/2010 09:50 PM, Chase Bradford wrote:
> If you want a tmp file on a task's local host, just use java's
> createTempFile from the File class.  It creates a file in
> java.io.tmp, which the task runner sets up in the task's workspace
> and is cleaned by the TT even if the child jvm exits badly.

Mostly correct.  But just FYI, the temp file does not automatically get 
deleted (see: 
http://download.oracle.com/javase/6/docs/api/java/io/File.html#createTempFile%28java.lang.String,%20java.lang.String,%20java.io.File%29)

unless you call deleteOnExit() 
(http://download.oracle.com/javase/6/docs/api/java/io/File.html#deleteOnExit%28%29).

DR

Mime
View raw message