HBASE-4992 Use a UUID for HFileOutputFormat partition path name

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1212581 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-12-09 19:08:11 +00:00
parent 8ef75773c8
commit 1bed70fd99
1 changed files with 2 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.UUID;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -315,7 +316,7 @@ public class HFileOutputFormat extends FileOutputFormat<ImmutableBytesWritable,
job.setNumReduceTasks(startKeys.size());
Path partitionsPath = new Path(job.getWorkingDirectory(),
"partitions_" + System.currentTimeMillis());
"partitions_" + UUID.randomUUID());
LOG.info("Writing partition information to " + partitionsPath);
FileSystem fs = partitionsPath.getFileSystem(conf);