question: public static List < LoadMetadataDetails > identifySegmentsToBeMerged ( String storeLocation , CarbonLoadModel carbonLoadModel , int partitionCount , long compactionSize , List < LoadMetadataDetails > segments , CompactionType compactionType ) { List sortedSegments = new ArrayList ( segments ) ; sortSegments ( sortedSegments ) ; List < LoadMetadataDetails > listOfSegmentsAfterPreserve = checkPreserveSegmentsPropertyReturnRemaining ( sortedSegments ) ; List < LoadMetadataDetails > listOfSegmentsLoadedInSameDateInterval = identifySegmentsToBeMergedBasedOnLoadedDate ( listOfSegmentsAfterPreserve ) ; List < LoadMetadataDetails > listOfSegmentsToBeMerged ; if ( compactionType . equals ( CompactionType . MAJOR_COMPACTION ) ) { listOfSegmentsToBeMerged = identifySegmentsToBeMergedBasedOnSize ( compactionSize , listOfSegmentsLoadedInSameDateInterval , carbonLoadModel , partitionCount , storeLocation ) ; } else { listOfSegmentsToBeMerged = identifySegmentsToBeMergedBasedOnSegCount ( listOfSegmentsLoadedInSameDateInterval ) ; } return listOfSegmentsToBeMerged ; }
target:  To identify which all segments can be merged.