Class MemUtils


  • public class MemUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String bytesCntToStr​(long inputCnt)
      function for converting the byte count result to readable string.
      static long getAlignedRecordsSize​(java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.lang.Object[] value, boolean addingTextDataSize)
      function for getting the vector value size.
      static long getAlignedTabletSize​(InsertTabletNode insertTabletNode, int start, int end, boolean addingTextDataSize)  
      static long getAlignedTabletSize​(InsertTabletPlan insertTabletPlan, int start, int end, boolean addingTextDataSize)  
      static long getBinaryColumnSize​(org.apache.iotdb.tsfile.utils.Binary[] column, int start, int end)  
      static long getBinarySize​(org.apache.iotdb.tsfile.utils.Binary value)  
      static long getDataPointMem​(org.apache.iotdb.tsfile.write.record.datapoint.DataPoint dataPoint)
      function for getting the memory size of the given data point.
      static long getRecordSize​(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, java.lang.Object value, boolean addingTextDataSize)
      function for getting the value size.
      static long getRecordsSize​(java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.lang.Object[] value, boolean addingTextDataSize)
      function for getting the value size.
      static long getStringMem​(java.lang.String str)
      function for getting the memory size of the given string.
      static long getTabletSize​(InsertTabletNode insertTabletNode, int start, int end, boolean addingTextDataSize)
      If mem control enabled, do not add text data size here, the size will be added to memtable before inserting.
      static long getTabletSize​(InsertTabletPlan insertTabletPlan, int start, int end, boolean addingTextDataSize)
      If mem control enabled, do not add text data size here, the size will be added to memtable before inserting.
      static long getTsRecordMem​(org.apache.iotdb.tsfile.write.record.TSRecord record)
      Calculate how much memory will be used if the given record is written to sequence file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getRecordSize

        public static long getRecordSize​(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType,
                                         java.lang.Object value,
                                         boolean addingTextDataSize)
        function for getting the value size. If mem control enabled, do not add text data size here, the size will be added to memtable before inserting.
      • getRecordsSize

        public static long getRecordsSize​(java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes,
                                          java.lang.Object[] value,
                                          boolean addingTextDataSize)
        function for getting the value size. If mem control enabled, do not add text data size here, the size will be added to memtable before inserting.
      • getAlignedRecordsSize

        public static long getAlignedRecordsSize​(java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes,
                                                 java.lang.Object[] value,
                                                 boolean addingTextDataSize)
        function for getting the vector value size. If mem control enabled, do not add text data size here, the size will be added to memtable before inserting.
      • getBinarySize

        public static long getBinarySize​(org.apache.iotdb.tsfile.utils.Binary value)
      • getBinaryColumnSize

        public static long getBinaryColumnSize​(org.apache.iotdb.tsfile.utils.Binary[] column,
                                               int start,
                                               int end)
      • getTabletSize

        public static long getTabletSize​(InsertTabletNode insertTabletNode,
                                         int start,
                                         int end,
                                         boolean addingTextDataSize)
        If mem control enabled, do not add text data size here, the size will be added to memtable before inserting.
      • getTabletSize

        public static long getTabletSize​(InsertTabletPlan insertTabletPlan,
                                         int start,
                                         int end,
                                         boolean addingTextDataSize)
        If mem control enabled, do not add text data size here, the size will be added to memtable before inserting.
      • getAlignedTabletSize

        public static long getAlignedTabletSize​(InsertTabletPlan insertTabletPlan,
                                                int start,
                                                int end,
                                                boolean addingTextDataSize)
      • getAlignedTabletSize

        public static long getAlignedTabletSize​(InsertTabletNode insertTabletNode,
                                                int start,
                                                int end,
                                                boolean addingTextDataSize)
      • getTsRecordMem

        public static long getTsRecordMem​(org.apache.iotdb.tsfile.write.record.TSRecord record)
        Calculate how much memory will be used if the given record is written to sequence file.
      • getStringMem

        public static long getStringMem​(java.lang.String str)
        function for getting the memory size of the given string.
      • getDataPointMem

        public static long getDataPointMem​(org.apache.iotdb.tsfile.write.record.datapoint.DataPoint dataPoint)
        function for getting the memory size of the given data point.
      • bytesCntToStr

        public static java.lang.String bytesCntToStr​(long inputCnt)
        function for converting the byte count result to readable string.