[
https://issues.apache.org/jira/browse/IGNITE-5850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexey Goncharuk updated IGNITE-5850:
-------------------------------------
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:
{code}
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 {
// ....
}
{code}
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:
{code}
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);
{code}
was:
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:
{code}
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 {
// ....
}
{code}
This is a minimal yet sufficient API change allowing full-fledged baseline
topology management both from API and from CLI or UI utilities.
> Introduce an API for baseline topology for persistence-enabled clusters
> -----------------------------------------------------------------------
>
> Key: IGNITE-5850
> URL: https://issues.apache.org/jira/browse/IGNITE-5850
> Project: Ignite
> Issue Type: New Feature
> Components: persistence
> Affects Versions: 2.1
> Reporter: Alexey Goncharuk
> Priority: Major
> Labels: IEP-4, Phase-1
> Fix For: 2.4
>
>
> 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:
> {code}
> 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 {
> // ....
> }
> {code}
> 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:
> {code}
> 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);
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)