Recursively reconfigures the cluster.
976411
private void configure(RaftMember.Type type, CompletableFuture<Void> future) {
    // Set a timer to retry the attempt to leave the cluster.
    configureTimeout = cluster.getContext().getThreadContext().schedule(cluster.getContext().getElectionTimeout(), () -> {
      configure(type, future);
    });

    // Attempt to leave the cluster by submitting a LeaveRequest directly to the server state.
    // Non-leader states should forward the request to the leader if there is one. Leader states
    // will log, replicate, and commit the reconfiguration.
    cluster.getContext().getRaftRole().onReconfigure(ReconfigureRequest.builder()
        .withIndex(cluster.getConfiguration().index())
        .withTerm(cluster.getConfiguration().term())
        .withMember(new DefaultRaftMember(id, type, updated))
        .build()).whenComplete((response, error) -> {
          if (error == null) {
            if (response.status() == RaftResponse.Status.OK) {
              cancelConfigureTimer();
              cluster.configure(new Configuration(response.index(), response.term(), response.timestamp(), response.members()));
              future.complete(null);
            } else if (response.error() == null
                || response.error().type() == RaftError.Type.UNAVAILABLE
                || response.error().type() == RaftError.Type.PROTOCOL_ERROR
                || response.error().type() == RaftError.Type.NO_LEADER) {
              cancelConfigureTimer();
              configureTimeout = cluster.getContext().getThreadContext().schedule(cluster.getContext().getElectionTimeout().multipliedBy(2), () -> configure(type, future));
            } else {
              cancelConfigureTimer();
              future.completeExceptionally(response.error().createException());
            }
          } else {
            future.completeExceptionally(error);
          }
        });
  }
265731
void reconfigure(com.couchbase.lite.internal.database.sqlite.SQLiteDatabaseConfiguration configuration) {
        mOnlyAllowReadOnlyOperations = false;

        // Remember what changed.
        boolean foreignKeyModeChanged = configuration.foreignKeyConstraintsEnabled
                != mConfiguration.foreignKeyConstraintsEnabled;
        boolean walModeChanged = ((configuration.openFlags ^ mConfiguration.openFlags)
                & com.couchbase.lite.internal.database.sqlite.SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING) != 0;

        // Update configuration parameters.
        mConfiguration.updateParametersFrom(configuration);

        // Update foreign key mode.
        if (foreignKeyModeChanged) {
            setForeignKeyModeFromConfiguration();
        }

        // Update WAL.
        if (walModeChanged) {
            setWalModeFromConfiguration();
        }
    }
17089
@SuppressWarnings("WeakerAccess")
  public Cluster resizeCluster(String instanceId, String clusterId, int numServeNodes) {
    return ApiExceptions.callAndTranslateApiException(
        resizeClusterAsync(instanceId, clusterId, numServeNodes));
  }
430519
private ClusterDasVmSettings createClusterDasVmSettings(String restartPriority) {
        ClusterDasVmSettings clusterDasVmSettings = new ClusterDasVmSettings();
        clusterDasVmSettings.setRestartPriority(restartPriority);
        return clusterDasVmSettings;
    }
165858
def _put_cluster(self, dic, params=None):
    """"""
    cluster = self._put('', ApiCluster, data=dic, params=params)
    self._update(cluster)
    return self
319805
public void process( List<List<SquareNode>> clusters ) {
		grids.reset();
		for (int i = 0; i < clusters.size(); i++) {
			if( checkPreconditions(clusters.get(i)))
				processCluster(clusters.get(i));
		}
	}
549693
async def cluster_reset(self, node_id, soft=True):
        
        option = 'SOFT' if soft else 'HARD'
        return await self.execute_command('CLUSTER RESET', option, node_id=node_id)
843486
private void recursivels(FileSystem fs, Path p, List<FileStatus> out) 
  throws IOException {
    FileStatus fstatus = fs.getFileStatus(p);
    if (!fstatus.isDir()) {
      out.add(fstatus);
      return;
    }
    else {
      out.add(fstatus);
      FileStatus[] listStatus = fs.listStatus(p);
      for (FileStatus stat: listStatus) {
        recursivels(fs, stat.getPath(), out);
      }
    }
  }
879049
def reconfigure(working_dir):
    
    configure(working_dir, force=True, interactive=True)
    print "Blockstack successfully reconfigured."
    sys.exit(0)
1360989
final void rebalance() {
        // Let's start distribute the vbuckets across the servers
        configurationRwLock.writeLock().lock();
        try {
            Info.incrementConfigRevision();
            List<MemcachedServer> nodes = activeServers();
            for (int ii = 0; ii < numVBuckets; ++ii) {
                Collections.shuffle(nodes);
                vbInfo[ii].setOwner(nodes.get(0));
                if (nodes.size() < 2) {
                    continue;
                }
                List<MemcachedServer> replicas = nodes.subList(1, nodes.size());
                if (replicas.size() > numReplicas) {
                    replicas = replicas.subList(0, numReplicas);
                }
                vbInfo[ii].setReplicas(replicas);
            }
        } finally {
            Info.incrementConfigRevision();
            configurationRwLock.writeLock().unlock();
        }
    }
736644
def reset(self):
        
        self._undo_stack.clear()
        self._spike_clusters = self._spike_clusters_base
        self._new_cluster_id = self._new_cluster_id_0
868673
def restart_cluster(name):
    '''
    

    '''
    ret = {'name': name,
           'changes': {},
           'result': None,
           'comment': ''}

    if __opts__['test']:
        ret['comment'] = 'Restarting cluster'
        return ret

    __salt__['trafficserver.restart_cluster']()

    ret['result'] = True
    ret['comment'] = 'Restarted cluster'
    return ret
942408
public void reloadPartitions() {

        if (partitions == null) {
            initializePartitions();
            partitions.updateCache();
        } else {

            Partitions loadedPartitions = loadPartitions();
            if (TopologyComparators.isChanged(getPartitions(), loadedPartitions)) {

                logger.debug("Using a new cluster topology");

                List<RedisClusterNode> before = new ArrayList<RedisClusterNode>(getPartitions());
                List<RedisClusterNode> after = new ArrayList<RedisClusterNode>(loadedPartitions);

                getResources().eventBus().publish(new ClusterTopologyChangedEvent(before, after));
            }

            this.partitions.reload(loadedPartitions.getPartitions());
        }

        updatePartitionsInConnections();
    }
1238012
def create_or_update_cluster(config_file, override_min_workers,
                             override_max_workers, no_restart, restart_only,
                             yes, override_cluster_name):
    """"""
    config = yaml.load(open(config_file).read())
    if override_min_workers is not None:
        config["min_workers"] = override_min_workers
    if override_max_workers is not None:
        config["max_workers"] = override_max_workers
    if override_cluster_name is not None:
        config["cluster_name"] = override_cluster_name
    config = _bootstrap_config(config)
    get_or_create_head_node(config, config_file, no_restart, restart_only, yes,
                            override_cluster_name)
384098
public synchronized void reconfigure(Properties props) {
        // First isolate any property that is different from the immutable
        // set of original initialization properties
        Properties newOverrideProps = new Properties();
        for (Entry<Object, Object> prop : props.entrySet()) {
            if (isLog4JProperty(prop.getKey().toString())) {
                Object initialValue = initialProps.get(prop.getKey());
                if (initialValue == null || !initialValue.equals(prop.getValue())) {
                    newOverrideProps.put(prop.getKey(), prop.getValue());
                }
            }
        }
        
        // Compare against our cached set of override
        if (!overrideProps.equals(newOverrideProps)) {
            this.overrideProps.clear();
            this.overrideProps.putAll(newOverrideProps);
            reConfigureAsynchronously();
        }
    }
646800
def merge( self, other_cluster ):
        
        new_cluster = Cluster( self.sites | other_cluster.sites )
        new_cluster.neighbours = ( self.neighbours | other_cluster.neighbours ).difference( new_cluster.sites )
        return new_cluster
869504
ClusterState commit() {
    // Apply the configuration to the local server state.
    context.transition(member.type());
    if (!configuration.members().contains(member) && leaveFuture != null) {
      leaveFuture.complete(null);
    }

    // If the local stored configuration is older than the committed configuration, overwrite it.
    if (context.getMetaStore().loadConfiguration().index() < configuration.index()) {
      context.getMetaStore().storeConfiguration(configuration);
    }
    return this;
  }