Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.1
Description
Since the persistence was introduced, we require that cluster be started in an inactive mode and activation happens only manually.
We need to add a concept of baseline topology which is fixed on the first cluster activation and may be changed later by a user. We need to develop a consistent API facade for this purpose.
I suggest to make the following changes:
public interface BaselineNode { public Object consistentId(); public <T> T attribute(String name); public Map<String, Object> attributes(); } public interface IgniteCluster { // ..... @Nullable public Collection<BaselineNode> currentBaselineTopology(); public void setBaselineTopology(Collection<BaselineNode> baselineTop); public void setBaselineTopology(long topVer); // .... } public interface ClusterNode extends BaselineNode { // .... }
This is a minimal yet sufficient API change allowing full-fledged baseline topology management both from API and from CLI or UI utilities.
The topology change would look like so:
IgniteCluster cluster = ignite.cluster(); Collection<BaselineNode> curTop = cluster.baselineTopology(); for (ClusterNode node : cluster.topology(cluster.currentTopologyVersion())) { if (shouldAdd(node)) curTop.add(node); } cluster.setBaselineTopology(curTop);