public class SimUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Set<String> |
COMMON_NODE_TAGS |
static Set<String> |
COMMON_REPLICA_TAGS |
Constructor and Description |
---|
SimUtils() |
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
calculateStats(SolrCloudManager cloudManager,
AutoScalingConfig config,
boolean verbose)
Calculate statistics of node / collection and replica layouts for the provided
SolrCloudManager . |
static void |
checkConsistency(SolrCloudManager solrCloudManager,
AutoScalingConfig config)
Check consistency of data in a
SolrCloudManager . |
static ModifiableSolrParams |
v2AdminRequestToV1Params(V2Request req)
Convert a V2
CollectionAdminRequest to regular SolrParams |
public static void checkConsistency(SolrCloudManager solrCloudManager, AutoScalingConfig config) throws Exception
SolrCloudManager
. This may be needed when constructing a simulated
instance from potentially inconsistent data (eg. partial snapshots taken at different points in time).solrCloudManager
- source managerconfig
- optional AutoScalingConfig
instance used to determine what node and replica metrics to check.Exception
public static Map<String,Object> calculateStats(SolrCloudManager cloudManager, AutoScalingConfig config, boolean verbose) throws Exception
SolrCloudManager
.cloudManager
- managerconfig
- autoscaling config, or null if the one from the provided manager should be usedverbose
- if true then add more details about replicas.Exception
public static ModifiableSolrParams v2AdminRequestToV1Params(V2Request req)
CollectionAdminRequest
to regular SolrParams
req
- requestCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.