Package org.apache.iotdb.db.utils
Class MemUtils
- java.lang.Object
-
- org.apache.iotdb.db.utils.MemUtils
-
public class MemUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringbytesCntToStr(long inputCnt)function for converting the byte count result to readable string.static longgetAlignedRecordsSize(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 longgetAlignedTabletSize(InsertTabletNode insertTabletNode, int start, int end, boolean addingTextDataSize)static longgetAlignedTabletSize(InsertTabletPlan insertTabletPlan, int start, int end, boolean addingTextDataSize)static longgetBinaryColumnSize(org.apache.iotdb.tsfile.utils.Binary[] column, int start, int end)static longgetBinarySize(org.apache.iotdb.tsfile.utils.Binary value)static longgetDataPointMem(org.apache.iotdb.tsfile.write.record.datapoint.DataPoint dataPoint)function for getting the memory size of the given data point.static longgetRecordSize(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, java.lang.Object value, boolean addingTextDataSize)function for getting the value size.static longgetRecordsSize(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 longgetStringMem(java.lang.String str)function for getting the memory size of the given string.static longgetTabletSize(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 longgetTabletSize(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 longgetTsRecordMem(org.apache.iotdb.tsfile.write.record.TSRecord record)Calculate how much memory will be used if the given record is written to sequence file.
-
-
-
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.
-
-