Reidddddd commented on a change in pull request #549: HBASE-22912 [Backport]
HBASE-22867 to branch-1 to avoid ForkJoinPool to spawn thousands of threads
URL: https://github.com/apache/hbase/pull/549#discussion_r319341692
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/CleanerChore.java
##########
@@ -322,140 +330,154 @@ public boolean getEnabled() {
T act() throws IOException;
}
- /**
- * Attemps to clean up a directory, its subdirectories, and files. Return
value is true if
- * everything was deleted. false on partial / total failures.
- */
- private final class CleanerTask extends RecursiveTask<Boolean> {
- private static final long serialVersionUID = -1584635903138015418L;
- private final Path dir;
- private final boolean root;
+ private interface Callback {
+ void run(boolean val);
+ }
- CleanerTask(final FileStatus dir, final boolean root) {
- this(dir.getPath(), root);
+ private final class AsyncResult {
Review comment:
A thought, can `AsyncResult` be inside `DirScanPool` rather than
`CleanerChore`?
----------------------------------------------------------------
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]
With regards,
Apache Git Services