You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/10/27 10:18:44 UTC
[GitHub] [hadoop-ozone] sadanand48 commented on a change in pull request #1507: HDDS-4307.Start Trash Emptier in Ozone Manager
sadanand48 commented on a change in pull request #1507:
URL: https://github.com/apache/hadoop-ozone/pull/1507#discussion_r512567525
##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -1228,17 +1238,57 @@ public void restart() throws IOException {
// Allow OM to start as Http Server failure is not fatal.
LOG.error("OM HttpServer failed to start.", ex);
}
-
omRpcServer.start();
+
isOmRpcServerRunning = true;
+ startTrashEmptier(configuration);
+
registerMXBean();
startJVMPauseMonitor();
setStartTime();
omState = State.RUNNING;
}
+
+ /**
+ * @param conf
+ * @throws IOException
+ * Starts a Trash Emptier thread that does an fs.trashRoots and performs
+ * checkpointing & deletion
+ */
+ private void startTrashEmptier(Configuration conf) throws IOException {
+ long trashInterval =
+ conf.getLong(FS_TRASH_INTERVAL_KEY, FS_TRASH_INTERVAL_DEFAULT);
+ if (trashInterval == 0) {
+ return;
Review comment:
Done.
##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -1228,17 +1238,57 @@ public void restart() throws IOException {
// Allow OM to start as Http Server failure is not fatal.
LOG.error("OM HttpServer failed to start.", ex);
}
-
omRpcServer.start();
+
isOmRpcServerRunning = true;
+ startTrashEmptier(configuration);
+
registerMXBean();
startJVMPauseMonitor();
setStartTime();
omState = State.RUNNING;
}
+
+ /**
+ * @param conf
+ * @throws IOException
+ * Starts a Trash Emptier thread that does an fs.trashRoots and performs
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org