[Rename] ElasticsearchMergePolicy class in server module (#181)
This commit refactors ElasticsearchMergePolicy class in the server module to OpenSearchMergePolicy. References and usages throughout the rest of the codebase are fully refactored. Signed-off-by: Nicholas Knize <nknize@amazon.com>
This commit is contained in:
parent
2549db3493
commit
92d138309a
|
@ -87,7 +87,7 @@ import org.elasticsearch.index.merge.OnGoingMerge;
|
|||
import org.elasticsearch.index.seqno.LocalCheckpointTracker;
|
||||
import org.elasticsearch.index.seqno.SeqNoStats;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.index.shard.ElasticsearchMergePolicy;
|
||||
import org.elasticsearch.index.shard.OpenSearchMergePolicy;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.index.translog.Translog;
|
||||
|
@ -2028,9 +2028,9 @@ public class InternalEngine extends Engine {
|
|||
* thread for optimize, and the 'optimizeLock' guarding this code, and (3) ConcurrentMergeScheduler
|
||||
* syncs calls to findForcedMerges.
|
||||
*/
|
||||
assert indexWriter.getConfig().getMergePolicy() instanceof ElasticsearchMergePolicy : "MergePolicy is " +
|
||||
assert indexWriter.getConfig().getMergePolicy() instanceof OpenSearchMergePolicy : "MergePolicy is " +
|
||||
indexWriter.getConfig().getMergePolicy().getClass().getName();
|
||||
ElasticsearchMergePolicy mp = (ElasticsearchMergePolicy) indexWriter.getConfig().getMergePolicy();
|
||||
OpenSearchMergePolicy mp = (OpenSearchMergePolicy) indexWriter.getConfig().getMergePolicy();
|
||||
optimizeLock.lock();
|
||||
try {
|
||||
ensureOpen();
|
||||
|
@ -2319,7 +2319,7 @@ public class InternalEngine extends Engine {
|
|||
// to enable it.
|
||||
mergePolicy = new ShuffleForcedMergePolicy(mergePolicy);
|
||||
}
|
||||
iwc.setMergePolicy(new ElasticsearchMergePolicy(mergePolicy));
|
||||
iwc.setMergePolicy(new OpenSearchMergePolicy(mergePolicy));
|
||||
iwc.setSimilarity(engineConfig.getSimilarity());
|
||||
iwc.setRAMBufferSizeMB(engineConfig.getIndexingBufferSize().getMbFrac());
|
||||
iwc.setCodec(engineConfig.getCodec());
|
||||
|
|
|
@ -44,9 +44,9 @@ import java.util.Map;
|
|||
* For now, this {@link MergePolicy} takes care of moving versions that used to
|
||||
* be stored as payloads to numeric doc values.
|
||||
*/
|
||||
public final class ElasticsearchMergePolicy extends FilterMergePolicy {
|
||||
public final class OpenSearchMergePolicy extends FilterMergePolicy {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(ElasticsearchMergePolicy.class);
|
||||
private static final Logger logger = LogManager.getLogger(OpenSearchMergePolicy.class);
|
||||
|
||||
// True if the next merge request should do segment upgrades:
|
||||
private volatile boolean upgradeInProgress;
|
||||
|
@ -57,7 +57,7 @@ public final class ElasticsearchMergePolicy extends FilterMergePolicy {
|
|||
private static final int MAX_CONCURRENT_UPGRADE_MERGES = 5;
|
||||
|
||||
/** @param delegate the merge policy to wrap */
|
||||
public ElasticsearchMergePolicy(MergePolicy delegate) {
|
||||
public OpenSearchMergePolicy(MergePolicy delegate) {
|
||||
super(delegate);
|
||||
}
|
||||
|
Loading…
Reference in New Issue