You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/11/03 08:16:42 UTC

[GitHub] [flink] dangshazi commented on a diff in pull request #21185: [FLINK-28643][runtime-web] HistoryServer support lazy unzip

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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org