You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by lt...@apache.org on 2019/07/28 02:17:09 UTC

[incubator-iotdb] branch master updated (2ff3f56 -> 8e7f521)

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

lta pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


    omit 2ff3f56  add log to show dynamic parameters after updating compression ratio
     new 8e7f521  add log to show dynamic parameters after updating compression ratio

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2ff3f56)
            \
             N -- N -- N   refs/heads/master (8e7f521)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


[incubator-iotdb] 01/01: add log to show dynamic parameters after updating compression ratio

Posted by lt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8e7f521c558d4bea765c2bf2a6b1543b3a0b7557
Author: lta <li...@163.com>
AuthorDate: Sun Jul 28 09:50:35 2019 +0800

    add log to show dynamic parameters after updating compression ratio
---
 .../apache/iotdb/db/conf/adapter/CompressionRatio.java | 18 +++++++++++++++++-
 .../db/conf/adapter/IoTDBConfigDynamicAdapter.java     | 14 +++++++++-----
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/conf/adapter/CompressionRatio.java b/server/src/main/java/org/apache/iotdb/db/conf/adapter/CompressionRatio.java
index 389076c..c7819fe 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/adapter/CompressionRatio.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/adapter/CompressionRatio.java
@@ -21,7 +21,6 @@ package org.apache.iotdb.db.conf.adapter;
 import java.io.File;
 import java.io.IOException;
 import java.util.Locale;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
@@ -87,8 +86,25 @@ public class CompressionRatio {
     File newFile = new File(directory,
         String.format(Locale.ENGLISH, RATIO_FILE_PATH_FORMAT, compressionRatioSum, calcTimes));
     persist(oldFile, newFile);
+    if (LOGGER.isInfoEnabled()) {
+      LOGGER.info("Compression ratio is {}", getRatio());
+    }
     if (CONFIG.isEnableParameterAdapter()) {
+      if (LOGGER.isInfoEnabled()) {
+        LOGGER.info(
+            "After updating compression ratio, trying to adjust parameters, the original parameters: "
+                + "MemTableSize threshold is {}B, TsfileSize threshold is {}B, MemTableNumber is {}",
+            CONFIG.getMemtableSizeThreshold(), CONFIG.getTsFileSizeThreshold(),
+            CONFIG.getMaxMemtableNumber());
+      }
       IoTDBConfigDynamicAdapter.getInstance().tryToAdaptParameters();
+      if(LOGGER.isInfoEnabled()) {
+        LOGGER.info(
+            "After updating compression ratio, trying to adjust parameters, the modified parameters: "
+                + "MemTableSize threshold is {}B, TsfileSize threshold is {}B, MemTableNumber is {}",
+            CONFIG.getMemtableSizeThreshold(), CONFIG.getTsFileSizeThreshold(),
+            CONFIG.getMaxMemtableNumber());
+      }
     }
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapter.java b/server/src/main/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapter.java
index 92fea6d..cb4bae1 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapter.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapter.java
@@ -129,8 +129,10 @@ public class IoTDBConfigDynamicAdapter implements IDynamicAdapter {
     long memTableSizeFloorThreshold = getMemTableSizeFloorThreshold();
     long tsFileSizeThreshold = CONFIG.getTsFileSizeThreshold();
     if (memtableSizeInByte < memTableSizeFloorThreshold) {
-      LOGGER.debug("memtableSizeInByte {} is smaller than memTableSizeFloorThreshold {}",
-          memtableSizeInByte, memTableSizeFloorThreshold);
+      if(LOGGER.isDebugEnabled()) {
+        LOGGER.debug("memtableSizeInByte {} is smaller than memTableSizeFloorThreshold {}",
+            memtableSizeInByte, memTableSizeFloorThreshold);
+      }
       tsFileSizeThreshold = calcTsFileSizeThreshold(memTableSizeFloorThreshold, ratio);
       if ((long) (tsFileSizeThreshold * ratio) < memTableSizeFloorThreshold) {
         canAdjust = false;
@@ -146,9 +148,11 @@ public class IoTDBConfigDynamicAdapter implements IDynamicAdapter {
       CONFIG.setMaxMemtableNumber(maxMemTableNum);
       CONFIG.setTsFileSizeThreshold(tsFileSizeThreshold);
       CONFIG.setMemtableSizeThreshold(memtableSizeInByte);
-      LOGGER.debug(
-          "After adjusting, max memTable num is {}, tsFile threshold is {}, memtableSize is {}, memTableSizeFloorThreshold is {}",
-          maxMemTableNum, tsFileSizeThreshold, memtableSizeInByte, memTableSizeFloorThreshold);
+      if(LOGGER.isDebugEnabled()) {
+        LOGGER.debug(
+            "After adjusting, max memTable num is {}, tsFile threshold is {}, memtableSize is {}, memTableSizeFloorThreshold is {}",
+            maxMemTableNum, tsFileSizeThreshold, memtableSizeInByte, memTableSizeFloorThreshold);
+      }
       currentMemTableSize = memtableSizeInByte;
     }
     if (!initialized) {