This is an automated email from the ASF dual-hosted git repository. vaughn pushed a commit to branch zy_dev in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-toolchain.git
commit 5cc4bc056a05125815e51cdac9d116825ba23282 Author: vaughn.zhang <[email protected]> AuthorDate: Fri Apr 7 10:13:00 2023 +0800 fix: file name cover --- .../org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java b/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java index 7456e927..65c0ee87 100644 --- a/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java +++ b/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java @@ -21,6 +21,7 @@ import java.io.IOException; import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import java.util.UUID; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; @@ -145,7 +146,8 @@ public class HBaseDirectLoader extends DirectLoader<ImmutableBytesWritable, KeyV public String getHFilePath(Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); long timeStr = System.currentTimeMillis(); - String pathStr = fs.getWorkingDirectory().toString() + "/hfile-gen" + "/" + timeStr + "/"; + String uuid = UUID.randomUUID().toString(); + String pathStr = fs.getWorkingDirectory().toString() + "/hfile-gen" + "/" + timeStr + "_" + uuid + "/"; Path hfileGenPath = new Path(pathStr); if (fs.exists(hfileGenPath)) { LOG.info("\n Delete the path where the hfile is generated,path {} ", pathStr);
