Package org.apache.iotdb.db.tools
Class TsFileSelfCheckTool
- java.lang.Object
-
- org.apache.iotdb.db.tools.TsFileSelfCheckTool
-
public class TsFileSelfCheckTool extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TsFileSelfCheckTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcheck(java.lang.String filename, boolean fastFinish)java.util.Map<java.lang.Long,org.apache.iotdb.tsfile.utils.Pair<org.apache.iotdb.tsfile.read.common.Path,org.apache.iotdb.tsfile.file.metadata.TimeseriesMetadata>>getTimeseriesMetadataMapWithPath(java.lang.String filename)
-
-
-
Method Detail
-
getTimeseriesMetadataMapWithPath
public java.util.Map<java.lang.Long,org.apache.iotdb.tsfile.utils.Pair<org.apache.iotdb.tsfile.read.common.Path,org.apache.iotdb.tsfile.file.metadata.TimeseriesMetadata>> getTimeseriesMetadataMapWithPath(java.lang.String filename) throws java.io.IOException, TsFileTimeseriesMetadataException- Throws:
java.io.IOExceptionTsFileTimeseriesMetadataException
-
check
public long check(java.lang.String filename, boolean fastFinish) throws java.io.IOException, org.apache.iotdb.tsfile.exception.TsFileStatisticsMistakesException, TsFileTimeseriesMetadataException- Parameters:
filename- The path of TsFile.fastFinish- If true, the method will only check the format of head (Magic String TsFile, Version Number) and tail (Magic String TsFile) of TsFile.- Returns:
- There are four return values of the check method. The return value is 0, which means that the TsFile self check is error-free. The return value is -1, which means that TsFile has inconsistencies in Statistics. There will be two specific exceptions, one is that the Statistics of TimeSeriesMetadata is inconsistent with the Statistics of the aggregated statistics of ChunkMetadata. The other is that the Statistics of ChunkMetadata is inconsistent with the Statistics of Page aggregation statistics in the Chunk indexed by it. The return value is -2, which means that the TsFile version is not compatible. The return value is -3, which means that the TsFile file does not exist in the given path.
- Throws:
java.io.IOExceptionorg.apache.iotdb.tsfile.exception.TsFileStatisticsMistakesExceptionTsFileTimeseriesMetadataException
-
-