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:34 UTC

[incubator-iotdb] branch fix_sequence_reader_eof updated (ffa4322 -> be04532)

This is an automated email from the ASF dual-hosted git repository.

lta pushed a change to branch fix_sequence_reader_eof
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


 discard ffa4322  fix eog of sequence reader
     new be04532  fix eof of sequence reader

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (ffa4322)
            \
             N -- N -- N   refs/heads/fix_sequence_reader_eof (be04532)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[incubator-iotdb] 01/01: fix eof of sequence reader

Posted by lt...@apache.org.
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.