public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState.IndexWriterCloser, SolrMetricProducer
DirectUpdateHandler2
implements an UpdateHandler where documents are added
directly to the main Lucene index as opposed to adding to a separate smaller index.SolrInfoBean.Category, SolrInfoBean.Group
Modifier and Type | Field and Description |
---|---|
static boolean |
commitOnClose |
protected CommitTracker |
commitTracker |
protected boolean |
commitWithinSoftCommit |
protected boolean |
indexWriterCloseWaitsForMerges |
protected CommitTracker |
softCommitTracker |
protected SolrCoreState |
solrCoreState |
commitCallbacks, core, idField, idFieldType, metricNames, optimizeCallbacks, registry, softCommitCallbacks, ulog
Constructor and Description |
---|
DirectUpdateHandler2(SolrCore core) |
DirectUpdateHandler2(SolrCore core,
UpdateHandler updateHandler) |
callPostCommitCallbacks, callPostOptimizeCallbacks, callPostSoftCommitCallbacks, getCategory, getMetricNames, getMetricRegistry, informEventListeners, registerCommitCallback, registerOptimizeCallback, registerSoftCommitCallback
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetricsSnapshot, registerMetricName
protected final SolrCoreState solrCoreState
protected final CommitTracker commitTracker
protected final CommitTracker softCommitTracker
protected boolean commitWithinSoftCommit
protected boolean indexWriterCloseWaitsForMerges
public static volatile boolean commitOnClose
public DirectUpdateHandler2(SolrCore core)
public DirectUpdateHandler2(SolrCore core, UpdateHandler updateHandler)
public void initializeMetrics(SolrMetricManager manager, String registryName, String tag, String scope)
SolrMetricProducer
initializeMetrics
in interface SolrMetricProducer
manager
- an instance of SolrMetricManager
registryName
- registry name where metrics are registeredtag
- a symbolic tag that represents this instance of the producer,
or a group of related instances that have the same life-cycle. This tag is
used when managing life-cycle of some metrics and is set when
SolrMetricProducer.initializeMetrics(SolrMetricManager, String, String, String)
is called.scope
- scope of the metrics (eg. handler name) to separate metrics ofprotected void rollbackWriter() throws IOException
IOException
public int addDoc(AddUpdateCommand cmd) throws IOException
addDoc
in class UpdateHandler
IOException
public void delete(DeleteUpdateCommand cmd) throws IOException
delete
in class UpdateHandler
IOException
public void clearIndex() throws IOException
IOException
public void deleteByQuery(DeleteUpdateCommand cmd) throws IOException
deleteByQuery
in class UpdateHandler
IOException
public int mergeIndexes(MergeIndexesCommand cmd) throws IOException
mergeIndexes
in class UpdateHandler
IOException
public void prepareCommit(CommitUpdateCommand cmd) throws IOException
IOException
public void commit(CommitUpdateCommand cmd) throws IOException
commit
in class UpdateHandler
IOException
public void newIndexWriter(boolean rollback) throws IOException
UpdateHandler
newIndexWriter
in class UpdateHandler
rollback
- IndexWriter if true else closeIOException
- If there is a low-level I/O error.public void rollback(RollbackUpdateCommand cmd) throws IOException
rollback
in class UpdateHandler
IOException
public UpdateLog getUpdateLog()
getUpdateLog
in class UpdateHandler
public void close() throws IOException
close
in class UpdateHandler
IOException
public void closeWriter(IndexWriter writer) throws IOException
closeWriter
in interface SolrCoreState.IndexWriterCloser
IOException
public void split(SplitIndexCommand cmd) throws IOException
split
in class UpdateHandler
IOException
public String getName()
SolrInfoBean
getName
in interface SolrInfoBean
public String getDescription()
SolrInfoBean
getDescription
in interface SolrInfoBean
public SolrCoreState getSolrCoreState()
getSolrCoreState
in class UpdateHandler
public CommitTracker getCommitTracker()
public CommitTracker getSoftCommitTracker()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.