tests: use debug logging level for solrcloud debug output

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1538380 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-11-03 15:36:06 +00:00
parent e35fc347d8
commit 537cc460a3
4 changed files with 13 additions and 17 deletions

View File

@ -226,13 +226,13 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase {
}
// solrcloud_debug
if (Boolean.getBoolean("solr.cloud.debug")) {
if (log.isDebugEnabled()) {
try {
RefCounted<SolrIndexSearcher> searchHolder = core
.getNewestSearcher(false);
SolrIndexSearcher searcher = searchHolder.get();
try {
System.err.println(core.getCoreDescriptor().getCoreContainer()
log.debug(core.getCoreDescriptor().getCoreContainer()
.getZkController().getNodeName()
+ " synched "
+ searcher.search(new MatchAllDocsQuery(), 1).totalHits);

View File

@ -156,13 +156,13 @@ public class RecoveryStrategy extends Thread implements ClosableThread {
}
// solrcloud_debug
if (Boolean.getBoolean("solr.cloud.debug")) {
if (log.isDebugEnabled()) {
try {
RefCounted<SolrIndexSearcher> searchHolder = core
.getNewestSearcher(false);
SolrIndexSearcher searcher = searchHolder.get();
try {
System.err.println(core.getCoreDescriptor().getCoreContainer()
log.debug(core.getCoreDescriptor().getCoreContainer()
.getZkController().getNodeName()
+ " replicated "
+ searcher.search(new MatchAllDocsQuery(), 1).totalHits
@ -387,13 +387,13 @@ public class RecoveryStrategy extends Thread implements ClosableThread {
log.info("PeerSync Recovery was successful - registering as Active. core=" + coreName);
// solrcloud_debug
if (Boolean.getBoolean("solr.cloud.debug")) {
if (log.isDebugEnabled()) {
try {
RefCounted<SolrIndexSearcher> searchHolder = core
.getNewestSearcher(false);
SolrIndexSearcher searcher = searchHolder.get();
try {
System.err.println(core.getCoreDescriptor()
log.debug(core.getCoreDescriptor()
.getCoreContainer().getZkController().getNodeName()
+ " synched "
+ searcher.search(new MatchAllDocsQuery(), 1).totalHits);
@ -536,13 +536,13 @@ public class RecoveryStrategy extends Thread implements ClosableThread {
}
// solrcloud_debug
if (Boolean.getBoolean("solr.cloud.debug")) {
if (log.isDebugEnabled()) {
try {
RefCounted<SolrIndexSearcher> searchHolder = core
.getNewestSearcher(false);
SolrIndexSearcher searcher = searchHolder.get();
try {
System.err.println(core.getCoreDescriptor().getCoreContainer()
log.debug(core.getCoreDescriptor().getCoreContainer()
.getZkController().getNodeName()
+ " replayed "
+ searcher.search(new MatchAllDocsQuery(), 1).totalHits);

View File

@ -92,11 +92,7 @@ public class SyncStrategy {
return false;
}
log.info("Sync replicas to " + ZkCoreNodeProps.getCoreUrl(leaderProps));
// TODO: look at our state usage of sync
// zkController.publish(core, ZkStateReader.SYNC);
// solrcloud_debug
// System.out.println("SYNC UP");
if (core.getUpdateHandler().getUpdateLog() == null) {
log.error("No UpdateLog found - cannot sync");
return false;

View File

@ -796,13 +796,13 @@ public class CoreAdminHandler extends RequestHandlerBase {
boolean success = syncStrategy.sync(zkController, core, new ZkNodeProps(props));
// solrcloud_debug
if (Boolean.getBoolean("solr.cloud.debug")) {
if (log.isDebugEnabled()) {
try {
RefCounted<SolrIndexSearcher> searchHolder = core
.getNewestSearcher(false);
SolrIndexSearcher searcher = searchHolder.get();
try {
System.err.println(core.getCoreDescriptor().getCoreContainer()
log.debug(core.getCoreDescriptor().getCoreContainer()
.getZkController().getNodeName()
+ " synched "
+ searcher.search(new MatchAllDocsQuery(), 1).totalHits);
@ -915,7 +915,7 @@ public class CoreAdminHandler extends RequestHandlerBase {
}
// solrcloud_debug
if (Boolean.getBoolean("solr.cloud.debug")) {
if (log.isDebugEnabled()) {
try {
;
LocalSolrQueryRequest r = new LocalSolrQueryRequest(core,
@ -927,7 +927,7 @@ public class CoreAdminHandler extends RequestHandlerBase {
.getNewestSearcher(false);
SolrIndexSearcher searcher = searchHolder.get();
try {
System.err.println(core.getCoreDescriptor().getCoreContainer()
log.debug(core.getCoreDescriptor().getCoreContainer()
.getZkController().getNodeName()
+ " to replicate "
+ searcher.search(new MatchAllDocsQuery(), 1).totalHits