Package org.apache.solr.core
Class ZkContainer
- java.lang.Object
-
- org.apache.solr.core.ZkContainer
-
public class ZkContainer extends Object
Used byCoreContainer
to hold ZooKeeper / SolrCloud info, especiallyZkController
. Mainly it does some ZK initialization, and ensures a loading core registers in ZK. Even when in standalone mode, perhaps surprisingly, an instance of this class exists. IfgetZkController()
returns null then we're in standalone mode.
-
-
Field Summary
Fields Modifier and Type Field Description static Predicate<CoreDescriptor>
testing_beforeRegisterInZk
protected ZkController
zkController
-
Constructor Summary
Constructors Constructor Description ZkContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ExecutorService
getCoreZkRegisterExecutorService()
ZkController
getZkController()
SolrMetricProducer
getZkMetricsProducer()
void
initZooKeeper(CoreContainer cc, CloudConfig config)
void
registerInZk(SolrCore core, boolean background, boolean skipRecovery)
-
-
-
Field Detail
-
zkController
protected ZkController zkController
-
testing_beforeRegisterInZk
public static volatile Predicate<CoreDescriptor> testing_beforeRegisterInZk
-
-
Method Detail
-
initZooKeeper
public void initZooKeeper(CoreContainer cc, CloudConfig config)
-
registerInZk
public void registerInZk(SolrCore core, boolean background, boolean skipRecovery)
-
getZkController
public ZkController getZkController()
-
close
public void close()
-
getCoreZkRegisterExecutorService
public ExecutorService getCoreZkRegisterExecutorService()
-
getZkMetricsProducer
public SolrMetricProducer getZkMetricsProducer()
-
-