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


##########
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerStaticFileServerHandler.java:
##########
@@ -266,6 +324,18 @@ private void respondWithFile(ChannelHandlerContext ctx, 
HttpRequest request, Str
         }
     }
 
+    static String extractJobId(String requestPath) {
+        if (StringUtils.isNullOrWhitespaceOnly(requestPath)
+                || !requestPath.matches("^/jobs/.{32}\\.json$")) {
+            return null;
+        }
+        String secondPath = requestPath.split("/")[2];
+        if (StringUtils.isNullOrWhitespaceOnly(secondPath) || 
secondPath.length() < 32) {
+            return null;
+        }
+        return secondPath.substring(0, 32);

Review Comment:
   Done



##########
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerStaticFileServerHandler.java:
##########
@@ -93,13 +102,31 @@
     private static final Logger LOG =
             
LoggerFactory.getLogger(HistoryServerStaticFileServerHandler.class);
 
+    private static final long UNZIP_TIMEOUT = 10L;

Review Comment:
   Renamed



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