You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/03/14 03:04:03 UTC

[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #88: [IOTDB-23] Add monitor statistics of file size. Phase 1.1

jt2594838 commented on a change in pull request #88: [IOTDB-23] Add monitor statistics of file size. Phase 1.1
URL: https://github.com/apache/incubator-iotdb/pull/88#discussion_r265395987
 
 

 ##########
 File path: iotdb/src/main/java/org/apache/iotdb/db/monitor/MonitorConstants.java
 ##########
 @@ -16,35 +16,46 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.iotdb.db.monitor;
 
+import java.io.File;
 import java.util.HashMap;
 import java.util.concurrent.atomic.AtomicLong;
+import org.apache.iotdb.db.conf.IoTDBConfig;
+import org.apache.iotdb.db.conf.IoTDBDescriptor;
+import org.apache.iotdb.db.monitor.collector.FileSize;
+import org.apache.iotdb.db.service.Monitor;
 
 public class MonitorConstants {
 
-  public static final String DATA_TYPE = "INT64";
-  public static final String FILENODE_PROCESSOR_CONST = "FILENODE_PROCESSOR_CONST";
-  public static final String FILENODE_MANAGER_CONST = "FILENODE_MANAGER_CONST";
-  public static final String MONITOR_PATH_SEPERATOR = ".";
+  private static IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
+  public static final String DATA_TYPE_INT64 = "INT64";
   public static final String STAT_STORAGE_GROUP_PREFIX = "root.stats";
-
+  static final String FILENODE_PROCESSOR_CONST = "FILENODE_PROCESSOR_CONST";
+  private static final String FILENODE_MANAGER_CONST = "FILENODE_MANAGER_CONST";
+  static final String FILE_SIZE_CONST = "FILE_SIZE_CONST";
+  public static final String MONITOR_PATH_SEPARATOR = ".";
+  // statistic for file size statistic module
+  private static final String FILE_SIZE = "file_size";
+  public static final String FILE_SIZE_STORAGE_GROUP_NAME = STAT_STORAGE_GROUP_PREFIX
+      + MONITOR_PATH_SEPARATOR + FILE_SIZE;
   // statistic for write module
-  public static final String FILE_NODE_MANAGER_PATH = "write.global";
+  static final String FILE_NODE_MANAGER_PATH = "write.global";
   public static final String FILE_NODE_PATH = "write";
   /**
    * Stat information.
    */
   public static final String STAT_STORAGE_DELTA_NAME = STAT_STORAGE_GROUP_PREFIX
-          + MONITOR_PATH_SEPERATOR + FILE_NODE_MANAGER_PATH;
+      + MONITOR_PATH_SEPARATOR + FILE_NODE_MANAGER_PATH;
 
   /**
-   * function for initing values.
+   * function for initializing stats values.
    *
    * @param constantsType produce initialization values for Statistics Params
    * @return HashMap contains all the Statistics Params
    */
-  public static HashMap<String, AtomicLong> initValues(String constantsType) {
+  static HashMap<String, AtomicLong> initValues(String constantsType) {
     HashMap<String, AtomicLong> hashMap = new HashMap<>();
 
 Review comment:
   Is it necessary to declare the map as a HashMap instead of a Map interface?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services