-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
ARROW-8168:[Java][Plasma] Improve Java Plasma client off-heap memory usage #6715
Conversation
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.
A few minor comments.
* @param timeoutMs time in milliseconfs to wait before this request time out. | ||
* @param isMetadata get this object's metadata or data. | ||
*/ | ||
public ByteBuffer getByteBuffer(byte[] objectId, int timeoutMs, boolean isMetadata) { |
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.
Hint: rename getByteBuffer
as getObjAsByteBuffer
?
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.
Yes, it's more meaningful.
@@ -46,11 +46,6 @@ public static native ByteBuffer create(long conn, byte[] objectId, int size, byt | |||
|
|||
public static native boolean contains(long conn, byte[] objectId); | |||
|
|||
public static native void fetch(long conn, byte[][] objectIds); |
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.
Considering the backward compatibility, we should keep those APIs and mark as deprecated
. Thoughts?
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.
These two APIs have native declare, but implementation has been removed.
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.
So it's not for this JIRA? Better file a separated PR addressing it.
…entation." This reverts commit e7957b7.
LGTM (no-binding) @wesm could you take a further look at this? Thanks! |
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.
+1. Thank you for reviewing
Implement create() and getByteBuffer() method, Java client could use off-heap ByteBuffer to avoid memory copy.