leesf commented on a change in pull request #1139: [MINOR]Optimize hudi-client 
module
URL: https://github.com/apache/incubator-hudi/pull/1139#discussion_r361425112
 
 

 ##########
 File path: 
hudi-client/src/main/java/org/apache/hudi/table/RollbackExecutor.java
 ##########
 @@ -131,10 +130,10 @@ public RollbackExecutor(HoodieTableMetaClient 
metaClient, HoodieWriteConfig conf
           // getFileStatus would reflect correct stats and 
FileNotFoundException is not thrown in
           // cloud-storage : HUDI-168
           Map<FileStatus, Long> filesToNumBlocksRollback = new HashMap<>();
-          
filesToNumBlocksRollback.put(metaClient.getFs().getFileStatus(writer.getLogFile().getPath()),
 1L);
-          return new Tuple2<String, 
HoodieRollbackStat>(rollbackRequest.getPartitionPath(),
-              
HoodieRollbackStat.newBuilder().withPartitionPath(rollbackRequest.getPartitionPath())
-                  
.withRollbackBlockAppendResults(filesToNumBlocksRollback).build());
+          
filesToNumBlocksRollback.put(metaClient.getFs().getFileStatus(Objects.requireNonNull(writer).getLogFile().getPath()),
 1L);
 
 Review comment:
   Would replace Objects with `Preconditions`

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