Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
内存控制核心类
LoadTsFileMemoryManager
, 向上(查询模块)提供allocatedFromQuery
和releaseFromQuery
两个接口,向下(load模块)提供forceAllocate
和tryAllocate
两个接口analyzer部分内存控制类
DeviceToTimeseriesSchemasMap
, 其中封装了Map<String, Set<MeasurementSchema>> currentBatchDevice2TimeseriesSchemas
,向外提供 add(),isEmpty(),clear()等接口供TsFileAnalyzer调用,主要在add方法中添加计算内存流程memoryBlock 是调用者申请内存后得到的内存块,其中包含申请到的内存大小,以及标记是否已释放的变量等。
QueryMemoryBlock
是向查询模块申请得到的内存块,LoadMemoryBlock
是向 load 模块提供的内存块,申请到的 QueryMemoryBlock 会塞到相应的LoadMemoryBlock返回给load,其目的是当load模块用完内存块需要释放时,查询模块相应的内存也需要被释放。未完成部分:
LoadTsFileSchedulerCacheMemoryManager