HTHou commented on a change in pull request #464: Modified Decoder and 
SequenceReader to support old version of TsFile
URL: https://github.com/apache/incubator-iotdb/pull/464#discussion_r337001576
 
 

 ##########
 File path: 
tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
 ##########
 @@ -346,6 +341,12 @@ private ChunkHeader readChunkHeader(long position, 
boolean markerRead) throws IO
    * @return the pages of this chunk
    */
   public ByteBuffer readChunk(ChunkHeader header) throws IOException {
+    if (this.readVersionNumber().startsWith("v")) {
+      config.setEndian("LITTLE_ENDIAN");
+    }
+    else {
+      config.setEndian("BIG_ENDIAN");
+    }
 
 Review comment:
   > I think this will cause a mess if two files of different endian are being 
read concurrently.
   
   Yes, it may cause a mess, but I have no other idea about how and where to 
determine the endian type. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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