mukul1987 commented on a change in pull request #1555:
URL: https://github.com/apache/ozone/pull/1555#discussion_r527570796
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java
##########
@@ -206,7 +209,7 @@ private void checkInvalidPath(Path path) throws Exception {
}
}
- @Test(timeout = 300_000)
+ @Test(timeout = 540_000)
Review comment:
why do we need to increase the timeout ?
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashPolicyOzone.java
##########
@@ -115,20 +131,24 @@ public void run() {
now = Time.now();
if (now >= end) {
Collection<FileStatus> trashRoots;
- trashRoots = fs.getTrashRoots(true); // list all trash dirs
-
- for (FileStatus trashRoot : trashRoots) { // dump each trash
+ trashRoots = fs.getTrashRoots(true); // list all trash dirs
+ LOG.info("TrashrootSize: " + trashRoots.size());
+ for (FileStatus trashRoot : trashRoots) { // dump each trash
+ LOG.info("Trashroot:" + trashRoot.getPath().toString());
if (!trashRoot.isDirectory()) {
continue;
}
- try {
- TrashPolicyOzone trash = new TrashPolicyOzone(fs, conf);
- trash.deleteCheckpoint(trashRoot.getPath(), false);
- trash.createCheckpoint(trashRoot.getPath(), new Date(now));
- } catch (IOException e) {
- LOG.warn("Trash caught: "+e+". Skipping " +
- trashRoot.getPath() + ".");
- }
+ Runnable task = ()->{
+ try {
+ TrashPolicyOzone trash = new TrashPolicyOzone(fs, conf);
Review comment:
This should be outside the runnable function.
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashPolicyOzone.java
##########
@@ -49,6 +53,8 @@
private static final Path CURRENT = new Path("Current");
+ private final static int TRASH_EMPTIER_CORE_POOL_SIZE = 5;
Review comment:
Please change this to great from a config.
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashPolicyOzone.java
##########
@@ -115,20 +131,24 @@ public void run() {
now = Time.now();
if (now >= end) {
Collection<FileStatus> trashRoots;
- trashRoots = fs.getTrashRoots(true); // list all trash dirs
-
- for (FileStatus trashRoot : trashRoots) { // dump each trash
+ trashRoots = fs.getTrashRoots(true); // list all trash dirs
+ LOG.info("TrashrootSize: " + trashRoots.size());
+ for (FileStatus trashRoot : trashRoots) { // dump each trash
+ LOG.info("Trashroot:" + trashRoot.getPath().toString());
Review comment:
Same as above.
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashPolicyOzone.java
##########
@@ -115,20 +131,24 @@ public void run() {
now = Time.now();
if (now >= end) {
Collection<FileStatus> trashRoots;
- trashRoots = fs.getTrashRoots(true); // list all trash dirs
-
- for (FileStatus trashRoot : trashRoots) { // dump each trash
+ trashRoots = fs.getTrashRoots(true); // list all trash dirs
+ LOG.info("TrashrootSize: " + trashRoots.size());
Review comment:
Please change the LOG.info to LOG.debug
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashPolicyOzone.java
##########
@@ -139,9 +159,12 @@ public void run() {
fs.close();
} catch(IOException e) {
LOG.warn("Trash cannot close FileSystem: ", e);
+ } finally {
+ executor.shutdown();
Review comment:
We also need to do executor.awaitTermination as well here.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]