You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by lt...@apache.org on 2019/11/08 06:56:35 UTC
[incubator-iotdb] 01/01: fix eof of sequence reader
This is an automated email from the ASF dual-hosted git repository.
lta pushed a commit to branch fix_sequence_reader_eof
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit be045325f7cf82b5e45e4ed13e5e3ccdbde3406c
Author: lta <li...@163.com>
AuthorDate: Fri Nov 8 14:55:24 2019 +0800
fix eof of sequence reader
---
.../tsfile/fileSystem/fileOutputFactory/HDFSOutputFactory.java | 1 +
.../java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java | 9 +++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fileOutputFactory/HDFSOutputFactory.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fileOutputFactory/HDFSOutputFactory.java
index 8680ccc..829a782 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fileOutputFactory/HDFSOutputFactory.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fileOutputFactory/HDFSOutputFactory.java
@@ -41,6 +41,7 @@ public class HDFSOutputFactory implements FileOutputFactory {
}
}
+ @Override
public TsFileOutput getTsFileOutput(String filePath, boolean append) {
try {
return (TsFileOutput) constructor.newInstance(filePath, !append);
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
index b406b0a..81930e2 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
@@ -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.