vinothchandar commented on a change in pull request #651: Spark Stage retry 
handling
URL: https://github.com/apache/incubator-hudi/pull/651#discussion_r285289112
 
 

 ##########
 File path: hoodie-common/src/main/java/com/uber/hoodie/common/util/FSUtils.java
 ##########
 @@ -92,26 +100,46 @@ public static FileSystem getFs(String path, Configuration 
conf) {
     return fs;
   }
 
-  public static String makeDataFileName(String commitTime, int 
taskPartitionId, String fileId) {
-    return String.format("%s_%d_%s.parquet", fileId, taskPartitionId, 
commitTime);
+  /**
+   * A write token uniquely identifies an attempt at one of the IOHandle 
operations (Merge/Create/Append)
+   */
+  public static String makeWriteToken(int taskPartitionId, int stageId, long 
taskAttemptId) {
+    return String.format("%d-%d-%d", taskPartitionId, stageId, taskAttemptId);
   }
 
-  public static String makeTempDataFileName(String partitionPath, String 
commitTime,
-      int taskPartitionId, String fileId, int stageId, long taskAttemptId) {
-    return String.format("%s_%s_%d_%s_%d_%d.parquet", 
partitionPath.replace("/", "-"), fileId,
-        taskPartitionId, commitTime, stageId, taskAttemptId);
+
+  public static String makeDataFileName(String commitTime, String writeToken, 
String fileId) {
+    return String.format("%s_%s_%s.parquet", fileId, writeToken, commitTime);
   }
 
-  public static String maskWithoutFileId(String commitTime, int 
taskPartitionId) {
-    return String.format("*_%s_%s.parquet", taskPartitionId, commitTime);
+  public static String makeTempDataFileName(String partitionPath, String 
commitTime, String fileId, String writeToken) {
 
 Review comment:
   who calls this? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to