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 // solrcloud_debug
if (Boolean.getBoolean("solr.cloud.debug")) { if (log.isDebugEnabled()) {
try { try {
RefCounted<SolrIndexSearcher> searchHolder = core RefCounted<SolrIndexSearcher> searchHolder = core
.getNewestSearcher(false); .getNewestSearcher(false);
SolrIndexSearcher searcher = searchHolder.get(); SolrIndexSearcher searcher = searchHolder.get();
try { try {
System.err.println(core.getCoreDescriptor().getCoreContainer() log.debug(core.getCoreDescriptor().getCoreContainer()
.getZkController().getNodeName() .getZkController().getNodeName()
+ " synched " + " synched "
+ searcher.search(new MatchAllDocsQuery(), 1).totalHits); + searcher.search(new MatchAllDocsQuery(), 1).totalHits);

View File

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

View File

@ -92,11 +92,7 @@ public class SyncStrategy {
return false; return false;
} }
log.info("Sync replicas to " + ZkCoreNodeProps.getCoreUrl(leaderProps)); 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) { if (core.getUpdateHandler().getUpdateLog() == null) {
log.error("No UpdateLog found - cannot sync"); log.error("No UpdateLog found - cannot sync");
return false; return false;

View File

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