public class PolicyHelper extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PolicyHelper.SessionWrapper |
static class |
PolicyHelper.Status |
Modifier and Type | Field and Description |
---|---|
static int |
SESSION_EXPIRY |
Constructor and Description |
---|
PolicyHelper() |
Modifier and Type | Method and Description |
---|---|
static MapWriter |
getDiagnostics(Policy.Session session) |
static MapWriter |
getDiagnostics(Policy policy,
SolrCloudManager cloudManager) |
static PolicyHelper.SessionWrapper |
getLastSessionWrapper(boolean clear)
Use this to get the last used session wrapper in this thread
|
static List<ReplicaPosition> |
getReplicaLocations(String collName,
AutoScalingConfig autoScalingConfig,
SolrCloudManager cloudManager,
Map<String,String> optionalPolicyMapping,
List<String> shardNames,
int nrtReplicas,
int tlogReplicas,
int pullReplicas,
List<String> nodesList) |
static PolicyHelper.SessionWrapper |
getSession(SolrCloudManager cloudManager)
How to get a shared Policy Session
1) call
getSession(SolrCloudManager)
2) compute all suggestions
3) call PolicyHelper.SessionWrapper.returnSession(Policy.Session)
4) perform all suggestions
5) call PolicyHelper.SessionWrapper.release() |
static List<Suggester.SuggestionInfo> |
getSuggestions(AutoScalingConfig autoScalingConf,
SolrCloudManager cloudManager) |
static List<Suggester.SuggestionInfo> |
getSuggestions(AutoScalingConfig autoScalingConf,
SolrCloudManager cloudManager,
int max,
int timeoutInSecs,
SolrParams params) |
static List<Suggester.SuggestionInfo> |
getSuggestions(AutoScalingConfig autoScalingConf,
SolrCloudManager cloudManager,
SolrParams params) |
static void |
logState(SolrCloudManager cloudManager,
Suggester suggester)
Use this to dump the state of a system and to generate a testcase
|
public static final int SESSION_EXPIRY
public static List<ReplicaPosition> getReplicaLocations(String collName, AutoScalingConfig autoScalingConfig, SolrCloudManager cloudManager, Map<String,String> optionalPolicyMapping, List<String> shardNames, int nrtReplicas, int tlogReplicas, int pullReplicas, List<String> nodesList)
public static MapWriter getDiagnostics(Policy policy, SolrCloudManager cloudManager)
public static MapWriter getDiagnostics(Policy.Session session)
public static List<Suggester.SuggestionInfo> getSuggestions(AutoScalingConfig autoScalingConf, SolrCloudManager cloudManager, SolrParams params)
public static List<Suggester.SuggestionInfo> getSuggestions(AutoScalingConfig autoScalingConf, SolrCloudManager cloudManager)
public static List<Suggester.SuggestionInfo> getSuggestions(AutoScalingConfig autoScalingConf, SolrCloudManager cloudManager, int max, int timeoutInSecs, SolrParams params)
public static void logState(SolrCloudManager cloudManager, Suggester suggester)
public static PolicyHelper.SessionWrapper getSession(SolrCloudManager cloudManager) throws IOException, InterruptedException
getSession(SolrCloudManager)
2) compute all suggestions
3) call PolicyHelper.SessionWrapper.returnSession(Policy.Session)
4) perform all suggestions
5) call PolicyHelper.SessionWrapper.release()
IOException
InterruptedException
public static PolicyHelper.SessionWrapper getLastSessionWrapper(boolean clear)
clear
- whether to unset the threadlocal or notCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.