| 限定符和类型 | 方法和说明 |
|---|---|
static void |
blockInsertionIfReject(TsFileProcessor tsFileProcessor)
block insertion if the insertion is rejected by memory control
|
VirtualStorageGroupProcessor |
buildNewStorageGroupProcessor(PartialPath logicalStorageGroupName,
IStorageGroupMNode storageGroupMNode,
String virtualStorageGroupId)
build a new storage group processor
|
void |
closeStorageGroupProcessor(PartialPath storageGroupPath,
boolean isSeq,
boolean isSync) |
void |
closeStorageGroupProcessor(PartialPath storageGroupPath,
long partitionId,
boolean isSeq,
boolean isSync) |
static long |
convertMilliWithPrecision(long milliTime) |
int |
countUpgradeFiles()
count all Tsfiles which need to be upgraded
|
void |
delete(PartialPath path,
long startTime,
long endTime,
long planIndex,
VirtualStorageGroupProcessor.TimePartitionFilter timePartitionFilter) |
boolean |
deleteAll()
delete all data of storage groups' timeseries.
|
void |
deleteAllDataFilesInOneStorageGroup(PartialPath storageGroupPath)
delete all data files (both memory data and file on disk) in a storage group.
|
void |
deleteStorageGroup(PartialPath storageGroupPath) |
void |
deleteTimeseries(PartialPath path,
long planIndex,
VirtualStorageGroupProcessor.TimePartitionFilter timePartitionFilter)
delete data of timeseries "{deviceId}.
|
boolean |
deleteTsfile(File deletedTsfile) |
boolean |
deleteTsfileForSync(File deletedTsfile) |
void |
forceCloseAllProcessor() |
Map<PartialPath,Map<Long,List<TsFileResource>>> |
getAllClosedStorageGroupTsFile() |
static String |
getDeviceNameByPlan(PhysicalPlan plan) |
ServiceType |
getID()
Get the name of the the service.
|
static StorageEngine |
getInstance() |
List<String> |
getLockInfo(List<PartialPath> pathList)
get lock holder for each sg
|
VirtualStorageGroupProcessor |
getProcessor(PartialPath path)
This method is for insert and query or sth like them, this may get a virtual storage group
|
VirtualStorageGroupProcessor |
getProcessorDirectly(PartialPath path)
This method is for sync, delete tsfile or sth like them, just get storage group directly by sg
name
|
VirtualStorageGroupProcessor |
getProcessorDirectly(PartialPath path,
int virtualStorageGroupId)
This method is for sync, delete tsfile or sth like them, just get storage group directly by
virtualStorageGroupId
|
Map<PartialPath,StorageGroupManager> |
getProcessorMap() |
void |
getResourcesToBeSettled(PartialPath sgPath,
List<TsFileResource> seqResourcesToBeSettled,
List<TsFileResource> unseqResourcesToBeSettled,
List<String> tsFilePaths) |
protected void |
getSeriesSchemas(InsertPlan insertPlan,
VirtualStorageGroupProcessor processor) |
String |
getSgByEngineFile(File file,
boolean needCheck)
The internal file means that the file is in the engine, which is different from those external
files which are not loaded.
|
String |
getStorageGroupPath(PartialPath path) |
static long |
getTimePartition(long time) |
static long |
getTimePartitionInterval() |
int |
getVirtualSgIdByEngineFile(File file,
boolean needCheck)
The internal file means that the file is in the engine, which is different from those external
files which are not loaded.
|
Map<String,List<Pair<Long,Boolean>>> |
getWorkingStorageGroupPartitions()
Get a map indicating which storage groups have working TsFileProcessors and its associated
partitionId and whether it is sequence or not.
|
void |
insert(InsertRowPlan insertRowPlan)
insert an InsertRowPlan to a storage group.
|
void |
insert(InsertRowsOfOneDevicePlan insertRowsOfOneDevicePlan) |
void |
insertTablet(InsertTabletPlan insertTabletPlan)
insert a InsertTabletPlan to a storage group
|
boolean |
isAllSgReady() |
static boolean |
isEnablePartition() |
boolean |
isFileAlreadyExist(TsFileResource tsFileResource,
PartialPath storageGroup,
long partitionNum) |
static AtomicBoolean |
isSecondaryAlive() |
void |
loadNewTsFile(TsFileResource newTsFileResource) |
void |
loadNewTsFileForSync(TsFileResource newTsFileResource) |
void |
mergeAll()
merge all storage groups.
|
Pair<List<VirtualStorageGroupProcessor>,Map<VirtualStorageGroupProcessor,List<PartialPath>>> |
mergeLock(List<PartialPath> pathList)
get all merge lock of the storage group processor related to the query
|
void |
mergeUnLock(List<VirtualStorageGroupProcessor> list)
unlock all merge lock of the storage group processor related to the query
|
void |
rebootTimedService()
reboot timed flush sequence/unsequence memetable thread, timed close tsfile thread
|
void |
recover() |
void |
registerCloseFileListener(CloseFileListener listener)
Add a listener to listen file close events.
|
void |
registerFlushListener(FlushListener listener)
Add a listener to listen flush start/end events.
|
void |
releaseWalDirectByteBufferPoolInOneStorageGroup(PartialPath storageGroupPath)
release all the allocated non-heap
|
void |
removePartitions(PartialPath storageGroupPath,
VirtualStorageGroupProcessor.TimePartitionFilter filter) |
void |
reset()
This function is just for unit test.
|
void |
setAllSgReady(boolean allSgReady) |
static void |
setEnablePartition(boolean enablePartition) |
void |
setFileFlushPolicy(TsFileFlushPolicy fileFlushPolicy) |
void |
setPartitionVersionToMax(PartialPath storageGroup,
long partitionId,
long newMaxVersion)
Set the version of given partition to newMaxVersion if it is larger than the current version.
|
void |
setSettling(PartialPath sgPath,
boolean isSettling) |
static void |
setTimePartitionInterval(long timePartitionInterval) |
void |
setTTL(PartialPath storageGroup,
long dataTTL) |
void |
shutdown(long milliseconds) |
void |
start()
Start current service.
|
void |
stop()
Stop current service.
|
void |
syncCloseAllProcessor()
flush command Sync asyncCloseOneProcessor all file node processors.
|
static void |
transmitOperationSync(PhysicalPlan physicalPlan) |
boolean |
unloadTsfile(File tsfileToBeUnloaded,
File targetDir) |
void |
upgradeAll()
upgrade all storage groups.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwaitAndStoppublic static StorageEngine getInstance()
public static void transmitOperationSync(PhysicalPlan physicalPlan)
public static long convertMilliWithPrecision(long milliTime)
public static String getDeviceNameByPlan(PhysicalPlan plan)
public static AtomicBoolean isSecondaryAlive()
public static long getTimePartitionInterval()
public static void setTimePartitionInterval(long timePartitionInterval)
public static long getTimePartition(long time)
public static boolean isEnablePartition()
public static void setEnablePartition(boolean enablePartition)
public static void blockInsertionIfReject(TsFileProcessor tsFileProcessor) throws WriteProcessRejectException
public boolean isAllSgReady()
public void setAllSgReady(boolean allSgReady)
public void recover()
public void stop()
IServicepublic void shutdown(long milliseconds)
throws ShutdownException
shutdown 在接口中 IServiceShutdownExceptionpublic void rebootTimedService()
throws ShutdownException
public ServiceType getID()
IServicepublic VirtualStorageGroupProcessor getProcessorDirectly(PartialPath path) throws StorageEngineException
path - storage group pathStorageEngineExceptionpublic VirtualStorageGroupProcessor getProcessorDirectly(PartialPath path, int virtualStorageGroupId) throws StorageEngineException
path - storage group pathvirtualStorageGroupId - virtual storage group partition idStorageEngineExceptionpublic VirtualStorageGroupProcessor getProcessor(PartialPath path) throws StorageEngineException
path - device pathStorageEngineExceptionpublic List<String> getLockInfo(List<PartialPath> pathList) throws StorageEngineException
StorageEngineExceptionpublic VirtualStorageGroupProcessor buildNewStorageGroupProcessor(PartialPath logicalStorageGroupName, IStorageGroupMNode storageGroupMNode, String virtualStorageGroupId) throws StorageGroupProcessorException
virtualStorageGroupId - virtual storage group id e.g. 1logicalStorageGroupName - logical storage group name e.g. root.sg1StorageGroupProcessorExceptionpublic void reset()
public void insert(InsertRowPlan insertRowPlan) throws StorageEngineException, MetadataException
insertRowPlan - physical plan of insertionStorageEngineExceptionMetadataExceptionpublic void insert(InsertRowsOfOneDevicePlan insertRowsOfOneDevicePlan) throws StorageEngineException, MetadataException
public void insertTablet(InsertTabletPlan insertTabletPlan) throws StorageEngineException, BatchProcessException, MetadataException
public void syncCloseAllProcessor()
public void forceCloseAllProcessor()
throws TsFileProcessorException
public void closeStorageGroupProcessor(PartialPath storageGroupPath, boolean isSeq, boolean isSync)
public void closeStorageGroupProcessor(PartialPath storageGroupPath, long partitionId, boolean isSeq, boolean isSync) throws StorageGroupNotSetException
storageGroupPath - the storage group namepartitionId - the partition idisSeq - is sequence tsfile or unsequence tsfileisSync - close tsfile synchronously or asynchronouslyStorageGroupNotSetExceptionpublic void delete(PartialPath path, long startTime, long endTime, long planIndex, VirtualStorageGroupProcessor.TimePartitionFilter timePartitionFilter) throws StorageEngineException
public void deleteTimeseries(PartialPath path, long planIndex, VirtualStorageGroupProcessor.TimePartitionFilter timePartitionFilter) throws StorageEngineException
public int countUpgradeFiles()
public void upgradeAll()
throws StorageEngineException
StorageEngineException - StorageEngineExceptionpublic void getResourcesToBeSettled(PartialPath sgPath, List<TsFileResource> seqResourcesToBeSettled, List<TsFileResource> unseqResourcesToBeSettled, List<String> tsFilePaths) throws StorageEngineException
public void setSettling(PartialPath sgPath, boolean isSettling)
public void mergeAll()
throws StorageEngineException
StorageEngineException - StorageEngineExceptionpublic void deleteAllDataFilesInOneStorageGroup(PartialPath storageGroupPath)
public void releaseWalDirectByteBufferPoolInOneStorageGroup(PartialPath storageGroupPath)
public boolean deleteAll()
public void setTTL(PartialPath storageGroup, long dataTTL)
public void deleteStorageGroup(PartialPath storageGroupPath)
public void loadNewTsFileForSync(TsFileResource newTsFileResource) throws StorageEngineException, LoadFileException, IllegalPathException
public void loadNewTsFile(TsFileResource newTsFileResource) throws LoadFileException, StorageEngineException, MetadataException
public boolean deleteTsfileForSync(File deletedTsfile) throws StorageEngineException, IllegalPathException
public boolean deleteTsfile(File deletedTsfile) throws StorageEngineException, IllegalPathException
public boolean unloadTsfile(File tsfileToBeUnloaded, File targetDir) throws StorageEngineException, IllegalPathException
public String getSgByEngineFile(File file, boolean needCheck) throws IllegalPathException
file - internal fileneedCheck - check if the tsfile is an internal TsFile. If you make sure it is inside, no
need to checkIllegalPathException - throw if tsfile is not an internal TsFilepublic int getVirtualSgIdByEngineFile(File file, boolean needCheck) throws IllegalPathException
file - internal fileneedCheck - check if the tsfile is an internal TsFile. If you make sure it is inside, no
need to checkIllegalPathException - throw if tsfile is not an internal TsFilepublic Map<PartialPath,Map<Long,List<TsFileResource>>> getAllClosedStorageGroupTsFile()
public void setFileFlushPolicy(TsFileFlushPolicy fileFlushPolicy)
public boolean isFileAlreadyExist(TsFileResource tsFileResource, PartialPath storageGroup, long partitionNum)
public void setPartitionVersionToMax(PartialPath storageGroup, long partitionId, long newMaxVersion)
public void removePartitions(PartialPath storageGroupPath, VirtualStorageGroupProcessor.TimePartitionFilter filter)
public Map<PartialPath,StorageGroupManager> getProcessorMap()
public Map<String,List<Pair<Long,Boolean>>> getWorkingStorageGroupPartitions()
public void registerFlushListener(FlushListener listener)
listener - public void registerCloseFileListener(CloseFileListener listener)
listener - public Pair<List<VirtualStorageGroupProcessor>,Map<VirtualStorageGroupProcessor,List<PartialPath>>> mergeLock(List<PartialPath> pathList) throws StorageEngineException
public void mergeUnLock(List<VirtualStorageGroupProcessor> list)
public String getStorageGroupPath(PartialPath path) throws StorageEngineException
StorageEngineExceptionprotected void getSeriesSchemas(InsertPlan insertPlan, VirtualStorageGroupProcessor processor) throws StorageEngineException, MetadataException
Copyright © 2022 The Apache Software Foundation. All rights reserved.