You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by li...@apache.org on 2019/11/15 08:19:11 UTC

[incubator-iotdb] branch dynamic_config updated: chore(ActiveTimeSeriesCounter): change log level

This is an automated email from the ASF dual-hosted git repository.

liurui pushed a commit to branch dynamic_config
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/dynamic_config by this push:
     new 83af4f0  chore(ActiveTimeSeriesCounter): change log level
83af4f0 is described below

commit 83af4f01b89e71c355c6e39a20401ca3f25933ab
Author: liuruiyiyang <24...@qq.com>
AuthorDate: Fri Nov 15 16:18:46 2019 +0800

    chore(ActiveTimeSeriesCounter): change log level
---
 .../db/conf/adapter/ActiveTimeSeriesCounter.java   |  4 ++--
 .../conf/adapter/ActiveTimeSeriesCounterTest.java  | 24 +++++++++++++---------
 .../iotdb/db/conf/adapter/HyperLogLogTest.java     |  2 +-
 .../adapter/IoTDBConfigDynamicAdapterTest.java     | 24 +++++++++++++---------
 4 files changed, 31 insertions(+), 23 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/conf/adapter/ActiveTimeSeriesCounter.java b/server/src/main/java/org/apache/iotdb/db/conf/adapter/ActiveTimeSeriesCounter.java
index 50e0f9d..1515e87 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/adapter/ActiveTimeSeriesCounter.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/adapter/ActiveTimeSeriesCounter.java
@@ -71,7 +71,7 @@ public class ActiveTimeSeriesCounter implements IActiveTimeSeriesCounter {
     storageGroupHllMap.put(storageGroup, new HyperLogLog(LOG2M));
     try {
       double totalActiveTsNum = 0;
-      LOGGER.info("{}: updating active ratio", Thread.currentThread().getName());
+      LOGGER.debug("{}: updating active ratio", Thread.currentThread().getName());
       for (double number : activeTimeSeriesNumMap.values()) {
         totalActiveTsNum += number;
       }
@@ -81,7 +81,7 @@ public class ActiveTimeSeriesCounter implements IActiveTimeSeriesCounter {
           activeRatio = entry.getValue() / totalActiveTsNum;
         }
         activeRatioMap.put(entry.getKey(), activeRatio);
-        LOGGER.info("{}: storage group {} has active ratio {}", Thread.currentThread().getName(),
+        LOGGER.debug("{}: storage group {} has active ratio {}", Thread.currentThread().getName(),
             entry.getKey(), activeRatio);
       }
     } finally {
diff --git a/server/src/test/java/org/apache/iotdb/db/conf/adapter/ActiveTimeSeriesCounterTest.java b/server/src/test/java/org/apache/iotdb/db/conf/adapter/ActiveTimeSeriesCounterTest.java
index 9b51d1e..fce0af4 100644
--- a/server/src/test/java/org/apache/iotdb/db/conf/adapter/ActiveTimeSeriesCounterTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/conf/adapter/ActiveTimeSeriesCounterTest.java
@@ -1,15 +1,19 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements.  See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with the License.  You may obtain
- * a copy of the License at
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied.  See the License for the specific language governing permissions and limitations
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
  * under the License.
  */
 package org.apache.iotdb.db.conf.adapter;
diff --git a/server/src/test/java/org/apache/iotdb/db/conf/adapter/HyperLogLogTest.java b/server/src/test/java/org/apache/iotdb/db/conf/adapter/HyperLogLogTest.java
index f7b9a19..9200a58 100644
--- a/server/src/test/java/org/apache/iotdb/db/conf/adapter/HyperLogLogTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/conf/adapter/HyperLogLogTest.java
@@ -58,7 +58,7 @@ public class HyperLogLogTest {
         errorSum += Math.abs(p);
       }
       // allow 1% error
-      assertEquals(0,errorSum / testNum, 0.01);
+      assertEquals(0, errorSum / testNum, 0.01);
       avgErrors[floorIndex] = String.format("%.5f", errorSum / testNum);
     }
     System.out.println(Arrays.toString(avgErrors));
diff --git a/server/src/test/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapterTest.java b/server/src/test/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapterTest.java
index 851f9ad..af8acb7 100644
--- a/server/src/test/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapterTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapterTest.java
@@ -1,15 +1,19 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements.  See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with the License.  You may obtain
- * a copy of the License at
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied.  See the License for the specific language governing permissions and limitations
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
  * under the License.
  */
 package org.apache.iotdb.db.conf.adapter;