Skip to content
2 changes: 1 addition & 1 deletion hadoop-hdds/common/src/main/resources/ozone-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2935,7 +2935,7 @@
<description>
The base dir for HTTP Jetty server to extract contents. If this property
is not configured, by default, Jetty will create a directory inside the
directory named by the java.io.tmpdir System property(/tmp by default).
Comment thread
ArafatKhan2198 marked this conversation as resolved.
directory named by the ozone.metadata.dirs(/tmp/metadata)
Comment thread
sadanand48 marked this conversation as resolved.
Outdated
Comment thread
ArafatKhan2198 marked this conversation as resolved.
Outdated
While in production environment, it's strongly suggested to instruct Jetty
to use a different parent directory by setting this property to the name
of the desired parent directory. The value of the property will be used to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,13 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
}

String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
if (!StringUtils.isEmpty(baseDir)) {
createDir(baseDir);
httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
LOG.info("HTTP server of {} uses base directory {}", name, baseDir);

if (StringUtils.isEmpty(baseDir)) {
baseDir = conf.get(OzoneConfigKeys.OZONE_METADATA_DIRS) + "/webserver";
Comment thread
sadanand48 marked this conversation as resolved.
Outdated
Comment thread
ArafatKhan2198 marked this conversation as resolved.
Outdated
}
createDir(baseDir);
httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
}
}

Expand Down