public static FileFooter convertFileFooter(List<BlockletInfoColumnar> infoList,int numCols,int[] cardinalities,List<ColumnSchema> columnSchemaList,SegmentProperties segmentProperties) throws IOException {
  SegmentInfo segmentInfo=new SegmentInfo();
  segmentInfo.setNum_cols(columnSchemaList.size());
  segmentInfo.setColumn_cardinalities(CarbonUtil.convertToIntegerList(cardinalities));
  FileFooter footer=new FileFooter();
  footer.setNum_rows(getTotalNumberOfRows(infoList));
  footer.setSegment_info(segmentInfo);
  for (  BlockletInfoColumnar info : infoList) {
    footer.addToBlocklet_index_list(getBlockletIndex(info));
  }
  footer.setTable_columns(columnSchemaList);
  for (  BlockletInfoColumnar info : infoList) {
    footer.addToBlocklet_info_list(getBlockletInfo(info,columnSchemaList,segmentProperties));
  }
  return footer;
}

public static FileFooter convertFileFooter ( List < BlockletInfoColumnar > infoList , int numCols , int [ ] cardinalities , List < ColumnSchema > columnSchemaList , SegmentProperties segmentProperties ) throws IOException { SegmentInfo segmentInfo = new SegmentInfo ( ) ; segmentInfo . setNum_cols ( columnSchemaList . size ( ) ) ; segmentInfo . setColumn_cardinalities ( CarbonUtil . convertToIntegerList ( cardinalities ) ) ; FileFooter footer = new FileFooter ( ) ; footer . setNum_rows ( getTotalNumberOfRows ( infoList ) ) ; footer . setSegment_info ( segmentInfo ) ; for ( BlockletInfoColumnar info : infoList ) { footer . addToBlocklet_index_list ( getBlockletIndex ( info ) ) ; } footer . setTable_columns ( columnSchemaList ) ; for ( BlockletInfoColumnar info : infoList ) { footer . addToBlocklet_info_list ( getBlockletInfo ( info , columnSchemaList , segmentProperties ) ) ; } return footer ; }
it converts list of blockletinfocolumnar to filefooter thrift objects
