abstractdog commented on code in PR #512:
URL: https://github.com/apache/tez/pull/512#discussion_r3467396073


##########
tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java:
##########
@@ -1053,6 +1053,30 @@ private void handleRequest(ChannelHandlerContext ctx, 
HttpRequest request)
             "\n  dagId: " + dagIdQ +
             "\n  keepAlive: " + keepAliveParam);
       }
+      // Authenticate delete requests before execution
+      boolean isDeleteRequest = notEmptyAndContains(dagCompletedQ, "delete")
+          || notEmptyAndContains(vertexCompletedQ, "delete")
+          || notEmptyAndContains(taskAttemptFailedQ, "delete");
+      if (isDeleteRequest) {
+        if (jobQ == null || jobQ.isEmpty()) {
+          sendError(ctx, "Missing job parameter for delete request", 
BAD_REQUEST);
+          return;
+        }

Review Comment:
   there is a similar check taking care of `jobQ`
   ```
         if (mapIds == null || reduceRange == null || jobQ == null || dagIdQ == 
null) {
           sendError(ctx, "Required param job, dag, map and reduce", 
BAD_REQUEST);
           return;
         }
   ```
   



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