Skip to content

Commit

Permalink
rename closeUnsealedTsFileProcessor to closeUnsealedTsFileProcessorCa…
Browse files Browse the repository at this point in the history
…llBack
  • Loading branch information
qiaojialin committed Mar 17, 2020
1 parent 51558bf commit 04eceef
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
* When a sequence TsFileProcessor is submitted to be flushed, the updateLatestFlushTimeCallback()
* method will be called as a callback.<br/>
* <p>
* When a TsFileProcessor is closed, the closeUnsealedTsFileProcessor() method will be called as a
* When a TsFileProcessor is closed, the closeUnsealedTsFileProcessorCallBack() method will be called as a
* callback.
*/
public class StorageGroupProcessor {
Expand Down Expand Up @@ -386,7 +386,7 @@ schema, getVersionControllerByTimePartitionId(timePartitionId), tsFileResource,
// the last file is not closed, continue writing to in
TsFileProcessor tsFileProcessor = new TsFileProcessor(storageGroupName, tsFileResource,
schema, getVersionControllerByTimePartitionId(timePartitionId),
this::closeUnsealedTsFileProcessor,
this::closeUnsealedTsFileProcessorCallBack,
this::updateLatestFlushTimeCallback, true, writer);
workUnsequenceTsFileProcessors
.put(timePartitionId, tsFileProcessor);
Expand Down Expand Up @@ -415,7 +415,7 @@ schema, getVersionControllerByTimePartitionId(timePartitionId), tsFileResource,
// the last file is not closed, continue writing to in
TsFileProcessor tsFileProcessor = new TsFileProcessor(storageGroupName, tsFileResource,
schema, getVersionControllerByTimePartitionId(timePartitionId),
this::closeUnsealedTsFileProcessor,
this::closeUnsealedTsFileProcessorCallBack,
this::unsequenceFlushCallback, false, writer);
tsFileResource.setProcessor(tsFileProcessor);
tsFileProcessor.setTimeRangeId(timePartitionId);
Expand Down Expand Up @@ -787,12 +787,12 @@ private TsFileProcessor createTsFileProcessor(boolean sequence, long timePartiti
if (sequence) {
tsFileProcessor = new TsFileProcessor(storageGroupName,
fsFactory.getFileWithParent(filePath),
schema, versionController, this::closeUnsealedTsFileProcessor,
schema, versionController, this::closeUnsealedTsFileProcessorCallBack,
this::updateLatestFlushTimeCallback, true);
} else {
tsFileProcessor = new TsFileProcessor(storageGroupName,
fsFactory.getFileWithParent(filePath),
schema, versionController, this::closeUnsealedTsFileProcessor,
schema, versionController, this::closeUnsealedTsFileProcessorCallBack,
this::unsequenceFlushCallback, false);
}

Expand Down Expand Up @@ -1308,7 +1308,7 @@ private boolean updateLatestFlushTimeCallback(TsFileProcessor processor) {
* put the memtable back to the MemTablePool and make the metadata in writer visible
*/
// TODO please consider concurrency with query and insert method.
private void closeUnsealedTsFileProcessor(
private void closeUnsealedTsFileProcessorCallBack(
TsFileProcessor tsFileProcessor) throws TsFileProcessorException {
closeQueryLock.writeLock().lock();
try {
Expand Down

0 comments on commit 04eceef

Please sign in to comment.