GitHub user NamanRastogi opened a pull request:

    https://github.com/apache/carbondata/pull/2996

    [WIP] Fix Rename-Fail & Datamap-creation-Fail

    Fixed negative scenarios:
    1. Alter Table Rename Table Fail
    2. Create Preagregate-Datamap Fail
    
    ### Alter Table Rename Table Fail
    * Changed <code>CarbonAlterTableRenameCommand</code>
    * When tabe rename is success in hive, for failed in carbon data store, it 
would throw exception, but would not go back and undo rename in hive.
    
    **Solution**: A flag to keep check if hive rename has already executed, and 
of the code breaks after hive rename is done, go back and undo the hive rename.
    
    ### Create-Preagregate-Datamap Fail
    * Changed <code>CarbonDropDataMapCommand</code>
    * When (preaggregate) datamap schema is written, but table updation is 
failed
        -> call CarbonDropDataMapCommand.processMetadata()
        -> call dropDataMapFromSystemFolder() -> this is  supposed to delete 
the folder on disk, but doesnt as the datamap is not yet updated in table, and 
throws NoSuchDataMapException
    
    **Solution**: Call CarbonDropTableCommand.run() instead of 
CarbonDropTableCommand.processDatamap(). As 
CarbonDropTableCommand.processData() deletes actual folders from disk.
           
    
     - [x] Any interfaces changed?   --->   No
     - [ ] Any backward compatibility impacted?
     - [x] Document update required?   --->   No
     - [ ] Testing done 
     - [ ] For large changes, please consider breaking it into sub-tasks under 
an umbrella JIRA. 


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/NamanRastogi/carbondata hdfs_quota_fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/2996.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2996
    
----
commit c67b61eef376d9218d5b67f1946cef5406fb3712
Author: namanrastogi <naman.rastogi.52@...>
Date:   2018-12-13T10:39:58Z

    Fixed Alter Table Rename

commit 4b97c01045431e25f8b5bbe11f9cc49e7bda23ec
Author: namanrastogi <naman.rastogi.52@...>
Date:   2018-12-18T06:21:02Z

    Fixed no-deletion of datamap folder, when table updation is failed

----


---

Reply via email to