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 String
AUTOSCALING_JSON_KEY
static String
AUTOSCALING_STATE_KEY
static String
CLUSTER_STATE_KEY
static String
DISTRIB_STATE_KEY
static String
MANAGER_STATE_KEY
static String
NODE_STATE_KEY
static List<String>
REQUIRED_KEYS
static String
STATISTICS_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 void
close()
ClusterStateProvider
getClusterStateProvider()
DistribStateManager
getDistribStateManager()
DistributedQueueFactory
getDistributedQueueFactory()
NodeStateProvider
getNodeStateProvider()
ObjectCache
getObjectCache()
Map<String,Object>
getSnapshot(boolean withAutoscaling, boolean redact)
TimeSource
getTimeSource()
byte[]
httpRequest(String url, SolrRequest.METHOD method, Map<String,String> headers, String payload, int timeout, boolean followRedirects)
static SnapshotCloudManager
readSnapshot(File sourceDir)
SolrResponse
request(SolrRequest req)
void
saveSnapshot(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:
getClusterStateProvider
in interfaceSolrCloudManager
-
getNodeStateProvider
public NodeStateProvider getNodeStateProvider()
- Specified by:
getNodeStateProvider
in interfaceSolrCloudManager
-
getDistribStateManager
public DistribStateManager getDistribStateManager()
- Specified by:
getDistribStateManager
in interfaceSolrCloudManager
-
getDistributedQueueFactory
public DistributedQueueFactory getDistributedQueueFactory()
- Specified by:
getDistributedQueueFactory
in interfaceSolrCloudManager
-
getObjectCache
public ObjectCache getObjectCache()
- Specified by:
getObjectCache
in interfaceSolrCloudManager
-
getTimeSource
public TimeSource getTimeSource()
- Specified by:
getTimeSource
in interfaceSolrCloudManager
-
request
public SolrResponse request(SolrRequest req) throws IOException
- Specified by:
request
in 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:
httpRequest
in interfaceSolrCloudManager
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-