Package org.apache.solr.update
Class PeerSync
- java.lang.Object
-
- org.apache.solr.update.PeerSync
-
- All Implemented Interfaces:
SolrMetricProducer
public class PeerSync extends Object implements SolrMetricProducer
This class is useful for performing peer to peer synchronization of recently indexed update commands during recovery process.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPeerSync.MissedUpdatesFinderHelper class for doing comparison ourUpdates and other replicas's updates to find the updates that we missedstatic classPeerSync.MissedUpdatesRequestResult ofPeerSync.MissedUpdatesFinderstatic classPeerSync.PeerSyncResult
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Long>absComparatorstatic StringMETRIC_SCOPE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitializeMetrics(SolrMetricManager manager, String registry, String tag, String scope)Initializes metrics specific to this producerstatic longpercentile(List<Long> arr, float frac)PeerSync.PeerSyncResultsync()Returns true if peer sync was successful, meaning that this core may be considered to have the latest updates.
-
-
-
Field Detail
-
absComparator
public static Comparator<Long> absComparator
-
METRIC_SCOPE
public static final String METRIC_SCOPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
initializeMetrics
public void initializeMetrics(SolrMetricManager manager, String registry, String tag, String scope)
Description copied from interface:SolrMetricProducerInitializes metrics specific to this producer- Specified by:
initializeMetricsin interfaceSolrMetricProducer- Parameters:
manager- an instance ofSolrMetricManagerregistry- 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 whenSolrMetricProducer.initializeMetrics(SolrMetricManager, String, String, String)is called.scope- scope of the metrics (eg. handler name) to separate metrics of
-
sync
public PeerSync.PeerSyncResult sync()
Returns true if peer sync was successful, meaning that this core may be considered to have the latest updates. It does not mean that the remote replica is in sync with us.
-
-