Class ElasticSerializableRowRecordList
- java.lang.Object
-
- org.apache.iotdb.db.mpp.transformation.datastructure.row.ElasticSerializableRowRecordList
-
public class ElasticSerializableRowRecordList extends java.lang.ObjectAn elastic list of records that implements memory control using LRU strategy.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<org.apache.iotdb.tsfile.utils.BitMap>bitMapsMark bitMaps of correct index when one row has at least one null fieldprotected intbyteArrayLengthForMemoryControlprotected org.apache.iotdb.db.mpp.transformation.datastructure.row.ElasticSerializableRowRecordList.LRUCachecacheprotected org.apache.iotdb.tsfile.file.metadata.enums.TSDataType[]dataTypesprotected booleandisableMemoryControlprotected intevictionUpperBoundprotected int[]indexListOfTextFieldsprotected intinternalRowRecordListCapacityprotected static intMEMORY_CHECK_THRESHOLDprotected floatmemoryLimitInMBprotected intnumCacheBlockprotected longqueryIdprotected java.util.List<SerializableRowRecordList>rowRecordListsprotected intsizeprotected longtotalByteArrayLengthprotected longtotalByteArrayLengthLimit
-
Constructor Summary
Constructors Modifier Constructor Description ElasticSerializableRowRecordList(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType[] dataTypes, long queryId, float memoryLimitInMB, int numCacheBlock)Construct a ElasticSerializableRowRecordList.protectedElasticSerializableRowRecordList(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType[] dataTypes, long queryId, float memoryLimitInMB, int internalRowRecordListCapacity, int numCacheBlock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyNewMemoryControlParameters(int newByteArrayLengthForMemoryControl, int newInternalRowRecordListCapacity)protected voidcheckMemoryUsage()booleanfieldsHasAnyNull(int index)true if any field except the timestamp in the current row is nullorg.apache.iotdb.tsfile.file.metadata.enums.TSDataType[]getDataTypes()java.lang.Object[]getRowRecord(int index)longgetTime(int index)voidput(java.lang.Object[] rowRecord)voidsetEvictionUpperBound(int evictionUpperBound)intsize()
-
-
-
Field Detail
-
MEMORY_CHECK_THRESHOLD
protected static final int MEMORY_CHECK_THRESHOLD
- See Also:
- Constant Field Values
-
dataTypes
protected org.apache.iotdb.tsfile.file.metadata.enums.TSDataType[] dataTypes
-
queryId
protected long queryId
-
memoryLimitInMB
protected float memoryLimitInMB
-
internalRowRecordListCapacity
protected int internalRowRecordListCapacity
-
numCacheBlock
protected int numCacheBlock
-
cache
protected org.apache.iotdb.db.mpp.transformation.datastructure.row.ElasticSerializableRowRecordList.LRUCache cache
-
rowRecordLists
protected java.util.List<SerializableRowRecordList> rowRecordLists
-
bitMaps
protected java.util.List<org.apache.iotdb.tsfile.utils.BitMap> bitMaps
Mark bitMaps of correct index when one row has at least one null field
-
size
protected int size
-
evictionUpperBound
protected int evictionUpperBound
-
disableMemoryControl
protected boolean disableMemoryControl
-
indexListOfTextFields
protected int[] indexListOfTextFields
-
byteArrayLengthForMemoryControl
protected int byteArrayLengthForMemoryControl
-
totalByteArrayLengthLimit
protected long totalByteArrayLengthLimit
-
totalByteArrayLength
protected long totalByteArrayLength
-
-
Constructor Detail
-
ElasticSerializableRowRecordList
public ElasticSerializableRowRecordList(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType[] dataTypes, long queryId, float memoryLimitInMB, int numCacheBlock) throws QueryProcessExceptionConstruct a ElasticSerializableRowRecordList.- Parameters:
dataTypes- Data types of columns.queryId- Query ID.memoryLimitInMB- Memory limit.numCacheBlock- Number of cache blocks.- Throws:
QueryProcessException
-
ElasticSerializableRowRecordList
protected ElasticSerializableRowRecordList(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType[] dataTypes, long queryId, float memoryLimitInMB, int internalRowRecordListCapacity, int numCacheBlock)
-
-
Method Detail
-
size
public int size()
-
getDataTypes
public org.apache.iotdb.tsfile.file.metadata.enums.TSDataType[] getDataTypes()
-
getTime
public long getTime(int index) throws java.io.IOException- Throws:
java.io.IOException
-
getRowRecord
public java.lang.Object[] getRowRecord(int index) throws java.io.IOException- Throws:
java.io.IOException
-
fieldsHasAnyNull
public boolean fieldsHasAnyNull(int index)
true if any field except the timestamp in the current row is null
-
put
public void put(java.lang.Object[] rowRecord) throws java.io.IOException, QueryProcessException- Throws:
java.io.IOExceptionQueryProcessException
-
checkMemoryUsage
protected void checkMemoryUsage() throws java.io.IOException, QueryProcessException- Throws:
java.io.IOExceptionQueryProcessException
-
applyNewMemoryControlParameters
protected void applyNewMemoryControlParameters(int newByteArrayLengthForMemoryControl, int newInternalRowRecordListCapacity) throws java.io.IOException, QueryProcessException- Throws:
java.io.IOExceptionQueryProcessException
-
setEvictionUpperBound
public void setEvictionUpperBound(int evictionUpperBound)
- Parameters:
evictionUpperBound- the index of the first element that cannot be evicted. in other words, elements whose index are less than the evictionUpperBound can be evicted.
-
-