public class QueryResourceManager extends Object
1. assignQueryId - get an Id for the new query.
2. getQueryDataSource - open files for the job or reuse existing readers.
3. endQueryForGivenJob - release the resource used by this job.
| 限定符和类型 | 方法和说明 |
|---|---|
long |
assignCompactionQueryId()
Register a query id for compaction.
|
long |
assignQueryId(boolean isDataQuery)
Register a new query.
|
void |
endQuery(long queryId)
Whenever the jdbc request is closed normally or abnormally, this method must be invoked.
|
static QueryResourceManager |
getInstance() |
QueryDataSource |
getQueryDataSource(PartialPath selectedPath,
QueryContext context,
Filter timeFilter,
boolean ascending) |
QueryFileManager |
getQueryFileManager() |
void |
initQueryDataSourceCache(Map<VirtualStorageGroupProcessor,List<PartialPath>> processorToSeriesMap,
QueryContext context,
Filter timeFilter)
The method is called in mergeLock() when executing query.
|
void |
registerTempExternalSortFile(long queryId,
IExternalSortFileDeserializer deserializer)
register temporary file generated by external sort for resource release.
|
void |
writeQueryFileInfo() |
public static QueryResourceManager getInstance()
public long assignQueryId(boolean isDataQuery)
public long assignCompactionQueryId()
public void registerTempExternalSortFile(long queryId,
IExternalSortFileDeserializer deserializer)
queryId - query job iddeserializer - deserializer of temporary file in external sort.public void initQueryDataSourceCache(Map<VirtualStorageGroupProcessor,List<PartialPath>> processorToSeriesMap, QueryContext context, Filter timeFilter) throws QueryProcessException
processorToSeriesMap - Key: processor of the virtual storage group. Value: selected series
under the virtual storage groupQueryProcessExceptionpublic QueryDataSource getQueryDataSource(PartialPath selectedPath, QueryContext context, Filter timeFilter, boolean ascending) throws StorageEngineException, QueryProcessException
selectedPath - MeasurementPath or AlignedPath, even if it contains only one sub sensor of
an aligned device, it should be AlignedPath instead of MeasurementPathStorageEngineExceptionQueryProcessExceptionpublic void endQuery(long queryId)
throws StorageEngineException
public void writeQueryFileInfo()
public QueryFileManager getQueryFileManager()
Copyright © 2022 The Apache Software Foundation. All rights reserved.