You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2019/06/23 09:20:38 UTC
[incubator-iotdb] branch feature_async_close_tsfile updated: add
recover in FileNodeManager
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch feature_async_close_tsfile
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/feature_async_close_tsfile by this push:
new 181b251 add recover in FileNodeManager
181b251 is described below
commit 181b251e199250522cf803c03b4dcbb7e18bc355
Author: qiaojialin <64...@qq.com>
AuthorDate: Sun Jun 23 17:20:36 2019 +0800
add recover in FileNodeManager
---
.../db/engine/filenodeV2/FileNodeManagerV2.java | 22 +++++++++++++---------
.../java/org/apache/iotdb/db/service/IoTDB.java | 1 -
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeManagerV2.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeManagerV2.java
index 8321cb2..7437950 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeManagerV2.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeManagerV2.java
@@ -94,6 +94,19 @@ public class FileNodeManagerV2 implements IService {
if (dir.mkdirs()) {
LOGGER.info("Base directory {} of all storage groups doesn't exist, create it", dir.getPath());
}
+
+ /**
+ * recovery all file node processors.
+ */
+ try {
+ List<String> storageGroups = MManager.getInstance().getAllFileNames();
+ for (String storageGroup: storageGroups) {
+ FileNodeProcessorV2 processor = new FileNodeProcessorV2(baseDir, storageGroup);
+ processorMap.put(storageGroup, processor);
+ }
+ } catch (PathErrorException | ProcessorException e) {
+ e.printStackTrace();
+ }
}
@Override
@@ -184,15 +197,6 @@ public class FileNodeManagerV2 implements IService {
}
}
-
- /**
- * recovery the filenode processor.
- */
- public void recovery() {
- // TODO
- }
-
-
private void writeLog(TSRecord tsRecord, boolean isMonitor, WriteLogNode logNode)
throws FileNodeManagerException {
// TODO
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java b/iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java
index ed1fce8..57639bc 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java
@@ -78,7 +78,6 @@ public class IoTDB implements IoTDBMBean {
boolean enableWAL = IoTDBDescriptor.getInstance().getConfig().isEnableWal();
IoTDBDescriptor.getInstance().getConfig().setEnableWal(false);
- FileNodeManagerV2.getInstance().recovery();
IoTDBDescriptor.getInstance().getConfig().setEnableWal(enableWAL);
// When registering statMonitor, we should start recovering some statistics