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 @@ -607,9 +607,10 @@ private static class ExternalCompactionsSnapshot {
607
607
public final RunningCompactions runningCompactions ;
608
608
public final Map <String ,TExternalCompaction > ecRunningMap ;
609
609
610
- private ExternalCompactionsSnapshot (Map <String ,TExternalCompaction > ecRunningMap ) {
611
- this .ecRunningMap = Collections .unmodifiableMap (ecRunningMap );
612
- this .runningCompactions = new RunningCompactions (ecRunningMap );
610
+ private ExternalCompactionsSnapshot (Optional <Map <String ,TExternalCompaction >> ecRunningMapOpt ) {
611
+ this .ecRunningMap =
612
+ ecRunningMapOpt .map (Collections ::unmodifiableMap ).orElse (Collections .emptyMap ());
613
+ this .runningCompactions = new RunningCompactions (this .ecRunningMap );
613
614
}
614
615
}
615
616
@@ -627,7 +628,7 @@ private ExternalCompactionsSnapshot computeExternalCompactionsSnapshot() {
627
628
throw new IllegalStateException ("Unable to get running compactions from " + ccHost , e );
628
629
}
629
630
630
- return new ExternalCompactionsSnapshot (running .getCompactions ());
631
+ return new ExternalCompactionsSnapshot (Optional . ofNullable ( running .getCompactions () ));
631
632
}
632
633
633
634
public RunningCompactions getRunnningCompactions () {
You can’t perform that action at this time.
0 commit comments