fanhualta commented on a change in pull request #736: Refactor TsFile
URL: https://github.com/apache/incubator-iotdb/pull/736#discussion_r377529080
 
 

 ##########
 File path: 
tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java
 ##########
 @@ -129,54 +131,53 @@ protected void startFile() throws IOException {
    * @param deviceId device id
    */
   public void startChunkGroup(String deviceId) throws IOException {
+    this.deviceId = deviceId;
+    currentChunkGroupStartOffset = out.getPosition();
     logger.debug("start chunk group:{}, file position {}", deviceId, 
out.getPosition());
-    currentChunkGroupMetaData = new ChunkGroupMetaData(deviceId, new 
ArrayList<>(),
-        out.getPosition());
+    chunkMetaDataList = new ArrayList<>();
   }
 
   /**
    * end chunk and write some log.
    * If there is no data in the chunk group, nothing will be flushed.
    */
   public void endChunkGroup(long version) throws IOException {
 
 Review comment:
   If `version` is useless, please remove it.

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


With regards,
Apache Git Services

Reply via email to