Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6147#discussion_r195102896
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/AbstractHandler.java 
---
    @@ -119,6 +121,10 @@ protected void respondAsLeader(ChannelHandlerContext 
ctx, RoutedRequest routedRe
                                }
                                //noinspection unchecked
                                request = (R) new FileUpload(path);
    +                   } else if (untypedResponseMessageHeaders == 
JobSubmitHeaders.getInstance()) {
    +                           final JobSubmitRequestBody jobSubmission = 
ctx.channel().attr(FileUploadHandler.SUBMITTED_JOB).get();
    +                           //noinspection unchecked
    +                           request = (R) jobSubmission;
    --- End diff --
    
    Not sure whether I would make the job submission a special case here. What 
if other requests will allow in the future to upload files as well. 
Alternatively, we could make the attribute map or the set of uploaded files 
accessible to the `AbstractRestHandler` implementations. Then every handler 
could implement the support for uploaded files themselves. What do you think?


---

Reply via email to