You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/05/21 20:27:22 UTC

[GitHub] [incubator-hudi] n3nash commented on a change in pull request #651: Spark Stage retry handling

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

 ##########
 File path: hoodie-common/src/main/java/com/uber/hoodie/common/table/log/HoodieLogFormatWriter.java
 ##########
 @@ -231,10 +235,15 @@ private void handleAppendExceptionOrRecoverLease(Path path, RemoteException e) t
       // last block. Find more information here : https://issues.apache.org/jira/browse/HDFS-6325
       log.warn("Failed to open an append stream to the log file. Opening a new log file..", e);
       // Rollover the current log file (since cannot get a stream handle) and create new one
-      this.logFile = logFile.rollOver(fs);
+      this.logFile = logFile.rollOver(fs, rolloverLogWriteToken);
+      createNewFile();
+    } else if (e.getClassName().contentEquals(AlreadyBeingCreatedException.class.getName())) {
+      log.warn("Another task executor writing to the same log file(" + logFile + ". Rolling over");
+      // Rollover the current log file (since cannot get a stream handle) and create new one
+      this.logFile = logFile.rollOver(fs, rolloverLogWriteToken);
 
 Review comment:
   Yes, nice, thanks for catching 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:
users@infra.apache.org


With regards,
Apache Git Services