public class TsFileManager extends Object
| 构造器和说明 |
|---|
TsFileManager(String storageGroupName,
String virtualStorageGroup,
String storageGroupDir) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(TsFileResource tsFileResource,
boolean sequence) |
void |
addAll(List<TsFileResource> tsFileResourceList,
boolean sequence) |
void |
addForRecover(TsFileResource tsFileResource,
boolean sequence) |
void |
clear() |
static int |
compareFileName(File o1,
File o2) |
boolean |
contains(TsFileResource tsFileResource,
boolean sequence) |
Iterator<TsFileResource> |
getIterator(boolean sequence) |
TsFileResourceList |
getSequenceListByTimePartition(long timePartition) |
List<TsFileResource> |
getSequenceRecoverTsFileResources() |
String |
getStorageGroupDir() |
String |
getStorageGroupName() |
Set<Long> |
getTimePartitions() |
List<TsFileResource> |
getTsFileList(boolean sequence) |
TsFileResourceList |
getUnsequenceListByTimePartition(long timePartition) |
List<TsFileResource> |
getUnsequenceRecoverTsFileResources() |
String |
getVirtualStorageGroup() |
void |
insertToPartitionFileList(TsFileResource tsFileResource,
boolean sequence,
int insertPos)
insert tsFileResource to a target pos(targetPos = insertPos) e.g. if insertPos = 0, then to the
first, if insert Pos = 1, then to the second.
|
boolean |
isAllowCompaction() |
boolean |
isEmpty(boolean sequence) |
void |
keepOrderInsert(TsFileResource tsFileResource,
boolean sequence) |
void |
readLock() |
void |
readUnlock() |
void |
remove(TsFileResource tsFileResource,
boolean sequence) |
void |
removeAll(List<TsFileResource> tsFileResourceList,
boolean sequence) |
void |
replace(List<TsFileResource> seqFileResources,
List<TsFileResource> unseqFileResources,
List<TsFileResource> targetFileResources,
long timePartition,
boolean isTargetSequence)
This method is called after compaction to update memory.
|
void |
setAllowCompaction(boolean allowCompaction) |
void |
setStorageGroupDir(String storageGroupDir) |
void |
setVirtualStorageGroup(String virtualStorageGroup) |
int |
size(boolean sequence) |
void |
writeLock(String holder) |
void |
writeLockWithTimeout(String holder,
long timeout)
Acquire write lock with timeout,
WriteLockFailedException will be thrown after timeout. |
void |
writeUnlock() |
public List<TsFileResource> getTsFileList(boolean sequence)
public TsFileResourceList getSequenceListByTimePartition(long timePartition)
public TsFileResourceList getUnsequenceListByTimePartition(long timePartition)
public Iterator<TsFileResource> getIterator(boolean sequence)
public void remove(TsFileResource tsFileResource, boolean sequence)
public void removeAll(List<TsFileResource> tsFileResourceList, boolean sequence)
public void insertToPartitionFileList(TsFileResource tsFileResource, boolean sequence, int insertPos)
public void add(TsFileResource tsFileResource, boolean sequence)
public void keepOrderInsert(TsFileResource tsFileResource, boolean sequence) throws IOException
IOExceptionpublic void addForRecover(TsFileResource tsFileResource, boolean sequence)
public void addAll(List<TsFileResource> tsFileResourceList, boolean sequence)
public void replace(List<TsFileResource> seqFileResources, List<TsFileResource> unseqFileResources, List<TsFileResource> targetFileResources, long timePartition, boolean isTargetSequence) throws IOException
IOExceptionpublic boolean contains(TsFileResource tsFileResource, boolean sequence)
public void clear()
public boolean isEmpty(boolean sequence)
public int size(boolean sequence)
public void readLock()
public void readUnlock()
public void writeLock(String holder)
public void writeLockWithTimeout(String holder, long timeout) throws WriteLockFailedException
WriteLockFailedException will be thrown after timeout.
The unit of timeout is ms.public void writeUnlock()
public String getStorageGroupName()
public String getStorageGroupDir()
public void setStorageGroupDir(String storageGroupDir)
public boolean isAllowCompaction()
public void setAllowCompaction(boolean allowCompaction)
public String getVirtualStorageGroup()
public void setVirtualStorageGroup(String virtualStorageGroup)
public List<TsFileResource> getSequenceRecoverTsFileResources()
public List<TsFileResource> getUnsequenceRecoverTsFileResources()
Copyright © 2022 The Apache Software Foundation. All rights reserved.