Skip to content

HBASE-30125 Rewrite TestHFileBlockHeaderCorruption#8165

Merged
Apache9 merged 1 commit intoapache:masterfrom
Apache9:HBASE-30125
Apr 30, 2026
Merged

HBASE-30125 Rewrite TestHFileBlockHeaderCorruption#8165
Apache9 merged 1 commit intoapache:masterfrom
Apache9:HBASE-30125

Conversation

@Apache9
Copy link
Copy Markdown
Contributor

@Apache9 Apache9 commented Apr 29, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 484 to 490
public boolean hasNext() throws IOException {
HFileBlock next = iter.nextBlock();
SeekableByteChannel channel = hFileTestRule.getRWChannel();
if (next != null) {
java.nio.file.Path p = FileSystems.getDefault().getPath(hfsPath.toString());
SeekableByteChannel channel = Files.newByteChannel(p, StandardOpenOption.READ,
StandardOpenOption.WRITE, StandardOpenOption.DSYNC);
current = new HFileBlockChannelPosition(channel, next.getOffset());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just copied the old code.

Comment on lines +487 to +489
java.nio.file.Path p = FileSystems.getDefault().getPath(hfsPath.toString());
SeekableByteChannel channel = Files.newByteChannel(p, StandardOpenOption.READ,
StandardOpenOption.WRITE, StandardOpenOption.DSYNC);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just copied the old code.

Comment on lines +91 to +93
public void setUp(TestInfo testInfo) throws IOException {
path = new Path(UTIL.getDataTestDirOnTestFS(), testInfo.getTestMethod().get().getName());
hfileCtx = new HFileContextBuilder().withBlockSize(4 * 1024).withHBaseCheckSum(true).build();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Follow the old pattern with method name, in our test environment a test method is always present.

@Apache9 Apache9 merged commit 2187ed7 into apache:master Apr 30, 2026
16 checks passed
Apache9 added a commit that referenced this pull request Apr 30, 2026
Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
(cherry picked from commit 2187ed7)
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