dangshazi commented on code in PR #21185:
URL: https://github.com/apache/flink/pull/21185#discussion_r1012599965


##########
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerStaticFileServerHandler.java:
##########
@@ -166,10 +194,40 @@ private void respondWithFile(ChannelHandlerContext ctx, 
HttpRequest request, Str
                             }
                         }
                     }
+                    // try to unzip archived files
+                    if (enableUnzip && !success) {
+                        // extract jobid from requestPath
+                        String jobId = extractJobId(requestPath);
+                        if (!StringUtils.isNullOrWhitespaceOnly(jobId)) {
+                            // submit unzip Task and get future
+                            Boolean unzipped =
+                                    CompletableFuture.supplyAsync(
+                                                    unzipTask.apply(jobId), 
unzipExecutor)
+                                            .get(UNZIP_TIMEOUT, 
TimeUnit.SECONDS);
+                            if (unzipped && file.exists()) {
+                                success = true;
+                            }

Review Comment:
   Done



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