You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2021/04/05 16:17:32 UTC
[accumulo] branch 1451-external-compactions-feature updated: Stop
waiting on external compactions on tablet close
This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch 1451-external-compactions-feature
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/1451-external-compactions-feature by this push:
new c07f2bb Stop waiting on external compactions on tablet close
c07f2bb is described below
commit c07f2bbbff6501f40212154e463593ac43cd35d0
Author: Keith Turner <kt...@apache.org>
AuthorDate: Mon Apr 5 11:38:16 2021 -0400
Stop waiting on external compactions on tablet close
---
.../src/main/java/org/apache/accumulo/compactor/Compactor.java | 9 +++++----
.../java/org/apache/accumulo/tserver/tablet/CompactableImpl.java | 4 ++--
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
index 9ff9015..8968e65 100644
--- a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
+++ b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
@@ -257,7 +257,7 @@ public class Compactor extends AbstractServer
/**
* Cancel the compaction with this id.
- *
+ *
* @param externalCompactionId
* @throws TException
*/
@@ -497,7 +497,7 @@ public class Compactor extends AbstractServer
/**
* Returns the number of seconds to wait in between progress checks based on input file sizes
- *
+ *
* @param numBytes
* @return number of seconds to wait between progress checks
*/
@@ -583,8 +583,9 @@ public class Compactor extends AbstractServer
percentComplete = Float.toString((info.getEntriesRead() / inputEntries) * 100);
}
String message = String.format(
- "Compaction in progress, read %d of %d input entries ( %s % ), written %d entries",
- info.getEntriesRead(), inputEntries, percentComplete, info.getEntriesWritten());
+ "Compaction in progress, read %d of %d input entries ( %s %s ), written %d entries",
+ info.getEntriesRead(), inputEntries, percentComplete, "%",
+ info.getEntriesWritten());
LOG.info(message);
try {
updateCompactionState(job, CompactionState.IN_PROGRESS, message);
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
index 97175de..ba025ae 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
@@ -940,8 +940,8 @@ public class CompactableImpl implements Compactable {
closed = true;
- // CBUG this does not need to wait on external compactions!
- while (!allCompactingFiles.isEmpty()) {
+ // wait while internal jobs are running
+ while (runnningJobs.stream().anyMatch(job -> !job.getExecutor().isExernalId())) {
try {
wait(50);
} catch (InterruptedException e) {