jt2594838 commented on a change in pull request #2405:
URL: https://github.com/apache/iotdb/pull/2405#discussion_r557815870
##########
File path:
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -206,70 +205,58 @@
* latestFlushedTime of devices and will be updated along with
partitionLatestFlushedTimeForEachDevice
*/
private Map<String, Long> globalLatestFlushedTimeForEachDevice = new
HashMap<>();
- private String storageGroupName;
+ private String virtualstorageGroupName;
private String logicalStorageGroupName;
-
private File storageGroupSysDir;
-
// manage seqFileList and unSeqFileList
private TsFileManagement tsFileManagement;
-
/**
* time partition id -> version controller which assigns a version for each
MemTable and
* deletion/update such that after they are persisted, the order of
insertions, deletions and
* updates can be re-determined.
*/
private HashMap<Long, VersionController> timePartitionIdVersionControllerMap
= new HashMap<>();
-
/**
* when the data in a storage group is older than dataTTL, it is considered
invalid and will be
* eventually removed.
*/
private long dataTTL = Long.MAX_VALUE;
private FSFactory fsFactory = FSFactoryProducer.getFSFactory();
private TsFileFlushPolicy fileFlushPolicy;
-
/**
* The max file versions in each partition. By recording this, if several
IoTDB instances have the
* same policy of closing file and their ingestion is identical, then files
of the same version in
* different IoTDB instance will have identical data, providing convenience
for data comparison
* across different instances. partition number -> max version number
*/
private Map<Long, Long> partitionMaxFileVersions = new HashMap<>();
-
- /**
- * value of root.stats."root.sg".TOTAL_POINTS
- */
- private long monitorSeriesValue;
private StorageGroupInfo storageGroupInfo = new StorageGroupInfo(this);
-
/**
* Record the device number of the last TsFile in each storage group, which
is applied to
* initialize the array size of DeviceTimeIndex. It is reasonable to assume
that the adjacent
* files should have similar numbers of devices. Default value:
INIT_ARRAY_SIZE = 64
*/
private int deviceNumInLastClosedTsFile = DeviceTimeIndex.INIT_ARRAY_SIZE;
-
- public boolean isReady() {
- return isReady;
- }
-
- public void setReady(boolean ready) {
- isReady = ready;
- }
-
private boolean isReady = false;
-
private List<CloseFileListener> customCloseFileListeners =
Collections.emptyList();
private List<FlushListener> customFlushListeners = Collections.emptyList();
- public StorageGroupProcessor(String systemDir, String storageGroupName,
- TsFileFlushPolicy fileFlushPolicy, String logicalStorageGroupName)
throws StorageGroupProcessorException {
- this.storageGroupName = storageGroupName;
+ /**
+ * constrcut a storage group processor
+ *
+ * @param systemDir system dir path
+ * @param virtualStorageGroupId virtual storage group id e.g. 1
+ * @param fileFlushPolicy file flush policy
+ * @param logicalStorageGroupName logical storage group name e.g. root.sg1
+ */
+ public StorageGroupProcessor(String systemDir, String virtualStorageGroupId,
+ TsFileFlushPolicy fileFlushPolicy, String logicalStorageGroupName)
+ throws StorageGroupProcessorException {
+ this.virtualstorageGroupName = virtualStorageGroupId;
Review comment:
this.virtualstorageGroupName -> this.virtualstorageGroupId
##########
File path:
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -294,7 +293,7 @@ public StorageGroupProcessor(String systemDir, String
storageGroupName,
}
private void recover() throws StorageGroupProcessorException {
- logger.info("recover Storage Group {}", storageGroupName);
+ logger.info("recover Storage Group {}", virtualstorageGroupName);
Review comment:
`virtualstorageGroupName` (which I believe should be
`virtualstorageGroupId`) is just a number, so the logs of different storage
groups may not be distinguishable.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]