Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1198#discussion_r129765977
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java
 ---
    @@ -145,21 +146,31 @@ public static void 
renameBadRecordsFromInProgressToNormal(
       /**
        * This method will be used to delete sort temp location is it is exites
        */
    -  public static void deleteSortLocationIfExists(String tempFileLocation) {
    -    // create new temp file location where this class
    -    //will write all the temp files
    -    File file = new File(tempFileLocation);
    -
    -    if (file.exists()) {
    -      try {
    -        CarbonUtil.deleteFoldersAndFiles(file);
    -      } catch (IOException | InterruptedException e) {
    -        LOGGER.error(e);
    +  public static void deleteSortLocationIfExists(String[] locations) {
    +    for (String loc : locations) {
    +      File file = new File(loc);
    +      if (file.exists()) {
    +        try {
    +          CarbonUtil.deleteFoldersAndFiles(file);
    +        } catch (IOException | InterruptedException e) {
    +          LOGGER.error(e, "Failed to delete " + loc);
    +        }
           }
         }
       }
     
       /**
    +   * This method will be used to create dirs
    +   * @param locations locations to create
    +   */
    +  public static void createLocations(String[] locations) {
    +    for (String loc : locations) {
    +      if (new File(loc).mkdirs()) {
    --- End diff --
    
    :+1: nice


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to