-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-9371: [Java] Run vector tests for both allocators #7676
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
Conversation
java/vector/pom.xml
Outdated
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.
Can we simply remove this section?
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.
Hey @liyafan82, we can skip this section but we will run the tests 3 times then. One of the three will be with an unknown Allocator (it will be chosen at runtime depending on classpath). I thought it was a bit of a waste.
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.
Thanks for your clarification.
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.
When we run tests from IDE, it is also with an unknown allocator, right?
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, thats correct. We would have to set an env variable in the IDE to choose one or the other.
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.
would it work to remove the skip=true here and add <classpathDependencyExclude>org.apache.arrow:arrow-memory-unsafe</classpathDependencyExclude>, so that the default test runs netty, then leave the additional run-unsafe section only?
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, that is quite a bit simpler. Apologies for misunderstanding originally.
I have made that change
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 do not find the code for closing the allocator
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.
It would be nice to implement the code by try-with-resource
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.
thanks, agreed. Fixed!
e993dc0 to
7cf3ecc
Compare
liyafan82
left a comment
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.
LGTM, thanks.
|
Build fail could be a random network error or related to the parallel build. Have rebased & retriggered. |
BryanCutler
left a comment
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.
LGTM, just a couple minor things
java/vector/pom.xml
Outdated
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 think you can remove the comment now
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.
👍
java/vector/pom.xml
Outdated
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.
rename to run-unsafe please
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.
👍
Thanks for the review @BryanCutler I won't rush a small change next time and save you the trouble ;-) |
|
Did a quick timing test for this, as expected it doubles the test time for arrow-vector, which is ~10s on my laptop. That seems ok to me. Before After |
|
@rymurr looks like this needs a rebase |
As per apache#7619 (comment) the vector tests should be run for both netty and unsafe allocators
|
rebase is done, thanks @BryanCutler I agree re timing, I saw the same numbers. On my laptop the vector compilation time dwarfs the test time so doubling the test time didn't seem too bad. |
BryanCutler
left a comment
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.
LGTM
|
merged to master, thanks @rymurr ! |
As per apache#7619 (comment) the vector tests should be run for both netty and unsafe allocators. The default tests are run with the Netty allocator, and `run-unsafe` tests are done with the Unsafe Allocator. Closes apache#7676 from rymurr/ARROW-9371 Authored-by: Ryan Murray <rymurr@dremio.com> Signed-off-by: Bryan Cutler <cutlerb@gmail.com>
As per #7619 (comment) the vector tests should be run for both netty and unsafe allocators. The default tests are run with the Netty allocator, and
run-unsafetests are done with the Unsafe Allocator.