Class SnapshotCloudManager
- java.lang.Object
-
- org.apache.solr.cloud.autoscaling.sim.SnapshotCloudManager
-
- All Implemented Interfaces:
Closeable,AutoCloseable,SolrCloudManager,SolrCloseable
public class SnapshotCloudManager extends Object implements SolrCloudManager
Read-only snapshot of anotherSolrCloudManager.
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTOSCALING_JSON_KEYstatic StringAUTOSCALING_STATE_KEYstatic StringCLUSTER_STATE_KEYstatic StringDISTRIB_STATE_KEYstatic StringMANAGER_STATE_KEYstatic StringNODE_STATE_KEYstatic List<String>REQUIRED_KEYSstatic StringSTATISTICS_STATE_KEY
-
Constructor Summary
Constructors Constructor Description SnapshotCloudManager(Map<String,Object> snapshot)SnapshotCloudManager(SolrCloudManager other, AutoScalingConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ClusterStateProvidergetClusterStateProvider()DistribStateManagergetDistribStateManager()DistributedQueueFactorygetDistributedQueueFactory()NodeStateProvidergetNodeStateProvider()ObjectCachegetObjectCache()Map<String,Object>getSnapshot(boolean withAutoscaling, boolean redact)TimeSourcegetTimeSource()byte[]httpRequest(String url, SolrRequest.METHOD method, Map<String,String> headers, String payload, int timeout, boolean followRedirects)static SnapshotCloudManagerreadSnapshot(File sourceDir)SolrResponserequest(SolrRequest req)voidsaveSnapshot(File targetDir, boolean withAutoscaling, boolean redact)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.common.SolrCloseable
isClosed
-
-
-
-
Field Detail
-
MANAGER_STATE_KEY
public static final String MANAGER_STATE_KEY
- See Also:
- Constant Field Values
-
CLUSTER_STATE_KEY
public static final String CLUSTER_STATE_KEY
- See Also:
- Constant Field Values
-
NODE_STATE_KEY
public static final String NODE_STATE_KEY
- See Also:
- Constant Field Values
-
DISTRIB_STATE_KEY
public static final String DISTRIB_STATE_KEY
- See Also:
- Constant Field Values
-
AUTOSCALING_STATE_KEY
public static final String AUTOSCALING_STATE_KEY
- See Also:
- Constant Field Values
-
STATISTICS_STATE_KEY
public static final String STATISTICS_STATE_KEY
- See Also:
- Constant Field Values
-
AUTOSCALING_JSON_KEY
public static final String AUTOSCALING_JSON_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SnapshotCloudManager
public SnapshotCloudManager(SolrCloudManager other, AutoScalingConfig config) throws Exception
- Throws:
Exception
-
-
Method Detail
-
saveSnapshot
public void saveSnapshot(File targetDir, boolean withAutoscaling, boolean redact) throws Exception
- Throws:
Exception
-
readSnapshot
public static SnapshotCloudManager readSnapshot(File sourceDir) throws Exception
- Throws:
Exception
-
getSnapshot
public Map<String,Object> getSnapshot(boolean withAutoscaling, boolean redact) throws Exception
- Throws:
Exception
-
getClusterStateProvider
public ClusterStateProvider getClusterStateProvider()
- Specified by:
getClusterStateProviderin interfaceSolrCloudManager
-
getNodeStateProvider
public NodeStateProvider getNodeStateProvider()
- Specified by:
getNodeStateProviderin interfaceSolrCloudManager
-
getDistribStateManager
public DistribStateManager getDistribStateManager()
- Specified by:
getDistribStateManagerin interfaceSolrCloudManager
-
getDistributedQueueFactory
public DistributedQueueFactory getDistributedQueueFactory()
- Specified by:
getDistributedQueueFactoryin interfaceSolrCloudManager
-
getObjectCache
public ObjectCache getObjectCache()
- Specified by:
getObjectCachein interfaceSolrCloudManager
-
getTimeSource
public TimeSource getTimeSource()
- Specified by:
getTimeSourcein interfaceSolrCloudManager
-
request
public SolrResponse request(SolrRequest req) throws IOException
- Specified by:
requestin interfaceSolrCloudManager- Throws:
IOException
-
httpRequest
public byte[] httpRequest(String url, SolrRequest.METHOD method, Map<String,String> headers, String payload, int timeout, boolean followRedirects) throws IOException
- Specified by:
httpRequestin interfaceSolrCloudManager- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-