Package org.apache.solr.update.processor
Class CdcrUpdateProcessor
- java.lang.Object
-
- org.apache.solr.update.processor.UpdateRequestProcessor
-
- org.apache.solr.update.processor.DistributedUpdateProcessor
-
- org.apache.solr.update.processor.DistributedZkUpdateProcessor
-
- org.apache.solr.update.processor.CdcrUpdateProcessor
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CdcrUpdateProcessor extends DistributedZkUpdateProcessor
Extends
DistributedUpdateProcessorto force peer sync logic for every updates. This ensures that the version parameter sent by the source cluster is kept by the target cluster.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.update.processor.DistributedUpdateProcessor
DistributedUpdateProcessor.DistribPhase, DistributedUpdateProcessor.DistributedUpdatesAsyncException, DistributedUpdateProcessor.LeaderRequestReplicationTracker, DistributedUpdateProcessor.RollupRequestReplicationTracker
-
-
Field Summary
Fields Modifier and Type Field Description static StringCDCR_UPDATE-
Fields inherited from class org.apache.solr.update.processor.DistributedZkUpdateProcessor
nodes
-
Fields inherited from class org.apache.solr.update.processor.DistributedUpdateProcessor
COMMIT_END_POINT, DISTRIB_FROM, DISTRIB_FROM_COLLECTION, DISTRIB_FROM_PARENT, DISTRIB_FROM_SHARD, DISTRIB_INPLACE_PREVVERSION, forwardToLeader, isIndexChanged, isLeader, isSubShardLeader, LOG_REPLAY, maxRetriesOnForward, maxRetriesToFollowers, replicaType, req, rsp, TEST_DISTRIB_SKIP_SERVERS, updateCommand
-
Fields inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
next
-
-
Constructor Summary
Constructors Constructor Description CdcrUpdateProcessor(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ModifiableSolrParamsfilterParams(SolrParams params)protected booleanversionAdd(AddUpdateCommand cmd)protected booleanversionDelete(DeleteUpdateCommand cmd)protected voidversionDeleteByQuery(DeleteUpdateCommand cmd)-
Methods inherited from class org.apache.solr.update.processor.DistributedZkUpdateProcessor
amISubShardLeader, computeReplicaType, doClose, doDeleteById, doDeleteByQuery, doDistribAdd, doDistribDeleteById, doDistribDeleteByQuery, finish, getLeaderUrl, getNodesByRoutingRules, getReplicaNodesForLeader, getSubShardLeaders, processAdd, processCommit, processDelete, processMergeIndexes, processRollback, setupRequest, setupRequest, shouldCloneCmdDoc
-
Methods inherited from class org.apache.solr.update.processor.DistributedUpdateProcessor
assertNotFinished, bucketHash, doDeleteByQuery, doLocalCommit, getNonZkLeaderAssumption
-
Methods inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
close
-
-
-
-
Field Detail
-
CDCR_UPDATE
public static final String CDCR_UPDATE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CdcrUpdateProcessor
public CdcrUpdateProcessor(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)
-
-
Method Detail
-
versionAdd
protected boolean versionAdd(AddUpdateCommand cmd) throws IOException
- Overrides:
versionAddin classDistributedUpdateProcessor- Returns:
- whether or not to drop this cmd
- Throws:
IOException- If there is a low-level I/O error.
-
versionDelete
protected boolean versionDelete(DeleteUpdateCommand cmd) throws IOException
- Overrides:
versionDeletein classDistributedUpdateProcessor- Throws:
IOException
-
filterParams
protected ModifiableSolrParams filterParams(SolrParams params)
-
versionDeleteByQuery
protected void versionDeleteByQuery(DeleteUpdateCommand cmd) throws IOException
- Overrides:
versionDeleteByQueryin classDistributedUpdateProcessor- Throws:
IOException
-
-