javeme commented on code in PR #451:
URL: 
https://github.com/apache/incubator-hugegraph-toolchain/pull/451#discussion_r1211925030


##########
hugegraph-loader/src/main/java/org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java:
##########
@@ -145,7 +146,8 @@ String generateFiles(JavaPairRDD<ImmutableBytesWritable, 
KeyValue> buildAndSerRd
     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 + "/";

Review Comment:
   
如果不太好选择哪个方案,建议参考这个简洁的方法生成`唯一的long数字`赋值给`timeStr`部分:https://github.com/apache/incubator-hugegraph/blob/a946ad1de4e8f922251a5241ffc957c33379677f/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java#L133



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to