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

 ##########
 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:
   this seems like a good fix.. @n3nash fyi 

----------------------------------------------------------------
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