You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/03/31 17:01:22 UTC

[GitHub] [incubator-iotdb] SilverNarcissus commented on a change in pull request #966: Fix visible metadata, version, work processor bugs when recovering

SilverNarcissus commented on a change in pull request #966: Fix visible metadata, version, work processor bugs when recovering
URL: https://github.com/apache/incubator-iotdb/pull/966#discussion_r401070728
 
 

 ##########
 File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java
 ##########
 @@ -471,4 +473,12 @@ public void setProcessor(TsFileProcessor processor) {
   public TimeseriesMetadata getTimeSeriesMetadata() {
     return timeSeriesMetadata;
   }
+
+  public long getTimePartition() {
+    if (startTimeMap != null && !startTimeMap.isEmpty()) {
+      return StorageEngine.getTimePartition(startTimeMap.values().iterator().next());
+    }
+    String[] splits = FilePathUtils.splitTsFilePath(this);
+    return Long.parseLong(splits[splits.length - 2]);
 
 Review comment:
   If we sync a tsfile from other iotdb, will this tsfile has time partition directory? Maybe we should use startTimeMap to get time partition

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services