abstractdog commented on a change in pull request #72:
URL: https://github.com/apache/tez/pull/72#discussion_r783184336



##########
File path: 
tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java
##########
@@ -1136,6 +1142,41 @@ private boolean deleteDagDirectories(Channel channel,
       return false;
     }
 
+    private boolean deleteTaskAttemptDirectories(Channel channel, List<String> 
taskAttemptFailedQ,
+                                            List<String> jobQ, List<String> 
dagIdQ, List<String> taskAttemptIdQ) {
+      if (jobQ == null || jobQ.isEmpty()) {
+        return false;
+      }
+      if (taskAttemptFailedQ != null && !taskAttemptFailedQ.isEmpty() && 
taskAttemptFailedQ.get(0).contains("delete")

Review comment:
       I can see this boilerplate in more places in shufflehandler, which is 
because of the nature of QueryStringDecoder.get(...) -> List<String>
   could you please refactor this into common methods, like:
   ```
   notEmpty(taskAttemptFailedQ)
   notEmptyAndContains(taskAttemptFailedQ, "delete")
   ```




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


Reply via email to