lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r1627080 - in /lucene/dev/branches/lucene_solr_4_10: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
Date Tue, 23 Sep 2014 16:14:11 GMT
Author: shalin
Date: Tue Sep 23 16:14:10 2014
New Revision: 1627080

URL: http://svn.apache.org/r1627080
Log:
Add collection name to the error message logged in OCP

Modified:
    lucene/dev/branches/lucene_solr_4_10/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/solr/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/solr/core/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java

Modified: lucene/dev/branches/lucene_solr_4_10/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java?rev=1627080&r1=1627079&r2=1627080&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
(original)
+++ lucene/dev/branches/lucene_solr_4_10/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
Tue Sep 23 16:14:10 2014
@@ -584,8 +584,16 @@ public class OverseerCollectionProcessor
             + operation);
       }
     } catch (Exception e) {
-      SolrException.log(log, "Collection " + operation + " of " + operation
-          + " failed", e);
+      String collName = message.getStr("collection");
+      if (collName == null) collName = message.getStr("name");
+
+      if (collName == null) {
+        SolrException.log(log, "Operation " + operation + " failed", e);
+      } else  {
+        SolrException.log(log, "Collection: " + collName + " operation: " + operation
+            + " failed", e);
+      }
+
       results.add("Operation " + operation + " caused exception:", e);
       SimpleOrderedMap nl = new SimpleOrderedMap();
       nl.add("msg", e.getMessage());



Mime
View raw message