Fixed IllegalStateException in VisorBaselineTask on set new baseline.
@@ -26,6 +26,7 @@ import java.util.Map;
import org.apache.ignite.IgniteException;
import org.apache.ignite.cluster.BaselineNode;
import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.cluster.DetachedClusterNode;
import org.apache.ignite.internal.cluster.IgniteClusterEx;
import org.apache.ignite.internal.processors.task.GridInternal;
import org.apache.ignite.internal.processors.task.GridVisorManagementTask;
@@ -134,10 +135,10 @@ public class VisorBaselineTask extends VisorOneNodeTask<VisorBaselineTaskArg, Vi
for (String consistentId : consistentIds) {
BaselineNode node = srvrs.get(consistentId);
- if (node == null)
- throw new IllegalStateException("Node not found for consistent ID: " + consistentId);
-
+ if (node != null)
baselineTop.add(node);
+ else
+ baselineTop.add(new DetachedClusterNode(consistentId, null));
}
return set0(baselineTop);
@@ -175,7 +176,7 @@ public class VisorBaselineTask extends VisorOneNodeTask<VisorBaselineTaskArg, Vi
Map<String, BaselineNode> baseline = currentBaseLine();
if (F.isEmpty(baseline))
- return set0(Collections.EMPTY_LIST);
+ return set0(Collections.emptyList());
for (String consistentId : consistentIds) {
BaselineNode node = baseline.remove(consistentId);
