Skip to content

HBASE-28903: Incremental backup test missing explicit test for bulkloads - #6345

Open
hgromer wants to merge 1 commit into
apache:masterfrom
hgromer:HBASE-28903
Open

HBASE-28903: Incremental backup test missing explicit test for bulkloads#6345
hgromer wants to merge 1 commit into
apache:masterfrom
hgromer:HBASE-28903

Conversation

@hgromer

Copy link
Copy Markdown
Contributor

No description provided.

@hgromer

Copy link
Copy Markdown
ContributorAuthor

cc @rmdmattingly

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.


// implement all test cases in 1 test since incremental
// backup/restore has dependencies
@SuppressWarnings("checkstyle:MethodLength")

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Let me know if there's a better way to go about this. We could split the test up, but I think it's nice to have one single test for the entire backup/restore process. It helps simulate real-life scenarios where we're constantly taking backups of the same table.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Checkstyle failures are not fatal to the build, so please don't mask them. If you think that the current length limit is too low, that's a discission for the dev list.

@hgromer

Copy link
Copy Markdown
ContributorAuthor

cc @DieterDP-ng going to tag you here as well :)

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 37sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+1 💚mvninstall3m 6smaster passed
+1 💚compile0m 32smaster passed
+1 💚checkstyle0m 12smaster passed
+1 💚spotbugs0m 32smaster passed
+1 💚spotless0m 46sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚mvninstall2m 53sthe patch passed
+1 💚compile0m 31sthe patch passed
+1 💚javac0m 31sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 11sthe patch passed
+1 💚spotbugs0m 39sthe patch passed
+1 💚hadoopcheck10m 34sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless0m 44spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 12sThe patch does not generate ASF License warnings.
28m 0s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6345/5/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6345
JIRA IssueHBASE-28903
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux f63f962e5218 5.4.0-195-generic #215-Ubuntu SMP Fri Aug 2 18:28:05 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / be7ef29
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count87 (vs. ulimit of 30000)
modulesC: hbase-backup U: hbase-backup
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6345/5/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 40sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 2smaster passed
+1 💚compile0m 21smaster passed
+1 💚javadoc0m 15smaster passed
+1 💚shadedjars5m 21sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚mvninstall3m 0sthe patch passed
+1 💚compile0m 21sthe patch passed
+1 💚javac0m 21sthe patch passed
+1 💚javadoc0m 16sthe patch passed
+1 💚shadedjars5m 19spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit10m 40shbase-backup in the patch passed.
30m 17s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6345/5/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6345
JIRA IssueHBASE-28903
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 54de420ea93f 5.4.0-195-generic #215-Ubuntu SMP Fri Aug 2 18:28:05 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / be7ef29
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6345/5/testReport/
Max. process+thread count3733 (vs. ulimit of 30000)
modulesC: hbase-backup U: hbase-backup
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6345/5/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Assert.assertEquals(HBaseTestingUtil.countRows(hTable, famsToLoad), rowsExpected);
}

private static Path createHFiles(TableName tn, String regionName, byte[]... fams)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd avoid generating random data. Test failures may get ignored as flaky tests.

newTable1Desc = TableDescriptorBuilder.newBuilder(newTable1Desc)
.setColumnFamily(ColumnFamilyDescriptorBuilder.of(fam3Name)).build();
updateDesc(newTable1Desc, tables, conn);
testBulkloads(conn, famName, mobName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it would be better to include the bulkfile generation and tests in the the above logic rather than add them at the end here. Unless you specifically want to test the behavior when a new CF was added, in that case I'd suggest to create a dedicated test method so it is clear what is being tested.

Just some background: normally each functionality would be tested in a separate test method, but because the backup-creation process takes a long time, some backup tests test multiple things at the same time. Hence they get messy real quick. It's a delicate balance.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Maybe I'll split up the tests in that case. I just want to test that bulkloaded files actually are restored to the table correctly. So I can have a bulkload-specific test that

  1. Bulkloads data + writes data
  2. Takes a full backup
  3. Verifies all the data exists
  4. Bulkloads more data
  5. Takes incremental backup
  6. Verifies data exists

return regionDir;
}

private static void verifyHFileHasNRows(Path path, int rows) throws IOException {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Best to check (some) actual row values as well, not just the counts. This will also be easier without random data.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you're up to it, feel free to refactor this test to make it more readable.
If you do so, I suggest 2 commits: one to refactor the test, one to add the bulkload tests to it.

Assert.assertEquals(HBaseTestingUtil.countRows(hTable, famsToLoad), rowsExpected);
}

private static Path createHFiles(TableName tn, String regionName, byte[]... fams)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd actually expect that the TestFullBackup also needs to test bulkloads. So either a similar method to generate HFiles already exists, or this method can move to a higher level so it can be used in multiple tests.

Sign up for freeto 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.

4 participants

@hgromer@Apache-HBase@ndimiduk@DieterDP-ng