public long getTimePartitionWithCheck() throws PartitionViolationException {
    return timeIndex.getTimePartitionWithCheck(file.toString());
  }
Used when load new TsFiles not generated by the server Check and get the time partition

@throws PartitionViolationException if the data of the file spans partitions or it is empty
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java