Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ public void run() {
}

startDeadCompactionDetector();
startQueueRunningSummaryLogging();
startFailureSummaryLogging();
startInternalStateCleaner(ctx.getScheduledExecutor());

Expand Down Expand Up @@ -804,15 +803,6 @@ private void captureFailure(ExternalCompactionId ecid, KeyExtent extent) {
failingTables.compute(extent.tableId(), FailureCounts::incrementFailure);
}

protected void startQueueRunningSummaryLogging() {
CoordinatorSummaryLogger summaryLogger =
new CoordinatorSummaryLogger(ctx, this.jobQueues, this.RUNNING_CACHE, compactorCounts);

ScheduledFuture<?> future = ctx.getScheduledExecutor()
.scheduleWithFixedDelay(summaryLogger::logSummary, 0, 1, TimeUnit.MINUTES);
ThreadPools.watchNonCriticalScheduledTask(future);
}

protected void startFailureSummaryLogging() {
ScheduledFuture<?> future =
ctx.getScheduledExecutor().scheduleWithFixedDelay(this::printStats, 0, 5, TimeUnit.MINUTES);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ protected int countCompactors(ResourceGroupId groupName) {
return 3;
}

@Override
protected void startQueueRunningSummaryLogging() {}

@Override
protected void startFailureSummaryLogging() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.atomic.LongAdder;
import java.util.stream.Stream;

import org.apache.accumulo.core.Constants;
Expand Down Expand Up @@ -398,6 +399,9 @@ public Stream<TExternalCompaction> stream() {
protected final Map<String,TimeOrderedRunningCompactionSet> longRunningCompactionsByRg =
new ConcurrentHashMap<>();

protected final Map<TableId,LongAdder> runningCompactionsPerTable = new ConcurrentHashMap<>();
protected final Map<String,LongAdder> runningCompactionsPerGroup = new ConcurrentHashMap<>();

Comment on lines +402 to +404
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should include these in the clear() method.

// Table Information
private final Map<TableId,TableSummary> tables = new ConcurrentHashMap<>();
private final Map<TableId,List<TabletInformation>> tablets = new ConcurrentHashMap<>();
Expand Down Expand Up @@ -439,6 +443,8 @@ public void clear() {
tablets.clear();
deployment.clear();
suggestions.clear();
runningCompactionsPerGroup.clear();
runningCompactionsPerTable.clear();
scanServerView = null;
}

Expand Down Expand Up @@ -542,6 +548,12 @@ public void processResponse(final ServerId server, final MetricResponse response
}

public void processExternalCompaction(TExternalCompaction tec) {

var tableId = KeyExtent.fromThrift(tec.getJob().extent).tableId();
runningCompactionsPerTable.computeIfAbsent(tableId, t -> new LongAdder()).increment();
runningCompactionsPerGroup.computeIfAbsent(tec.getGroupName(), t -> new LongAdder())
.increment();

this.longRunningCompactionsByRg.computeIfAbsent(tec.getGroupName(),
k -> new TimeOrderedRunningCompactionSet(rgLongRunningCompactionSize)).add(tec);
}
Expand Down