lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject lucene-solr:branch_7x: SOLR-11779: Reduce logging, fix index size conversion bug.
Date Wed, 13 Jun 2018 17:46:00 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 1fd62773c -> 2c66f54ef


SOLR-11779: Reduce logging, fix index size conversion bug.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2c66f54e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2c66f54e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2c66f54e

Branch: refs/heads/branch_7x
Commit: 2c66f54efccc144a61a18f4c15dee9bf69047b93
Parents: 1fd6277
Author: Andrzej Bialecki <ab@apache.org>
Authored: Wed Jun 13 19:44:55 2018 +0200
Committer: Andrzej Bialecki <ab@apache.org>
Committed: Wed Jun 13 19:45:53 2018 +0200

----------------------------------------------------------------------
 .../apache/solr/handler/admin/MetricsHistoryHandler.java | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2c66f54e/solr/core/src/java/org/apache/solr/handler/admin/MetricsHistoryHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/MetricsHistoryHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/MetricsHistoryHandler.java
index 03b545f..419f021 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/MetricsHistoryHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/MetricsHistoryHandler.java
@@ -60,7 +60,6 @@ import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.cloud.NodeStateProvider;
 import org.apache.solr.client.solrj.cloud.SolrCloudManager;
 import org.apache.solr.client.solrj.cloud.autoscaling.ReplicaInfo;
-import org.apache.solr.client.solrj.cloud.autoscaling.Suggestion;
 import org.apache.solr.client.solrj.cloud.autoscaling.VersionedData;
 import org.apache.solr.client.solrj.impl.HttpClientUtil;
 import org.apache.solr.cloud.Overseer;
@@ -248,7 +247,7 @@ public class MetricsHistoryHandler extends RequestHandlerBase implements
Permiss
         DocCollection systemColl = clusterState.getCollectionOrNull(CollectionAdminParams.SYSTEM_COLL);
         if (systemColl == null) {
           if (logMissingCollection) {
-            log.warn("Missing " + CollectionAdminParams.SYSTEM_COLL + ", keeping metrics
history in memory");
+            log.info("No " + CollectionAdminParams.SYSTEM_COLL + " collection, keeping metrics
history in memory.");
             logMissingCollection = false;
           }
           factory.setPersistent(false);
@@ -262,7 +261,7 @@ public class MetricsHistoryHandler extends RequestHandlerBase implements
Permiss
             }
           }
           if (!ready) {
-            log.debug(CollectionAdminParams.SYSTEM_COLL + " not ready yet, keeping metrics
history in memory");
+            log.debug(CollectionAdminParams.SYSTEM_COLL + "collection not ready yet, keeping
metrics history in memory");
             factory.setPersistent(false);
             return;
           }
@@ -284,7 +283,7 @@ public class MetricsHistoryHandler extends RequestHandlerBase implements
Permiss
         logMissingCollection = true;
       } catch (Exception e) {
         if (logMissingCollection) {
-          log.warn("Error querying .system collection, keeping metrics history in memory",
e);
+          log.info("No " + CollectionAdminParams.SYSTEM_COLL + " collection, keeping metrics
history in memory.");
         }
         logMissingCollection = false;
         factory.setPersistent(false);
@@ -486,10 +485,6 @@ public class MetricsHistoryHandler extends RequestHandlerBase implements
Permiss
           replicas.forEach(ri -> {
             collTags.forEach(tag -> {
               double value = ((Number)ri.getVariable(tag, 0.0)).doubleValue();
-              // TODO: fix this when Suggestion.Condition.DISK_IDX uses proper conversion
-              if (tag.contains(Suggestion.coreidxsize)) {
-                value = value * 1024.0 * 1024.0 * 1024.0;
-              }
               DoubleAdder adder = (DoubleAdder)perReg.computeIfAbsent(tag, t -> new DoubleAdder());
               adder.add(value);
             });


Mime
View raw message