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

Merged

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 liurenjie1024 requested a review from jlowe November 27, 2024 03:35
@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
@@ -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

@@ -16,19 +16,19 @@

package com.nvidia.spark.rapids.jni.kudo;

import static com.nvidia.spark.rapids.jni.kudo.KudoSerializer.padForHostAlignment;
import static com.nvidia.spark.rapids.jni.kudo.KudoSerializer.withTime;
Copy link
Member

Choose a reason for hiding this comment

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

Appears to be unused.

Suggested change
import static com.nvidia.spark.rapids.jni.kudo.KudoSerializer.withTime;

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 in #2644

@@ -176,7 +176,7 @@ public KudoSerializer(Schema schema) {
* @param numRows number of rows to write
* @return number of bytes written
*/
long writeToStream(Table table, OutputStream out, int rowOffset, int numRows) {
WriteMetrics writeToStreamWithMetrics(Table table, OutputStream out, int rowOffset, int numRows) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: should be 2-space indentation

Suggested change
WriteMetrics writeToStreamWithMetrics(Table table, OutputStream out, int rowOffset, int numRows) {
WriteMetrics writeToStreamWithMetrics(Table table, 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.

Fixed in #2644

* @return number of bytes written
*/
public long writeToStream(HostColumnVector[] columns, OutputStream out, int rowOffset, int numRows) {
return writeToStreamWithMetrics(columns, out, rowOffset, numRows).getWrittenBytes();
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: inconsistent indentation with the rest of the file

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 in #2644

@liurenjie1024 liurenjie1024 merged commit 3a0b458 into NVIDIA:branch-25.02 Dec 4, 2024
4 checks passed
liurenjie1024 added a commit to liurenjie1024/spark-rapids-jni that referenced this pull request Dec 4, 2024
Signed-off-by: liurenjie1024 <[email protected]>
@liurenjie1024 liurenjie1024 deleted the ray/kudo-write-metrics branch December 4, 2024 03:59
liurenjie1024 added a commit that referenced this pull request Dec 4, 2024
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