Skip to content

Conversation

vaibhav5140
Copy link
Contributor

@vaibhav5140 vaibhav5140 commented Jun 25, 2025

Description of change

This PR implements a callback mechanism that allows the analytics accelerator to pass metrics back to the S3A connector, ensuring that each GET operation properly increments the STREAM_READ_ANALYTICS_GET_REQUESTS counter. This enables S3A to monitor and assert with accurate statistics.

Public Jira: https://issues.apache.org/jira/browse/HADOOP-19364

Haddop S3A PR: apache/hadoop#7763


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

Copy link
Collaborator

@ahmarsuhail ahmarsuhail left a comment

Choose a reason for hiding this comment

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

@vaibhav5140 I don't see any tests for your changes?

You will need to assert that the methods in your callback are getting called.

ahmarsuhail
ahmarsuhail previously approved these changes Jul 1, 2025
Copy link
Collaborator

@ahmarsuhail ahmarsuhail left a comment

Choose a reason for hiding this comment

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

+1, pending moving logging to trace.

would be great if you can also update the HEAD request metric also. we can move it into objectClient later

objectClient.headObject(
HeadRequest.builder().s3Uri(s3URI).build(), openStreamInformation)));
() -> {
CompletableFuture<ObjectMetadata> result =
Copy link
Collaborator

Choose a reason for hiding this comment

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

what about updating the head request metric?


@Override
public void onGetRequest() {
LOG.debug("GET request made");
Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry can you move this to TRACE? just thinking logging this at debug will create a lot of noise in the benchmarking logs

Copy link
Collaborator

@ahmarsuhail ahmarsuhail left a comment

Choose a reason for hiding this comment

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

+1, LGTM

@vaibhav5140 vaibhav5140 merged commit ac0fed0 into awslabs:main Jul 2, 2025
4 checks passed
ozkoca pushed a commit that referenced this pull request Jul 14, 2025
## Description of change
<!-- Thank you for submitting a pull request!-->
<!-- Please describe your contribution here. What and why? -->
<!-- Please ensure your commit messages follow these
[guidelines](https://chris.beams.io/posts/git-commit/). -->
This PR implements a callback mechanism that allows the analytics
accelerator to pass metrics back to the S3A connector, ensuring that
each GET operation properly increments the
STREAM_READ_ANALYTICS_GET_REQUESTS counter. This enables S3A to monitor
and assert with accurate statistics.

Public Jira: https://issues.apache.org/jira/browse/HADOOP-19364

Haddop S3A PR: apache/hadoop#7763


---

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and I agree to the terms of
the [Developer Certificate of Origin
(DCO)](https://developercertificate.org/).
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