Skip to content

[HBASE-27245]Expose the archive API to the end user#4661

Open
alexdongli0829 wants to merge 1 commit intoapache:masterfrom
alexdongli0829:HBASE-27245
Open

[HBASE-27245]Expose the archive API to the end user#4661
alexdongli0829 wants to merge 1 commit intoapache:masterfrom
alexdongli0829:HBASE-27245

Conversation

@alexdongli0829
Copy link
Contributor

@alexdongli0829 alexdongli0829 marked this pull request as ready for review July 28, 2022 00:15
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 30s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 prototool 0m 0s prototool was not available.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for branch
+1 💚 mvninstall 2m 49s master passed
+1 💚 compile 5m 40s master passed
+1 💚 checkstyle 1m 40s master passed
+1 💚 spotless 0m 47s branch has no errors when running spotless:check.
+1 💚 spotbugs 7m 2s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 9s Maven dependency ordering for patch
+1 💚 mvninstall 2m 34s the patch passed
+1 💚 compile 5m 52s the patch passed
+1 💚 cc 5m 52s the patch passed
+1 💚 javac 5m 52s the patch passed
+1 💚 checkstyle 1m 37s the patch passed
-0 ⚠️ rubocop 0m 8s The patch generated 5 new + 407 unchanged - 0 fixed = 412 total (was 407)
-0 ⚠️ whitespace 0m 0s The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
+1 💚 hadoopcheck 13m 0s Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚 hbaseprotoc 2m 20s the patch passed
+1 💚 spotless 0m 49s patch has no errors when running spotless:check.
+1 💚 spotbugs 7m 56s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 45s The patch does not generate ASF License warnings.
61m 22s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4661/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #4661
JIRA Issue HBASE-27245
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile cc hbaseprotoc prototool rubocop
uname Linux 9c42e62a7ed6 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / a3eeab8
Default Java AdoptOpenJDK-1.8.0_282-b08
rubocop https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4661/1/artifact/yetus-general-check/output/diff-patch-rubocop.txt
whitespace https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4661/1/artifact/yetus-general-check/output/whitespace-eol.txt
Max. process+thread count 60 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-testing-util hbase-thrift hbase-shell U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4661/1/console
versions git=2.17.1 maven=3.6.3 spotbugs=4.2.2 rubocop=0.80.0
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 18s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 8s Maven dependency ordering for branch
+1 💚 mvninstall 2m 38s master passed
+1 💚 compile 2m 44s master passed
+1 💚 shadedjars 3m 45s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 51s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 2m 37s the patch passed
+1 💚 compile 2m 42s the patch passed
+1 💚 javac 2m 42s the patch passed
+1 💚 shadedjars 3m 44s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 50s the patch passed
_ Other Tests _
+1 💚 unit 0m 39s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 16s hbase-client in the patch passed.
+1 💚 unit 209m 52s hbase-server in the patch passed.
+1 💚 unit 1m 53s hbase-testing-util in the patch passed.
+1 💚 unit 7m 0s hbase-thrift in the patch passed.
+1 💚 unit 7m 0s hbase-shell in the patch passed.
253m 44s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4661/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #4661
JIRA Issue HBASE-27245
Optional Tests javac javadoc unit shadedjars compile
uname Linux dc8cc1455888 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / a3eeab8
Default Java AdoptOpenJDK-11.0.10+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4661/1/testReport/
Max. process+thread count 2594 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-testing-util hbase-thrift hbase-shell U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4661/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

* @param tableName existing table
* @param archive if archive the data when delete the table
*/
public void deleteTable(TableName tableName, boolean archive) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Make the above method call this method so we can save some lines of code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Apache9 Correct! Will update the code

* snapshot, the performance may be impacted, should evaluate the performance between directly
* archive and snapshot scan TODO: find some any way to get if the table snapshotted or not
*/
if (!archive) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need this logic here? Mind exlaining a bit?

Copy link
Contributor Author

@alexdongli0829 alexdongli0829 Aug 11, 2022

Choose a reason for hiding this comment

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

@Apache9 Thanks so much for your time. The thought is because there will be no archive for all the hfiles, so if there are any snapshots, the snapshots will be broken if any refer for the hfiles, so to avoid the broken, I made the check before conduct the actual delete without archive, make sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, this is a problem...

I think the correct way is to still archive the files which are referenced by snapshots, and delete unreferenced files directly? This wil be a bit hard as snapshot can happen at the same time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Apache9 You are correct, there was some compromise for the performance and accuracy. If need to scan all the snapshot files and find out if the hfile referred, there will be another performance impact, meanwhile, for the snapshot which is happening, we may need a get the lock from the snapshot manager to make sure no in processing snapshot referring the file, its another concern.

So current I just simplify the logic and return the message to end user and let user decide if they want to remove the snapshot and then delete the table without archive. Do you think its acceptable? Or we had better check the details with some performance sacrifice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants