Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-5850

Introduce an API for baseline topology for persistence-enabled clusters

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.4
    • persistence

    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);
      

      Attachments

        Activity

          People

            sergey-chugunov Sergey Chugunov
            agoncharuk Alexey Goncharuk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: