Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report dirty metadata in meta table #81

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

Mengqi777
Copy link

Our cluster has experienced such problems: a table has been deleted but meta table still storage metadata about this table, thoese metadata show in hbck ui until I delete them.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 7s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 spotbugs 0m 0s spotbugs executables are not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-0 ⚠️ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚 mvninstall 0m 48s master passed
+1 💚 compile 0m 9s master passed
+1 💚 checkstyle 0m 7s master passed
+1 💚 javadoc 0m 7s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 10s the patch passed
+1 💚 compile 0m 9s the patch passed
+1 💚 javac 0m 9s the patch passed
-1 ❌ checkstyle 0m 4s hbase-hbck2: The patch generated 8 new + 0 unchanged - 0 fixed = 8 total (was 0)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 0m 5s the patch passed
_ Other Tests _
+1 💚 unit 3m 43s hbase-hbck2 in the patch passed.
+1 💚 asflicense 0m 5s The patch does not generate ASF License warnings.
6m 42s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/1/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #81
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
uname Linux 036fa5d67579 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build tool maven
git revision master / 2958eeb
Default Java Oracle Corporation-1.8.0_282-b08
checkstyle https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/1/artifact/yetus-precommit-check/output/diff-checkstyle-hbase-hbck2.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/1/testReport/
Max. process+thread count 1030 (vs. ulimit of 5000)
modules C: hbase-hbck2 U: hbase-hbck2
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/1/console
versions git=2.20.1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@wchevreuil wchevreuil left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this PR, @Mengqi777 ! I have a few remarks made on part of the code. Additional to those, please add UTs for each of the added methods.

Also, we need to add description for this new command at hbck2 README.md.

@@ -263,6 +259,39 @@ public static void addRegionToMeta(Connection conn, RegionInfo region) throws IO
});
}


/**
* List all dirty metadata currently in META.
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's explain properly what "dirty" means in this context.

Scan scan = new Scan();
ResultScanner resultScanner = metaTable.getScanner(scan);
for (Result result : resultScanner) {
result.listCells().forEach(cell -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need to iterate through each cell? It seems you only care about the row key, so no need to go through every single cell of each row.

@@ -100,6 +102,7 @@
private static final String SET_REGION_STATE = "setRegionState";
private static final String SCHEDULE_RECOVERIES = "scheduleRecoveries";
private static final String GENERATE_TABLE_INFO = "generateMissingTableDescriptorFile";
private static final String REPORT_DIRTY_METADATA = "reportDirtyMetadata";
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's give this command a more intuitive name. What's dirtyMetadata?

writer.println(" Options:");
writer.println(" -f, --fix fix meta by delete all dirty metadata found.");
writer.println(" Looks for undeleted metadata in meta table. ");
writer.println(" Undeleted metadata means a table has been deleted, but not delete all metadata in meta.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we describe here in more details an example scenario where this command would be useful? See, for example, the explanation for reportMissingRegionsInMeta.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 2s #81 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
Subsystem Report/Notes
GITHUB PR #81
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/2/console
versions git=2.17.1
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 0m 39s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 spotbugs 0m 0s spotbugs executables are not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 1m 4s master passed
+1 💚 compile 0m 10s master passed
+1 💚 checkstyle 0m 7s master passed
+1 💚 javadoc 0m 7s master passed
-0 ⚠️ patch 0m 18s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 11s the patch passed
+1 💚 compile 0m 9s the patch passed
+1 💚 javac 0m 9s the patch passed
-1 ❌ checkstyle 0m 5s hbase-hbck2: The patch generated 41 new + 0 unchanged - 0 fixed = 41 total (was 0)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 0m 5s the patch passed
_ Other Tests _
-1 ❌ unit 3m 18s hbase-hbck2 in the patch failed.
+1 💚 asflicense 0m 6s The patch does not generate ASF License warnings.
6m 12s
Reason Tests
Failed junit tests hbase.TestHBCK2
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/3/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #81
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
uname Linux b501e887666b 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build tool maven
git revision master / 90e0f45
Default Java Oracle Corporation-1.8.0_282-b08
checkstyle https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/3/artifact/yetus-precommit-check/output/diff-checkstyle-hbase-hbck2.txt
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/3/artifact/yetus-precommit-check/output/patch-unit-hbase-hbck2.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/3/testReport/
Max. process+thread count 1204 (vs. ulimit of 5000)
modules C: hbase-hbck2 U: hbase-hbck2
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/3/console
versions git=2.20.1
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 0m 37s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 spotbugs 0m 0s spotbugs executables are not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 0m 51s master passed
+1 💚 compile 0m 10s master passed
+1 💚 checkstyle 0m 7s master passed
+1 💚 javadoc 0m 7s master passed
-0 ⚠️ patch 0m 18s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 11s the patch passed
+1 💚 compile 0m 10s the patch passed
+1 💚 javac 0m 10s the patch passed
-1 ❌ checkstyle 0m 4s hbase-hbck2: The patch generated 41 new + 0 unchanged - 0 fixed = 41 total (was 0)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 0m 5s the patch passed
_ Other Tests _
-1 ❌ unit 3m 16s hbase-hbck2 in the patch failed.
+1 💚 asflicense 0m 6s The patch does not generate ASF License warnings.
5m 53s
Reason Tests
Failed junit tests hbase.TestHBCK2
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/4/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #81
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
uname Linux aa7e44d56c6f 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build tool maven
git revision master / 90e0f45
Default Java Oracle Corporation-1.8.0_282-b08
checkstyle https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/4/artifact/yetus-precommit-check/output/diff-checkstyle-hbase-hbck2.txt
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/4/artifact/yetus-precommit-check/output/patch-unit-hbase-hbck2.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/4/testReport/
Max. process+thread count 1198 (vs. ulimit of 5000)
modules C: hbase-hbck2 U: hbase-hbck2
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/4/console
versions git=2.20.1
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 0m 58s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 spotbugs 0m 0s spotbugs executables are not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 1m 2s master passed
+1 💚 compile 0m 12s master passed
+1 💚 checkstyle 0m 7s master passed
+1 💚 javadoc 0m 8s master passed
-0 ⚠️ patch 0m 18s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 12s the patch passed
+1 💚 compile 0m 11s the patch passed
+1 💚 javac 0m 11s the patch passed
+1 💚 checkstyle 0m 5s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 0m 6s the patch passed
_ Other Tests _
+1 💚 unit 3m 30s hbase-hbck2 in the patch passed.
+1 💚 asflicense 0m 7s The patch does not generate ASF License warnings.
6m 48s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/5/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #81
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
uname Linux 272a241a52a7 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build tool maven
git revision master / 90e0f45
Default Java Oracle Corporation-1.8.0_282-b08
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/5/testReport/
Max. process+thread count 1200 (vs. ulimit of 5000)
modules C: hbase-hbck2 U: hbase-hbck2
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/5/console
versions git=2.20.1
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 0m 37s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 spotbugs 0m 1s spotbugs executables are not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 1m 1s master passed
+1 💚 compile 0m 10s master passed
+1 💚 checkstyle 0m 12s master passed
+1 💚 javadoc 0m 7s master passed
-0 ⚠️ patch 0m 23s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 11s the patch passed
+1 💚 compile 0m 9s the patch passed
+1 💚 javac 0m 9s the patch passed
+1 💚 checkstyle 0m 4s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 0m 6s the patch passed
_ Other Tests _
+1 💚 unit 3m 15s hbase-hbck2 in the patch passed.
+1 💚 asflicense 0m 6s The patch does not generate ASF License warnings.
6m 7s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/6/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #81
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
uname Linux c19d22702a6a 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build tool maven
git revision master / 90e0f45
Default Java Oracle Corporation-1.8.0_282-b08
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/6/testReport/
Max. process+thread count 1185 (vs. ulimit of 5000)
modules C: hbase-hbck2 U: hbase-hbck2
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-Operator-Tools-PreCommit/job/PR-81/6/console
versions git=2.20.1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Mengqi777
Copy link
Author

@wchevreuil hi bro, thanks for your suggestion, I have change the name to reportundeletedregionsinmeta and add the UTs, PTAL.

@Mengqi777 Mengqi777 requested a review from wchevreuil August 23, 2021 08:51
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 2s #81 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
Subsystem Report/Notes
GITHUB PR #81
Console output https://ci-hbase.apache.org/job/HBase-Operator-Tools-PreCommit/job/PR-81/1/console
versions git=2.25.1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

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