jixuan1989 commented on a change in pull request #72: [IOTDB-22] Fix Bug in JIRA
URL: https://github.com/apache/incubator-iotdb/pull/72#discussion_r260773493
 
 

 ##########
 File path: 
tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
 ##########
 @@ -246,21 +246,21 @@ public Chunk readMemChunk(ChunkMetaData metaData) throws 
IOException {
   /**
    * not thread safe.
    *
-   * @param type -given tsfile data type
+   * @param type given tsfile data type
    */
   public PageHeader readPageHeader(TSDataType type) throws IOException {
-    return readPageHeader(type, -1);
+    return PageHeader.deserializeFrom(tsFileInput.wrapAsInputStream(), type);
   }
 
   /**
-   * notice, this function will modify channel's position.
+   * read the page's header.
    *
-   * @param position the file offset of this page header's header
+   * @param position the file offset of this chunk's header
+   * @param markerRead true if the offset does not contains the marker , 
otherwise false
+   * @param dataType given tsfile data type
    */
-  public PageHeader readPageHeader(TSDataType type, long position) throws 
IOException {
-    int size = PageHeader.calculatePageHeaderSize(type);
-    ByteBuffer buffer = readData(position, size);
-    return PageHeader.deserializeFrom(buffer, type);
+  private PageHeader readPageHeader(long position, boolean markerRead, 
TSDataType dataType) throws IOException {
 
 Review comment:
   You'd better put dataType as the first parameter.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to