-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add write metrics for kudo. #2630
Conversation
Signed-off-by: liurenjie1024 <[email protected]>
6fe10ca
to
d8fc386
Compare
It introduces a breaking api change, resolved in NVIDIA/spark-rapids#11784 |
build |
1 similar comment
build |
src/main/java/com/nvidia/spark/rapids/jni/kudo/KudoSerializer.java
Outdated
Show resolved
Hide resolved
src/main/java/com/nvidia/spark/rapids/jni/kudo/SlicedBufferSerializer.java
Outdated
Show resolved
Hide resolved
@@ -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) { |
There was a problem hiding this comment.
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.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appears to be unused.
import static com.nvidia.spark.rapids.jni.kudo.KudoSerializer.withTime; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
WriteMetrics writeToStreamWithMetrics(Table table, OutputStream out, int rowOffset, int numRows) { | |
WriteMetrics writeToStreamWithMetrics(Table table, OutputStream out, int rowOffset, int numRows) { |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #2644
Signed-off-by: liurenjie1024 <[email protected]>
This pr add support exporting write metrics of kudo serializer.