[CARBONDATA-4338] Moving dropped partition data to trash master
authorMahesh Raju Somalaraju <mahesh.somalaraju@huawei.com>
Mon, 6 Jun 2022 11:22:28 +0000 (16:52 +0530)
committerIndhumathi27 <indhumathim27@gmail.com>
Tue, 19 Jul 2022 04:44:03 +0000 (10:14 +0530)
commit04b175620fedbb5555258a81081b2f691fa0ee5e
tree1981bb31958fb6cecb26ef22cf286cdbb8c20b94
parent8691cb7ca7456742691f3fdd2f717dd19dc220c9
[CARBONDATA-4338] Moving dropped partition data to trash

Why is this PR needed?
When drop partition operation is performed carbon data will
modify only table status file and can not delete the actual
partition folder which contains data and index files. As
comply with hive behaviour carbon data also should delete
the deleted partition folder in storage[hdfs/obs/etc..].
Before deleting carbon data will keep copy in Trash folder.
User can restore it by checking the partition name and time stamp.

What changes were proposed in this PR?
Moved the deleted partition folder files to trash folder

Does this PR introduce any user interface change?
No

Is any new testcase added?
Yes

This closes #4276
core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
core/src/main/java/org/apache/carbondata/core/util/CleanFilesUtil.java
core/src/main/java/org/apache/carbondata/core/util/TrashUtil.java
docs/configuration-parameters.md
docs/ddl-of-carbondata.md
docs/faq.md
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/partition/CarbonAlterTableDropHivePartitionCommand.scala
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/standardpartition/StandardPartitionTableDropTestCase.scala