热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState()方法的使用及代码示例

本文整理了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) {

推荐阅读
author-avatar
不分手得恋爱假的_457
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有