public static boolean isCompactionRequiredForTable(String metaFolderPath){
  String minorCompactionStatusFile=metaFolderPath + CarbonCommonConstants.FILE_SEPARATOR + CarbonCommonConstants.minorCompactionRequiredFile;
  String majorCompactionStatusFile=metaFolderPath + CarbonCommonConstants.FILE_SEPARATOR + CarbonCommonConstants.majorCompactionRequiredFile;
  try {
    if (FileFactory.isFileExist(minorCompactionStatusFile,FileFactory.getFileType(minorCompactionStatusFile)) || FileFactory.isFileExist(majorCompactionStatusFile,FileFactory.getFileType(majorCompactionStatusFile))) {
      return true;
    }
  }
 catch (  IOException e) {
    LOGGER.error("Exception in isFileExist compaction request file " + e.getMessage());
  }
  return false;
}

public static boolean isCompactionRequiredForTable ( String metaFolderPath ) { String minorCompactionStatusFile = metaFolderPath + CarbonCommonConstants . FILE_SEPARATOR + CarbonCommonConstants . minorCompactionRequiredFile ; String majorCompactionStatusFile = metaFolderPath + CarbonCommonConstants . FILE_SEPARATOR + CarbonCommonConstants . majorCompactionRequiredFile ; try { if ( FileFactory . isFileExist ( minorCompactionStatusFile , FileFactory . getFileType ( minorCompactionStatusFile ) ) || FileFactory . isFileExist ( majorCompactionStatusFile , FileFactory . getFileType ( majorCompactionStatusFile ) ) ) { return true ; } } catch ( IOException e ) { LOGGER . error ( "Exception in isFileExist compaction request file " + e . getMessage ( ) ) ; } return false ; }
check whether the file to indicate the compaction is present or not .
