Skip to content

Commit

Permalink
Made PSBA child class of PSA
Browse files Browse the repository at this point in the history
  • Loading branch information
shiv0408 committed Sep 3, 2023
1 parent b363674 commit b412bd3
Show file tree
Hide file tree
Showing 6 changed files with 258 additions and 356 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.routing.RecoverySource;
import org.opensearch.cluster.routing.RoutingNode;
import org.opensearch.cluster.routing.RoutingNodes;
Expand All @@ -47,6 +48,7 @@

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
Expand Down Expand Up @@ -192,4 +194,17 @@ protected static List<NodeAllocationResult> buildDecisionsForAllNodes(ShardRouti
}
return results;
}


protected interface INodeShardState {
BaseNodeGatewayStartedShards getShardState();
DiscoveryNode getNode();
}
protected interface INodeShardStates<T, V> {
void add(V value);
void add(T key, V value);
V get(T key);
int size();
Iterator<? extends INodeShardState> iterator();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.gateway;

import org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint;

public interface BaseNodeGatewayStartedShards {

String allocationId();
boolean primary();
ReplicationCheckpoint replicationCheckpoint();
Exception storeException();
}
Loading

0 comments on commit b412bd3

Please sign in to comment.