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

HBASE-28996: Implement Custom ReplicationEndpoint to Enable WAL Backup to External Storage (Option 3) #6633

Open
wants to merge 6 commits into
base: HBASE-28957
Choose a base branch
from

Conversation

vinayakphegde
Copy link
Contributor

No description provided.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ HBASE-28957 Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for branch
+1 💚 mvninstall 3m 11s HBASE-28957 passed
+1 💚 compile 3m 31s HBASE-28957 passed
+1 💚 checkstyle 0m 45s HBASE-28957 passed
+1 💚 spotbugs 2m 2s HBASE-28957 passed
+1 💚 spotless 0m 45s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for patch
-1 ❌ mvninstall 2m 58s /patch-mvninstall-root.txt root in the patch failed.
-1 ❌ compile 0m 17s /patch-compile-hbase-backup.txt hbase-backup in the patch failed.
-0 ⚠️ javac 0m 17s /patch-compile-hbase-backup.txt hbase-backup in the patch failed.
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 43s the patch passed
-1 ❌ spotbugs 0m 17s /patch-spotbugs-hbase-backup.txt hbase-backup in the patch failed.
-1 ❌ hadoopcheck 2m 43s The patch causes 17 errors with Hadoop v3.3.6.
-1 ❌ hadoopcheck 5m 29s The patch causes 17 errors with Hadoop v3.4.0.
+1 💚 spotless 0m 42s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 16s The patch does not generate ASF License warnings.
28m 11s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6633/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #6633
JIRA Issue HBASE-28996
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux 318d6709c78d 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-28957 / 4e46e0e
Default Java Eclipse Adoptium-17.0.11+9
hadoopcheck https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6633/1/artifact/yetus-general-check/output/patch-javac-3.3.6.txt
hadoopcheck https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6633/1/artifact/yetus-general-check/output/patch-javac-3.4.0.txt
Max. process+thread count 85 (vs. ulimit of 30000)
modules C: hbase-server hbase-backup U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6633/1/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 29s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ HBASE-28957 Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for branch
+1 💚 mvninstall 3m 12s HBASE-28957 passed
+1 💚 compile 1m 14s HBASE-28957 passed
+1 💚 javadoc 0m 40s HBASE-28957 passed
+1 💚 shadedjars 5m 51s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for patch
-1 ❌ mvninstall 3m 1s /patch-mvninstall-root.txt root in the patch failed.
-1 ❌ compile 0m 18s /patch-compile-hbase-backup.txt hbase-backup in the patch failed.
-0 ⚠️ javac 0m 18s /patch-compile-hbase-backup.txt hbase-backup in the patch failed.
+1 💚 javadoc 0m 39s the patch passed
+1 💚 shadedjars 5m 47s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌ unit 224m 0s /patch-unit-hbase-server.txt hbase-server in the patch failed.
-1 ❌ unit 0m 24s /patch-unit-hbase-backup.txt hbase-backup in the patch failed.
250m 51s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6633/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #6633
JIRA Issue HBASE-28996
Optional Tests javac javadoc unit compile shadedjars
uname Linux 6b012e50f4de 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-28957 / 4e46e0e
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6633/1/testReport/
Max. process+thread count 4860 (vs. ulimit of 30000)
modules C: hbase-server hbase-backup U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6633/1/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

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

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

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

This message was automatically generated.

@anmolnar
Copy link
Contributor

@vinayakphegde Please make this patch ready for review, if you're done with it.
You also need to rebase to the feature branch.

Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

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

Generally looks good to me, though I'm not sure if would split this patch into two by separating the framework related changes.

I would add a few trace level log lines for debugging backup events. Usually I just leave my custom logging in the code that I used for developing the patch. They would be useful for future debugging.

import org.slf4j.LoggerFactory;

@InterfaceAudience.Private
public class BackupFileSystemManager {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add javadoc comment to this class.

public class ContinuousBackupReplicationEndpoint extends BaseReplicationEndpoint {
private static final Logger LOG =
LoggerFactory.getLogger(ContinuousBackupReplicationEndpoint.class);
public static final String CONF_PEER_UUID = "hbase.backup.wal.replication.peerUUID";
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 need this configurable? Shouldn't we just generate randomly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if (fsDataOutputstream == null) {
return; // Presume closed
}
fsDataOutputstream.flush();
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this have any effect on S3?
Don't remove, just asking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as far as I understand,
When multipart upload is enabled and the buffer type is set to disk:

  • Data is written to the active block using the write() API.
  • When flush() is called, it flushes the current block, which in this case writes to the underlying disk.
  • When the current block is full during a write() operation, the upload for that block is initiated asynchronously.
  • Finally, when close() is called, it uploads the last block, waits for all block uploads to complete, and then finalizes the upload process.

so, flush will persist the data of the current block to the disk.
But it doesn't actually sync the data to s3.
so, I think we don't need that.
also, we don't need to call the sync method as well I guess.

@vinayakphegde vinayakphegde marked this pull request as ready for review February 11, 2025 07:31
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