Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/3896#discussion_r116500253
--- Diff:
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/files/StaticFileServerHandler.java
---
@@ -234,8 +237,17 @@ private void respondAsLeader(ChannelHandlerContext
ctx, HttpRequest request, Str
if
(!rootURI.relativize(requestedURI).equals(requestedURI)) {
logger.debug("Loading missing file from classloader: {}", requestPath);
// ensure that
directory to file exists.
-
file.getParentFile().mkdirs();
-
Files.copy(resourceStream, file.toPath());
+ if
(!file.getParentFile().mkdirs()) {
+ throw
new IOException("Could not create directories for file " + file);
+ }
+ synchronized
(COPY_LOCK) {
--- End diff --
There is nothing stopping us from changing to eager loading later on, so I
opted for the fastest, yet still reasonable, fix for the problem.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---