You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by va...@apache.org on 2023/04/07 02:14:21 UTC

[incubator-hugegraph-toolchain] branch zy_dev created (now 5cc4bc05)

This is an automated email from the ASF dual-hosted git repository.

vaughn pushed a change to branch zy_dev
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-toolchain.git


      at 5cc4bc05 fix: file name cover

This branch includes the following new commits:

     new 5cc4bc05 fix: file name cover

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-hugegraph-toolchain] 01/01: fix: file name cover

Posted by va...@apache.org.
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 <va...@zoom.us>
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);