Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-473]Optimize ArrowColumnarToRow performance #474

Merged
merged 15 commits into from
Sep 7, 2021

Conversation

JkSelf
Copy link
Contributor

@JkSelf JkSelf commented Aug 16, 2021

What changes were proposed in this pull request?

  1. Use the DirectBuffer to allocate and release memory in java side to reduce the memory footprint.
  2. Optimize the native side convert logic with converting by column and not row by row
  3. Code clean.

How was this patch tested?

existing tests

@github-actions
Copy link

#473

arrowSchema, batch.numRows, bufAddrs.toArray, bufSizes.toArray,
SparkMemoryUtils.contextMemoryPool().getNativeInstanceId)
val size = estimateBufferSize(batch.numCols(), batch.numRows()) + totalVariableSize.toInt
val directBuffer = ByteBuffer.allocateDirect(size).asInstanceOf[DirectBuffer]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@JkSelf JkSelf force-pushed the ColumnarToRowOP3 branch 16 times, most recently from 0b3d47c to 7ba8693 Compare August 24, 2021 06:20
@JkSelf JkSelf force-pushed the ColumnarToRowOP3 branch 5 times, most recently from 762cdbd to a9d658f Compare August 28, 2021 08:46
JkSelf and others added 3 commits September 1, 2021 13:58
* [NSE-465] Provide option to rely on JVM GC to release Arrow buffers in Java
@zhouyuan zhouyuan merged commit dda5c2b into oap-project:master Sep 7, 2021
@zhouyuan
Copy link
Collaborator

zhouyuan commented Sep 7, 2021

@JkSelf thanks for the continuing efforts!

@weiting-chen
Copy link
Collaborator

weiting-chen commented Jan 11, 2022

Close #473

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants