pvary commented on code in PR #14499:
URL: https://github.com/apache/iceberg/pull/14499#discussion_r2502435361


##########
arrow/src/main/java/org/apache/iceberg/arrow/ArrowAllocation.java:
##########
@@ -19,16 +19,43 @@
 package org.apache.iceberg.arrow;
 
 import org.apache.arrow.memory.RootAllocator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ArrowAllocation {
+  private static final Logger LOG = 
LoggerFactory.getLogger(ArrowAllocation.class);
+
+  private static final String ALLOCATION_MANAGER_TYPE_PROPERTY =
+      "arrow.memory.allocation.manager.type";
+
   static {
-    ROOT_ALLOCATOR = new RootAllocator(Long.MAX_VALUE);
+    // Set Arrow allocation manager to Netty if not already configured
+    // This prevents Arrow's auto-detection from failing when classes are 
shaded
+    // (e.g.; org.apache.iceberg.shaded.org.apache.arrow.*) since the 
path-based
+    // detection in CheckAllocator.check() doesn't recognize shaded package 
structures
+    String existingValue = 
System.getProperty(ALLOCATION_MANAGER_TYPE_PROPERTY);

Review Comment:
   Is this 
`DefaultAllocationManagerOption.ALLOCATION_MANAGER_TYPE_PROPERTY_NAME`



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to