Skip to content

GH-3239: Improve ByteBufferReadable detection in HadoopStream - #3259

Merged
wgtmac merged 1 commit into
apache:masterfrom
wangyum:HG-3239
Jul 31, 2025
Merged

GH-3239: Improve ByteBufferReadable detection in HadoopStream#3259
wgtmac merged 1 commit into
apache:masterfrom
wangyum:HG-3239

Conversation

@wangyum

Copy link
Copy Markdown
Member

This PR improves the ByteBufferReadable detection in HadoopStreams by checking for the "in:readbytebuffer" capability using the hasCapability method instead of hasCapabilities in FSDataInputStream.

@wangyum

Copy link
Copy Markdown
MemberAuthor

cc @steveloughran@wgtmac

@wgtmacwgtmac changed the title HG-3239: Improve ByteBufferReadable detection in HadoopStreamGH-3239: Improve ByteBufferReadable detection in HadoopStreamJul 29, 2025

@wgtmacwgtmac left a comment

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.

Looks good to me as we are already on Hadoop 3.3.0.

Do you have any concern? @gszadovszky@Fokko

@gszadovszkygszadovszky left a comment

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.

LGTM

@steveloughransteveloughran left a comment

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.

always good to get rid of needless reflection.

I think I noted in some other jira that the reflection code was broken too, it was looking for hasCapabilities when it needed hasCapability , so it'd never get found. This PR fixes that with compile-time checking

@wgtmac
wgtmac merged commit e325796 into apache:masterJul 31, 2025
7 checks passed
@wgtmac

Copy link
Copy Markdown
Member

Merged. Thanks everyone!

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.

5 participants

@wangyum@wgtmac@steveloughran@nandorKollar@gszadovszky