@Test public void testOnlyHeadMagic() throws Exception { File file = fsFactory.getFile(FILE_NAME); TsFileWriter writer = new TsFileWriter(file); writer.getIOWriter().close(); RestorableTsFileIOWriter rWriter = new RestorableTsFileIOWriter(file); writer = new TsFileWriter(rWriter); writer.close(); assertEquals(TSFileConfig.MAGIC_STRING.getBytes().length + TSFileConfig.VERSION_NUMBER .getBytes().length, rWriter.getTruncatedSize()); rWriter = new RestorableTsFileIOWriter(file); assertEquals(TsFileCheckStatus.COMPLETE_FILE, rWriter.getTruncatedSize()); assertFalse(rWriter.canWrite()); rWriter.close(); assertTrue(file.delete()); }
long getTruncatedSize() { return truncatedSize; }
RestorableTsFileIOWriter extends TsFileIOWriter { long getTruncatedSize() { return truncatedSize; } }
RestorableTsFileIOWriter extends TsFileIOWriter { long getTruncatedSize() { return truncatedSize; } RestorableTsFileIOWriter(File file); }
RestorableTsFileIOWriter extends TsFileIOWriter { long getTruncatedSize() { return truncatedSize; } RestorableTsFileIOWriter(File file); static RestorableTsFileIOWriter getWriterForAppendingDataOnCompletedTsFile(File file); Map<Path, MeasurementSchema> getKnownSchema(); List<ChunkMetadata> getVisibleMetadataList(String deviceId, String measurementId,
      TSDataType dataType); Map<String, Map<String, List<ChunkMetadata>>> getMetadatasForQuery(); void makeMetadataVisible(); boolean hasCrashed(); void addSchema(Path path, MeasurementSchema schema); }
RestorableTsFileIOWriter extends TsFileIOWriter { long getTruncatedSize() { return truncatedSize; } RestorableTsFileIOWriter(File file); static RestorableTsFileIOWriter getWriterForAppendingDataOnCompletedTsFile(File file); Map<Path, MeasurementSchema> getKnownSchema(); List<ChunkMetadata> getVisibleMetadataList(String deviceId, String measurementId,
      TSDataType dataType); Map<String, Map<String, List<ChunkMetadata>>> getMetadatasForQuery(); void makeMetadataVisible(); boolean hasCrashed(); void addSchema(Path path, MeasurementSchema schema);  }