BryanCutler commented on a change in pull request #7619:
URL: https://github.com/apache/arrow/pull/7619#discussion_r451797963



##########
File path: 
java/memory/memory-core/src/main/java/org/apache/arrow/memory/DefaultAllocationManagerOption.java
##########
@@ -109,7 +109,8 @@ static AllocationManagerType 
getDefaultAllocationManagerType() {
       field.setAccessible(true);
       return (AllocationManager.Factory) field.get(null);
     } catch (Exception e) {
-      throw new RuntimeException("Unable to instantiate Allocation Manager for 
" + clazzName, e);
+      throw new RuntimeException("No DefaultAllocationManager found on 
classpath. Can't allocate Arrow buffers." +
+          " Please consider adding arrow-memory-netty or arrow-memory-unsafe 
as a dependency.");

Review comment:
       Hmm, this one is a little different. It looks like it could be from 
`getUnsafeFactory()`, `getNettyFactory()`, or some custom class.  I would leave 
the original exception with `clazzName`, then in `getUnsafeFactory()`, 
`getNettyFactory()` catch the RuntimeException and add a message like "Please 
ensure [arrow-memory-netty, arrow-memory-unsafe] or equivalent class containing 
the DefaultAllocationManager is on the classpath"




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to