public static CompactionType determineCompactionType(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))) {
      return CompactionType.MINOR_COMPACTION;
    }
    if (FileFactory.isFileExist(majorCompactionStatusFile,FileFactory.getFileType(majorCompactionStatusFile))) {
      return CompactionType.MAJOR_COMPACTION;
    }
  }
 catch (  IOException e) {
    LOGGER.error("Exception in determining the compaction request file " + e.getMessage());
  }
  return CompactionType.MINOR_COMPACTION;
}

public static CompactionType determineCompactionType ( 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 ) ) ) { return CompactionType . MINOR_COMPACTION ; } if ( FileFactory . isFileExist ( majorCompactionStatusFile , FileFactory . getFileType ( majorCompactionStatusFile ) ) ) { return CompactionType . MAJOR_COMPACTION ; } } catch ( IOException e ) { LOGGER . error ( "Exception in determining the compaction request file " + e . getMessage ( ) ) ; } return CompactionType . MINOR_COMPACTION ; }
determine the type of the compaction received .
