public class DistributedUpdateProcessor extends UpdateRequestProcessor
| Modifier and Type | Class and Description |
|---|---|
static class |
DistributedUpdateProcessor.DistribPhase
Values this processor supports for the
DISTRIB_UPDATE_PARAM. |
static class |
DistributedUpdateProcessor.DistributedUpdatesAsyncException |
static class |
DistributedUpdateProcessor.LeaderRequestReplicationTracker |
static class |
DistributedUpdateProcessor.RollupRequestReplicationTracker |
| Modifier and Type | Field and Description |
|---|---|
static String |
COMMIT_END_POINT |
static String |
DISTRIB_FROM |
static String |
DISTRIB_FROM_COLLECTION |
static String |
DISTRIB_FROM_PARENT |
static String |
DISTRIB_FROM_SHARD |
static String |
DISTRIB_INPLACE_PREVVERSION |
protected boolean |
forwardToLeader |
protected boolean |
isIndexChanged |
protected boolean |
isLeader |
protected boolean |
isSubShardLeader |
static String |
LOG_REPLAY |
protected int |
maxRetriesOnForward
Number of times requests forwarded to some other shard's leader can be retried
|
protected int |
maxRetriesToFollowers
Number of times requests from leaders to followers can be retried
|
protected Replica.Type |
replicaType |
protected SolrQueryRequest |
req |
protected SolrQueryResponse |
rsp |
protected static String |
TEST_DISTRIB_SKIP_SERVERS |
protected UpdateCommand |
updateCommand |
next| Constructor and Description |
|---|
DistributedUpdateProcessor(SolrQueryRequest req,
SolrQueryResponse rsp,
AtomicUpdateDocumentMerger docMerger,
UpdateRequestProcessor next)
Specification of AtomicUpdateDocumentMerger is currently experimental.
|
DistributedUpdateProcessor(SolrQueryRequest req,
SolrQueryResponse rsp,
UpdateRequestProcessor next) |
| Modifier and Type | Method and Description |
|---|---|
static int |
bucketHash(BytesRef idBytes) |
protected Replica.Type |
computeReplicaType() |
protected void |
doDeleteById(DeleteUpdateCommand cmd) |
protected void |
doDeleteByQuery(DeleteUpdateCommand cmd)
for implementing classes to setup request data(nodes, replicas)
|
protected void |
doDeleteByQuery(DeleteUpdateCommand cmd,
List<SolrCmdDistributor.Node> replicas,
DocCollection coll)
should be called by implementing class after setting up replicas
|
protected void |
doDistribAdd(AddUpdateCommand cmd) |
protected void |
doDistribDeleteById(DeleteUpdateCommand cmd)
This method can be overridden to tamper with the cmd after the localDeleteById operation
|
protected void |
doDistribDeleteByQuery(DeleteUpdateCommand cmd,
List<SolrCmdDistributor.Node> replicas,
DocCollection coll)
This runs after versionDeleteByQuery is invoked, should be used to tamper or forward DeleteCommand
|
protected void |
doDistribFinish() |
protected void |
doLocalCommit(CommitUpdateCommand cmd) |
protected ModifiableSolrParams |
filterParams(SolrParams params) |
void |
finish() |
protected String |
getLeaderUrl(String id) |
static boolean |
getNonZkLeaderAssumption(SolrQueryRequest req)
Returns a boolean indicating whether or not the caller should behave as
if this is the "leader" even when ZooKeeper is not enabled.
|
void |
processAdd(AddUpdateCommand cmd) |
void |
processCommit(CommitUpdateCommand cmd) |
void |
processDelete(DeleteUpdateCommand cmd) |
protected boolean |
shouldCloneCmdDoc() |
protected boolean |
versionAdd(AddUpdateCommand cmd) |
protected boolean |
versionDelete(DeleteUpdateCommand cmd) |
protected void |
versionDeleteByQuery(DeleteUpdateCommand cmd) |
close, doClose, processMergeIndexes, processRollbackpublic static final String DISTRIB_FROM_SHARD
public static final String DISTRIB_FROM_COLLECTION
public static final String DISTRIB_FROM_PARENT
public static final String DISTRIB_FROM
public static final String DISTRIB_INPLACE_PREVVERSION
protected static final String TEST_DISTRIB_SKIP_SERVERS
public static final String COMMIT_END_POINT
public static final String LOG_REPLAY
protected final SolrQueryRequest req
protected final SolrQueryResponse rsp
protected boolean isLeader
protected boolean forwardToLeader
protected boolean isSubShardLeader
protected boolean isIndexChanged
protected final int maxRetriesOnForward
protected final int maxRetriesToFollowers
protected UpdateCommand updateCommand
protected final Replica.Type replicaType
public DistributedUpdateProcessor(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)
public DistributedUpdateProcessor(SolrQueryRequest req, SolrQueryResponse rsp, AtomicUpdateDocumentMerger docMerger, UpdateRequestProcessor next)
protected Replica.Type computeReplicaType()
public void processAdd(AddUpdateCommand cmd) throws IOException
processAdd in class UpdateRequestProcessorIOExceptionprotected void doDistribAdd(AddUpdateCommand cmd) throws IOException
IOExceptionpublic static int bucketHash(BytesRef idBytes)
protected boolean versionAdd(AddUpdateCommand cmd) throws IOException
IOException - If there is a low-level I/O error.protected boolean shouldCloneCmdDoc()
public void processDelete(DeleteUpdateCommand cmd) throws IOException
processDelete in class UpdateRequestProcessorIOExceptionprotected void doDeleteById(DeleteUpdateCommand cmd) throws IOException
IOExceptionprotected void doDistribDeleteById(DeleteUpdateCommand cmd) throws IOException
cmd - the delete commandIOException - in case post processing failedprotected ModifiableSolrParams filterParams(SolrParams params)
protected void doDeleteByQuery(DeleteUpdateCommand cmd) throws IOException
cmd - the delete command being processedIOExceptionprotected void doDeleteByQuery(DeleteUpdateCommand cmd, List<SolrCmdDistributor.Node> replicas, DocCollection coll) throws IOException
cmd - delete commandreplicas - list of Nodes replicas to pass to doDistribDeleteByQuery(DeleteUpdateCommand, List, DocCollection)coll - the collection in zookeeper DocCollection,
passed to doDistribDeleteByQuery(DeleteUpdateCommand, List, DocCollection)IOExceptionprotected void doDistribDeleteByQuery(DeleteUpdateCommand cmd, List<SolrCmdDistributor.Node> replicas, DocCollection coll) throws IOException
cmd - delete commandreplicas - list of Nodes replicascoll - the collection in zookeeper DocCollection.IOException - in case post processing failedprotected void versionDeleteByQuery(DeleteUpdateCommand cmd) throws IOException
IOExceptionprotected String getLeaderUrl(String id)
id - id of docprotected boolean versionDelete(DeleteUpdateCommand cmd) throws IOException
IOExceptionpublic void processCommit(CommitUpdateCommand cmd) throws IOException
processCommit in class UpdateRequestProcessorIOExceptionprotected void doLocalCommit(CommitUpdateCommand cmd) throws IOException
IOExceptionpublic final void finish()
throws IOException
finish in class UpdateRequestProcessorIOExceptionprotected void doDistribFinish()
throws IOException
IOExceptionpublic static boolean getNonZkLeaderAssumption(SolrQueryRequest req)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.