提交 6a582753 编写于 作者: T Tianan Li 提交者: Jialin Qiao

fix eof of sequence reader (#538)

上级 4fccf462
......@@ -41,6 +41,7 @@ public class HDFSOutputFactory implements FileOutputFactory {
}
}
@Override
public TsFileOutput getTsFileOutput(String filePath, boolean append) {
try {
return (TsFileOutput) constructor.newInstance(filePath, !append);
......
......@@ -662,15 +662,16 @@ public class TsFileSequenceReader implements AutoCloseable {
// the disk file is corrupted, using this file may be dangerous
MetaMarker.handleUnexpectedMarker(marker);
goon = false;
logger.error("Unrecognized marker detected, this file may be corrupted");
logger.error(String
.format("Unrecognized marker detected, this file {%s} may be corrupted", file));
}
}
// now we read the tail of the data section, so we are sure that the last ChunkGroupFooter is
// complete.
truncatedPosition = this.position() - 1;
} catch (IOException e2) {
logger.info("TsFile self-check cannot proceed at position {} after {} chunk groups "
+ "recovered, because : {}", this.position(), newMetaData.size(), e2.getMessage());
} catch (Exception e2) {
logger.info("TsFile {} self-check cannot proceed at position {} after {} chunk groups "
+ "recovered, because : {}", file, this.position(), newMetaData.size(), e2.getMessage());
}
// Despite the completeness of the data section, we will discard current FileMetadata
// so that we can continue to write data into this tsfile.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册