You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/03/26 01:53:42 UTC

[GitHub] [incubator-iotdb] LeiRui commented on a change in pull request #110: change FileChannel to TsFileInput for the future use of tsfile-spark-conn…

LeiRui commented on a change in pull request #110: change FileChannel to TsFileInput for the future use of tsfile-spark-conn…
URL: https://github.com/apache/incubator-iotdb/pull/110#discussion_r268917883
 
 

 ##########
 File path: tsfile/src/test/java/org/apache/iotdb/tsfile/file/header/PageHeaderTest.java
 ##########
 @@ -119,8 +122,8 @@ private PageHeader deSerialized(int offset) {
     FileInputStream fis = null;
     PageHeader header = null;
     try {
-      fis = new FileInputStream(new File(PATH));
-      header = PageHeader.deserializeFrom(DATA_TYPE, fis.getChannel(), offset, true);
+      TsFileInput input = new DefaultTsFileInput(Paths.get(PATH));
 
 Review comment:
   Yes. In TsFile-Spark-Connector I use HDFSInput to override TsFileInput. In HDFSInput FSDataInputStream and FileStatus are used instead of FileChannel to implement the interfaces in TsFileInput. That's why I need to change FileChannel in these functions to TsFileInput.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services