jbonofre opened a new pull request, #1470:
URL: https://github.com/apache/arrow-java/pull/1470

   ## What's Changed
   
   Follow-up to #1461. When no allocation manager type is set, 
`CheckAllocator.check()` used to pick the factory class by searching the 
resource location for `memory-core`, `memory-unsafe` or `memory-netty`. It now 
looks up each known `DefaultAllocationManagerFactory` resource and returns the 
factory it actually found:
   
   - A Netty or Unsafe factory loaded from a location containing `memory-core` 
is no longer inferred as the memory-core test factory.
   - The precedence is unchanged (Unsafe before Netty), but a warning is now 
logged when several allocation manager types are on the classpath, with the 
property / environment variable to choose one.
   - The inference is logged once, with the `Netty` / `Unsafe` name accepted by 
`arrow.allocation.manager.type` and the full location:
   
   ```
   INFO  o.apache.arrow.memory.CheckAllocator - Allocation manager type not 
specified, inferred Unsafe from the classpath at 
file:/.../memory/memory-unsafe/target/classes/org/apache/arrow/memory/unsafe/DefaultAllocationManagerFactory.class
   ```
   
   With both Unsafe and Netty on the classpath:
   
   ```
   WARN  o.apache.arrow.memory.CheckAllocator - Found allocation manager types 
[Unsafe, Netty] on the classpath, using Unsafe. Set the 
arrow.allocation.manager.type system property or the 
ARROW_ALLOCATION_MANAGER_TYPE environment variable to choose one explicitly
   ```
   
   `TestCheckAllocator` covers the inference with a class loader serving 
resources from chosen locations.
   
   Closes #1469.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to