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

Add write metrics for kudo. #2630

Open
wants to merge 2 commits into
base: branch-25.02
Choose a base branch
from

Conversation

liurenjie1024
Copy link
Collaborator

This pr add support exporting write metrics of kudo serializer.

@liurenjie1024
Copy link
Collaborator Author

It introduces a breaking api change, resolved in NVIDIA/spark-rapids#11784

@liurenjie1024
Copy link
Collaborator Author

build

1 similar comment
@liurenjie1024
Copy link
Collaborator Author

build

@liurenjie1024 liurenjie1024 changed the base branch from branch-24.12 to branch-25.02 November 27, 2024 06:08
try {
header.writeTo(out);
} catch (IOException e) {
throw new RuntimeException(e);
Copy link
Member

Choose a reason for hiding this comment

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

We should not be remapping exceptions here. Someone trying to catch the IOException will fail to catch it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

writer.copyDataFrom(buffer, offset, length);
return padForHostAlignment(writer, length);
} catch (IOException e) {
throw new RuntimeException(e);
Copy link
Member

Choose a reason for hiding this comment

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

Same remap concern here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@@ -208,7 +218,7 @@ long writeToStream(Table table, OutputStream out, int rowOffset, int numRows) {
* @param numRows number of rows to write
* @return number of bytes written
*/
public long writeToStream(HostColumnVector[] columns, OutputStream out, int rowOffset, int numRows) {
public WriteMetrics writeToStreamWithMetrics(HostColumnVector[] columns, OutputStream out, int rowOffset, int numRows) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I add this new method rather breaking old method's signature to avoid breaking api change.

@liurenjie1024
Copy link
Collaborator Author

build

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.

2 participants