@Override
  public boolean flushBatchedValuePage(
      AlignedPageElement alignedPageElement,
      int subTaskId,
      AbstractCompactionFlushController flushController)
      throws PageException, IOException {
    PageHeader timePageHeader = alignedPageElement.getTimePageHeader();
    List<PageHeader> valuePageHeaders = alignedPageElement.getValuePageHeaders();
    ByteBuffer compressedTimePageData = alignedPageElement.getTimePageData();
    List<ByteBuffer> compressedValuePageDatas = alignedPageElement.getValuePageDataList();

    checkPreviousTimestamp(timePageHeader.getStartTime(), subTaskId);
    if (flushController.shouldSealChunkWriter()) {
      sealChunk(fileWriter, chunkWriters[subTaskId], subTaskId);
    }
    boolean isUnsealedPageOverThreshold =
        chunkWriters[subTaskId].checkIsUnsealedPageOverThreshold(
            pageSizeLowerBoundInCompaction, pagePointNumLowerBoundInCompaction, true);
    // there is unsealed page or current page is not large enough , then deserialize the page
    if (!isUnsealedPageOverThreshold) {
      return false;
    }

    flushAlignedPageToChunkWriter(
        (AlignedChunkWriterImpl) chunkWriters[subTaskId],
        compressedTimePageData,
        timePageHeader,
        compressedValuePageDatas,
        valuePageHeaders,
        subTaskId);

    lastTime[subTaskId] = timePageHeader.getEndTime();
    lastTimeSet[subTaskId] = true;
    return true;
  }
Flush aligned page to tsfile directly. Return whether the page is flushed to tsfile
successfully or not. Return false if the unsealed page is too small or the end time of page
exceeds the end time of file, else return true. Notice: if sub-value measurement is null, then
flush empty value page.

@throws IOException if io errors occurred
@throws PageException if errors occurred when write data page header
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/writer/FastInnerCompactionWriter.java