aljoscha commented on a change in pull request #7312: [FLINK-11169][runtime]
fix the problem of not being reloaded for jobmanager's…
URL: https://github.com/apache/flink/pull/7312#discussion_r245934085
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/files/StaticFileServerHandler.java
##########
@@ -256,13 +256,14 @@ private void respondToRequest(ChannelHandlerContext ctx,
HttpRequest request, St
}
try {
+ String filePath = file.getPath();
long fileLength = raf.length();
HttpResponse response = new
DefaultHttpResponse(HTTP_1_1, OK);
setContentTypeHeader(response, file);
// since the log and out files are rapidly changing, we
don't want to browser to cache them
- if (!(requestPath.contains("log") ||
requestPath.contains("out"))) {
Review comment:
Unfortunately, the design of this class is not quite right. The
`StaticFileServerHandler` shouldn't "know" about log files or stdout files,
this breaks the abstraction and makes the code more error-prone, as we can see
from this bug.
I'll sort my thoughts and comment in a bit.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services