core/src/main/java/org/apache/carbondata/core/metadata/PartitionMapFileStore.java
/**
   * It deletes the old partition mapper files in case of success. And in case of failure it removes
   * the old new file.
   * @param segmentPath
   * @param uniqueId
   * @param success
   */
It deletes the old partition mapper files in case of success. And in case of failure it removes
the old new file.
It deletes the old partition mapper files in case of success . And in case of failure it removes the old new file .
public void commitPartitions(String segmentPath, final String uniqueId, boolean success,
      String tablePath, List<String> partitionsToDrop) {
    CarbonFile carbonFile = FileFactory
        .getCarbonFile(segmentPath + "/" + uniqueId + CarbonTablePath.PARTITION_MAP_EXT + ".tmp");
    CarbonFile carbonPartFile = FileFactory
        .getCarbonFile(tablePath + "/" + partitionsToDrop.get(0));
    if (carbonFile.exists()) {
      if (success) {
        carbonFile.renameForce(segmentPath + "/" + uniqueId + CarbonTablePath.PARTITION_MAP_EXT);
      } else {
        carbonFile.delete();
      }
    }
    carbonPartFile.delete();
  }
public void commitPartitions ( String segmentPath , final String uniqueId , boolean success , String tablePath , List < String > partitionsToDrop ) { CarbonFile carbonFile = FileFactory . getCarbonFile ( segmentPath + "/" + uniqueId + CarbonTablePath . PARTITION_MAP_EXT + ".tmp" ) ; CarbonFile carbonPartFile = FileFactory . getCarbonFile ( tablePath + "/" + partitionsToDrop . get ( 0 ) ) ; if ( carbonFile . exists ( ) ) { if ( success ) { carbonFile . renameForce ( segmentPath + "/" + uniqueId + CarbonTablePath . PARTITION_MAP_EXT ) ; } else { carbonFile . delete ( ) ; } } carbonPartFile . delete ( ) ; }
It deletes the old partition mapper files in case of success.
It deletes the old partition mapper files in case of success .
// write partition info to new file. //Remove the partition directory from table path