SOLR-8433: Adding logging

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1720673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joel Bernstein 2015-12-17 21:45:23 +00:00
parent ade2f7e077
commit 8eb40736d5
1 changed files with 9 additions and 0 deletions

View File

@ -17,6 +17,7 @@
package org.apache.solr.handler.component; package org.apache.solr.handler.component;
import java.lang.invoke.MethodHandles;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
@ -36,12 +37,17 @@ import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.SolrjNamedThreadFactory; import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.search.SolrIndexSearcher;
import org.apache.http.client.HttpClient; import org.apache.http.client.HttpClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class IterativeMergeStrategy implements MergeStrategy { public abstract class IterativeMergeStrategy implements MergeStrategy {
protected ExecutorService executorService; protected ExecutorService executorService;
protected static HttpClient httpClient; protected static HttpClient httpClient;
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
static { static {
ModifiableSolrParams params = new ModifiableSolrParams(); ModifiableSolrParams params = new ModifiableSolrParams();
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS, 128); params.set(HttpClientUtil.PROP_MAX_CONNECTIONS, 128);
@ -85,6 +91,9 @@ public abstract class IterativeMergeStrategy implements MergeStrategy {
private ShardResponse originalShardResponse; private ShardResponse originalShardResponse;
public CallBack(ShardResponse originalShardResponse, QueryRequest req) { public CallBack(ShardResponse originalShardResponse, QueryRequest req) {
log.info("################ SHARD ADDRESSS ##############:" + originalShardResponse.getShardAddress());
log.info("############ HTTP Client #############:"+ httpClient.getClass());
this.solrClient = new HttpSolrClient(originalShardResponse.getShardAddress(), httpClient); this.solrClient = new HttpSolrClient(originalShardResponse.getShardAddress(), httpClient);
this.req = req; this.req = req;
this.originalShardResponse = originalShardResponse; this.originalShardResponse = originalShardResponse;