Skip to content

Conversation

@LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Jul 14, 2020

What changes were proposed in this pull request?

Add additional configuration to maven-clean-plugin to ensure cleanup metastore_db and spark-warehouse directory when execute mvn clean command.

Why are the changes needed?

Now Spark support two version of build-in hive and there are some test generated meta data not in target dir like metastore_db, they don't clean up automatically when we run mvn clean command.

So if we run mvn clean test -pl sql/hive -am -Phadoop-2.7 -Phive -Phive-1.2 , the metastore_db dir will created and meta data will remains after test complete.

Then we need manual cleanup metastore_db directory to ensure mvn clean test -pl sql/hive -am -Phadoop-2.7 -Phive command use hive2.3 profile can succeed because the residual metastore data is not compatible.

spark-warehouse will also cause test failure in some data residual scenarios because test case thinks that meta data should not exist.

This pr is used to simplify manual cleanup metastore_db and spark-warehouse directory operation.

How was this patch tested?

Manual execute mvn clean test -pl sql/hive -am -Phadoop-2.7 -Phive -Phive-1.2, then execute mvn clean test -pl sql/hive -am -Phadoop-2.7 -Phive, both commands should succeed.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@LuciferYang
Copy link
Contributor Author

ping @dongjoon-hyun and @xuanyuanking

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-32305][BUILD]Automatically cleanup meta data generated by test cases not in target dir [SPARK-32305][BUILD] Make mvn clean remove metastore_db and spark-warehouse Jul 14, 2020
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @LuciferYang .
Merged to master for Apache Spark 3.1.0 on December 2020.
I verified this manually. Although it's irrelevant, GitHub Action also passed.

@LuciferYang
Copy link
Contributor Author

Thx @dongjoon-hyun

@HyukjinKwon
Copy link
Member

+1

@LuciferYang LuciferYang deleted the add-clean-directory branch June 6, 2022 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants