lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1538383 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/cloud/ solr/core/src/java/org/apache/solr/handler/admin/
Date Sun, 03 Nov 2013 15:44:16 GMT
Author: markrmiller
Date: Sun Nov  3 15:44:16 2013
New Revision: 1538383

URL: http://svn.apache.org/r1538383
Log:
tests: use debug logging level for solrcloud debug output

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
    lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
    lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java
    lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java

Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java?rev=1538383&r1=1538382&r2=1538383&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
(original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
Sun Nov  3 15:44:16 2013
@@ -226,13 +226,13 @@ final class ShardLeaderElectionContext e
       }
       
       // 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);

Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java?rev=1538383&r1=1538382&r2=1538383&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
(original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
Sun Nov  3 15:44:16 2013
@@ -156,13 +156,13 @@ public class RecoveryStrategy extends Th
     }
     
     // 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 Th
             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 Th
     }
     
     // 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);

Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java?rev=1538383&r1=1538382&r2=1538383&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java
(original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java
Sun Nov  3 15:44:16 2013
@@ -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;

Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=1538383&r1=1538382&r2=1538383&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
(original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Sun Nov  3 15:44:16 2013
@@ -796,13 +796,13 @@ public class CoreAdminHandler extends Re
         
         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 Re
         }
         
         // 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 Re
                 .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



Mime
View raw message