本文整理汇总了Java中org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer.setConnectionTimeout方法的典型用法代码示例。如果您正苦于以下问题:Java ConcurrentUpdateSolrServer.setConnectionTimeout方法的具体用法?Java ConcurrentUpdateSolrServer.setConnectionTimeout怎么用?Java ConcurrentUpdateSolrServer.setConnectionTimeout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer
的用法示例。
在下文中一共展示了ConcurrentUpdateSolrServer.setConnectionTimeout方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testIndexingWithSuss
import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer; //导入方法依赖的package包/类
private long testIndexingWithSuss(long docId) throws Exception {
ConcurrentUpdateSolrServer suss = new ConcurrentUpdateSolrServer(
((HttpSolrServer) clients.get(0)).getBaseURL(), 10, 2);
QueryResponse results = query(cloudClient);
long beforeCount = results.getResults().getNumFound();
int cnt = TEST_NIGHTLY ? 2933 : 313;
try {
suss.setConnectionTimeout(120000);
for (int i = 0; i < cnt; i++) {
index_specific(suss, id, docId++, "text_t", "some text so that it not's negligent work to parse this doc, even though it's still a pretty short doc");
}
suss.blockUntilFinished();
commit();
checkShardConsistency();
assertDocCounts(VERBOSE);
} finally {
suss.shutdown();
}
results = query(cloudClient);
assertEquals(beforeCount + cnt, results.getResults().getNumFound());
return docId;
}
示例2: testIndexingWithSuss
import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer; //导入方法依赖的package包/类
private void testIndexingWithSuss() throws Exception {
ConcurrentUpdateSolrServer suss = new ConcurrentUpdateSolrServer(
((HttpSolrServer) clients.get(0)).getBaseURL(), 3, 1);
suss.setConnectionTimeout(15000);
suss.setSoTimeout(30000);
for (int i=100; i<150; i++) {
index_specific(suss, id, i);
}
suss.blockUntilFinished();
commit();
checkShardConsistency();
}
示例3: buildConcurrentUpdateSolrServer
import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer; //导入方法依赖的package包/类
private SolrServer buildConcurrentUpdateSolrServer() {
String serverUrl = this.conf.getServerUrls().iterator().next();
ConcurrentUpdateSolrServer solrServer = new ConcurrentUpdateSolrServer(serverUrl, 256, 8);
solrServer.setConnectionTimeout(this.conf.getConnectionTimeout());
solrServer.setParser(this.conf.getResponseParser());
solrServer.setSoTimeout(this.conf.getReadTimeout());
solrServer.setRequestWriter(this.conf.getRequestWriter());
return solrServer;
}
示例4: MarauderBaseSolrIndexerSerializer
import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer; //导入方法依赖的package包/类
public MarauderBaseSolrIndexerSerializer(MarauderHBaseSink parentSink, int windowSize) {
super(parentSink, windowSize);
solrServer = new ConcurrentUpdateSolrServer(parentSink.getSolrServerURL(),
parentSink.getBatchSize(), 2);
solrServer.setConnectionTimeout(10000);
}