Commit 7cca644 1 parent 767a68a commit 7cca644 Copy full SHA for 7cca644
File tree 1 file changed +5
-4
lines changed
server/monitor/src/main/java/org/apache/accumulo/monitor
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -687,9 +687,10 @@ private static class ExternalCompactionsSnapshot {
687
687
public final RunningCompactions runningCompactions ;
688
688
public final Map <String ,TExternalCompaction > ecRunningMap ;
689
689
690
- private ExternalCompactionsSnapshot (Map <String ,TExternalCompaction > ecRunningMap ) {
691
- this .ecRunningMap = Collections .unmodifiableMap (ecRunningMap );
692
- this .runningCompactions = new RunningCompactions (ecRunningMap );
690
+ private ExternalCompactionsSnapshot (Optional <Map <String ,TExternalCompaction >> ecRunningMapOpt ) {
691
+ this .ecRunningMap =
692
+ ecRunningMapOpt .map (Collections ::unmodifiableMap ).orElse (Collections .emptyMap ());
693
+ this .runningCompactions = new RunningCompactions (this .ecRunningMap );
693
694
}
694
695
}
695
696
@@ -707,7 +708,7 @@ private ExternalCompactionsSnapshot computeExternalCompactionsSnapshot() {
707
708
throw new IllegalStateException ("Unable to get running compactions from " + ccHost , e );
708
709
}
709
710
710
- return new ExternalCompactionsSnapshot (running .getCompactions ());
711
+ return new ExternalCompactionsSnapshot (Optional . ofNullable ( running .getCompactions () ));
711
712
}
712
713
713
714
public RunningCompactions getRunnningCompactions () {
You can’t perform that action at this time.
0 commit comments