jixuan1989 commented on a change in pull request #232: [IOTDB-130]Dynamic 
parameters adapter
URL: https://github.com/apache/incubator-iotdb/pull/232#discussion_r302611288
 
 

 ##########
 File path: 
iotdb/src/main/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapter.java
 ##########
 @@ -0,0 +1,226 @@
+/**
+ * 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
+ *
+ * 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;
+
+import org.apache.iotdb.db.conf.IoTDBConfig;
+import org.apache.iotdb.db.conf.IoTDBDescriptor;
+import org.apache.iotdb.db.engine.StorageEngine;
+import org.apache.iotdb.db.exception.ConfigAdjusterException;
+import org.apache.iotdb.db.metadata.MManager;
+import org.apache.iotdb.db.rescon.PrimitiveArrayPool;
+
+public class IoTDBConfigDynamicAdapter implements IDynamicAdapter {
+
+
+  private static final IoTDBConfig CONFIG = 
IoTDBDescriptor.getInstance().getConfig();
+
+  // static parameter section
+
+  private static final double FLUSH_THRESHOLD = 0.2;
+
+  /**
+   * Maximum amount of memory allocated for write process.
+   */
+  private static final long ALLOCATE_MEMORY_FOR_WRITE = 
CONFIG.getAllocateMemoryForWrite();
+
+  /**
+   * Metadata size of per timeseries, the default value is 2KB.
+   */
+  private static final long TIMESERIES_METADATA_SIZE_IN_BYTE = 2L * 1024;
+
+  /**
+   * Metadata size of per chunk, the default value is 1.5 KB.
+   */
+  private static final long CHUNK_METADATA_SIZE_IN_BYTE = 1536L;
+
+  /**
+   * Average queue length in memtable pool
+   */
+  static final int MEM_TABLE_AVERAGE_QUEUE_LEN = 5;
+
+  // static memory section
+
+  /**
+   * Static memory, includes all timeseries metadata, which equals to 
TIMESERIES_METADATA_SIZE_IN_BYTE *
+   * totalTimeseriesNum, the unit is byte
 
 Review comment:
   And the TsFileResource size * number of TsFileResources?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to