public class PolicyHelper extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
PolicyHelper.SessionWrapper |
static class |
PolicyHelper.Status |
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
SESSION_EXPIRY |
| 构造器和说明 |
|---|
PolicyHelper() |
| 限定符和类型 | 方法和说明 |
|---|---|
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()public static PolicyHelper.SessionWrapper getLastSessionWrapper(boolean clear)
clear - whether to unset the threadlocal or notCopyright © 2006–2022 The Apache Software Foundation. All rights reserved.