作者:不分手得恋爱假的_457 | 来源:互联网 | 2023-09-11 23:59
本文整理了Java中org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState()
本文整理了Java中org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState()
方法的一些代码示例,展示了CloudSolrClient.requestWithRetryOnStaleState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CloudSolrClient.requestWithRetryOnStaleState()
方法的具体详情如下:
包路径:org.apache.solr.client.solrj.impl.CloudSolrClient
类名称:CloudSolrClient
方法名:requestWithRetryOnStaleState
CloudSolrClient.requestWithRetryOnStaleState介绍
[英]As this class doesn't watch external collections on the client side, there's a chance that the request will fail due to cached stale state, which means the state must be refreshed from ZK and retried.
[中]由于此类不监视客户端上的外部集合,因此有可能由于缓存的过时状态而导致请求失败,这意味着必须从ZK刷新状态并重试。
代码示例
代码示例来源:origin: org.apache.solr/solr-solrj
@Override
public NamedList request(SolrRequest request, String collection) throws SolrServerException, IOException {
// the collection parameter of the request overrides that of the parameter to this method
String requestCollection = request.getCollection();
if (requestCollection != null) {
collection = requestCollection;
} else if (collection == null) {
collection = defaultCollection;
}
List inputCollectiOns=
collection == null ? Collections.emptyList() : StrUtils.splitSmart(collection, ",", true);
return requestWithRetryOnStaleState(request, 0, inputCollections);
}
代码示例来源:origin: com.hynnet/solr-solrj
@Override
public NamedList request(SolrRequest request, String collection) throws SolrServerException, IOException {
SolrParams reqParams = request.getParams();
if (collection == null)
collection = (reqParams != null) ? reqParams.get("collection", getDefaultCollection()) : getDefaultCollection();
return requestWithRetryOnStaleState(request, 0, collection);
}
private static final Set ADMIN_PATHS = new HashSet<>(Arrays.asList(
代码示例来源:origin: org.apache.solr/solr-solrj
return requestWithRetryOnStaleState(request, retryCount + 1, inputCollections);
resp = requestWithRetryOnStaleState(request, retryCount+1, inputCollections);
} else {
if (exc instanceof SolrException || exc instanceof SolrServerException || exc instanceof IOException) {
代码示例来源:origin: com.hynnet/solr-solrj
resp = requestWithRetryOnStaleState(request, retryCount+1, collection);
} else {
if(exc instanceof SolrException) {