提交 e71e7101 编写于 作者: Q qiaojialin

rename upgrade to tmp suffix

上级 92546c40
......@@ -22,7 +22,7 @@ import static org.apache.iotdb.db.conf.IoTDBConstant.FILE_NAME_SEPARATOR;
import static org.apache.iotdb.db.engine.merge.task.MergeTask.MERGE_SUFFIX;
import static org.apache.iotdb.db.engine.storagegroup.TsFileResource.TEMP_SUFFIX;
import static org.apache.iotdb.tsfile.common.constant.TsFileConstant.MERGED_SUFFIX;
import static org.apache.iotdb.tsfile.common.constant.TsFileConstant.PATH_UPGRADE;
import static org.apache.iotdb.tsfile.common.constant.TsFileConstant.TMP_SUFFIX;
import static org.apache.iotdb.tsfile.common.constant.TsFileConstant.TSFILE_SUFFIX;
import static org.apache.iotdb.tsfile.common.constant.TsFileConstant.VM_SUFFIX;
......@@ -553,7 +553,7 @@ public class StorageGroupProcessor {
for (File partitionFolder : subFiles) {
if (partitionFolder.isDirectory()) {
for (File tmpFile : fsFactory.listFilesBySuffix(partitionFolder.getAbsolutePath(),
PATH_UPGRADE)) {
TMP_SUFFIX)) {
Files.delete(tmpFile.toPath());
}
for (File mergedFile : fsFactory.listFilesBySuffix(partitionFolder.getAbsolutePath(),
......
......@@ -21,7 +21,7 @@ package org.apache.iotdb.db.engine.storagegroup;
import static org.apache.iotdb.db.conf.adapter.IoTDBConfigDynamicAdapter.MEMTABLE_NUM_FOR_EACH_PARTITION;
import static org.apache.iotdb.db.engine.flush.VmLogger.VM_LOG_NAME;
import static org.apache.iotdb.tsfile.common.constant.TsFileConstant.MERGED_SUFFIX;
import static org.apache.iotdb.tsfile.common.constant.TsFileConstant.PATH_UPGRADE;
import static org.apache.iotdb.tsfile.common.constant.TsFileConstant.TMP_SUFFIX;
import static org.apache.iotdb.tsfile.common.constant.TsFileConstant.VM_SUFFIX;
import java.io.File;
......@@ -683,7 +683,7 @@ public class TsFileProcessor {
}
} else {
File[] tmpFiles = FSFactoryProducer.getFSFactory()
.listFilesBySuffix(writer.getFile().getParent(), PATH_UPGRADE);
.listFilesBySuffix(writer.getFile().getParent(), TMP_SUFFIX);
if (tmpFiles.length > 0) {
for (File file : tmpFiles) {
Files.delete(file.toPath());
......@@ -1178,7 +1178,7 @@ public class TsFileProcessor {
writer.getFile().getName() + IoTDBConstant.FILE_NAME_SEPARATOR + System
.currentTimeMillis()
+ VM_SUFFIX + IoTDBConstant.PATH_SEPARATOR
+ PATH_UPGRADE);
+ TMP_SUFFIX);
} catch (InterruptedException e) {
logger.error("{}: {}, closing task is interrupted.",
storageGroupName, tsFileResource.getTsFile().getName(), e);
......
......@@ -94,7 +94,7 @@ public class SyncFileManager implements ISyncFileManager {
.listFiles();
for (File sgFolder : allSgFolders) {
if (!sgFolder.getName().startsWith(IoTDBConstant.PATH_ROOT) || sgFolder.getName()
.equals(TsFileConstant.PATH_UPGRADE)) {
.equals(TsFileConstant.TMP_SUFFIX)) {
continue;
}
allSGs.putIfAbsent(sgFolder.getName(), new HashSet<>());
......
......@@ -25,7 +25,7 @@ public class TsFileConstant {
public static final String TSFILE_CONF = "TSFILE_CONF";
public static final String VM_SUFFIX = ".vm";
public static final String PATH_ROOT = "root";
public static final String PATH_UPGRADE = "tmp";
public static final String TMP_SUFFIX = "tmp";
public static final String MERGED_SUFFIX = ".merged";
public static final String FLUSH_SUFFIX = ".flush";
public static final String PATH_SEPARATOR = ".";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册