processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java
/**
   * Below method will be used to write one table page data, invoked by Consumer
   * @param tablePage
   */
Below method will be used to write one table page data, invoked by Consumer
@param tablePage
Below method will be used to write one table page data invoked by Consumer @param tablePage
@Override public void writeTablePage(TablePage tablePage)
      throws CarbonDataWriterException {
    if (!tablePage.isLastPage()) {
      boolean isAdded = false;
      if (blockletDataHolder.getSize() + tablePage.getEncodedTablePage().getEncodedSize() >=
          blockletSizeThreshold) {
        if (blockletDataHolder.getEncodedTablePages().size() == 0) {
          isAdded = true;
          addPageData(tablePage);
        }
        LOGGER.info("Number of Pages for blocklet is: " + blockletDataHolder.getNumberOfPagesAdded()
            + " :Rows Added: " + blockletDataHolder.getTotalRows());
        writeBlockletToFile();
      }
      if (!isAdded) {
        addPageData(tablePage);
      }
    } else {
      if (tablePage.getPageSize() > 0) {
        addPageData(tablePage);
      }
      if (blockletDataHolder.getNumberOfPagesAdded() > 0) {
        LOGGER.info("Number of Pages for blocklet is: " + blockletDataHolder.getNumberOfPagesAdded()
            + " :Rows Added: " + blockletDataHolder.getTotalRows());
        writeBlockletToFile();
      }
    }
  }
@ Override public void writeTablePage ( TablePage tablePage ) throws CarbonDataWriterException { if ( ! tablePage . isLastPage ( ) ) { boolean isAdded = false ; if ( blockletDataHolder . getSize ( ) + tablePage . getEncodedTablePage ( ) . getEncodedSize ( ) >= blockletSizeThreshold ) { if ( blockletDataHolder . getEncodedTablePages ( ) . size ( ) == 0 ) { isAdded = true ; addPageData ( tablePage ) ; } LOGGER . info ( "Number of Pages for blocklet is: " + blockletDataHolder . getNumberOfPagesAdded ( ) + " :Rows Added: " + blockletDataHolder . getTotalRows ( ) ) ; writeBlockletToFile ( ) ; } if ( ! isAdded ) { addPageData ( tablePage ) ; } } else { if ( tablePage . getPageSize ( ) > 0 ) { addPageData ( tablePage ) ; } if ( blockletDataHolder . getNumberOfPagesAdded ( ) > 0 ) { LOGGER . info ( "Number of Pages for blocklet is: " + blockletDataHolder . getNumberOfPagesAdded ( ) + " :Rows Added: " + blockletDataHolder . getTotalRows ( ) ) ; writeBlockletToFile ( ) ; } } }
Below method will be used to write one table page data, invoked by Consumer
 @param tablePage
Below method will be used to write one table page data invoked by Consumer @param tablePage
// condition for writting all the pages // check if size more than blocklet size then write the page to file // if blocklet size exceeds threshold, write blocklet data // write the data //for last blocklet check if the last page will exceed the blocklet size then write // existing pages and then last page