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

ARROW-8168:[Java][Plasma] Improve Java Plasma client off-heap memory usage #6715

Closed
wants to merge 5 commits into from

Conversation

jikunshang
Copy link
Contributor

Implement create() and getByteBuffer() method, Java client could use off-heap ByteBuffer to avoid memory copy.

@github-actions
Copy link

Copy link

@winningsix winningsix left a 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) {

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?

Copy link
Contributor Author

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);

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?

Copy link
Contributor Author

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.

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.

@winningsix
Copy link

LGTM (no-binding)

@wesm could you take a further look at this? Thanks!

Copy link
Member

@wesm wesm left a 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

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