zhztheplayer commented on code in PR #5550:
URL: https://github.com/apache/incubator-gluten/pull/5550#discussion_r1591928181
##########
gluten-data/src/main/java/org/apache/gluten/memory/nmm/NativeMemoryManagers.java:
##########
@@ -48,6 +50,15 @@ public static NativeMemoryManager contextInstance(String
name) {
id, () -> createNativeMemoryManager(name, Collections.emptyList()));
}
+ public static NativeMemoryPool arrowPool(String name) {
+ if (!TaskResources.inSparkTask()) {
+ throw new IllegalStateException("This method must be called in a Spark
task.");
+ }
+ String id = "ArrowNativeMemoryPool:" + name;
+ return TaskResources.addResourceIfNotRegistered(id, () ->
createArrowNativeMemoryPool(name))
+ .getArrowPool();
+ }
Review Comment:
Sorry, just missed this code.
Let's move the method (as well as `createArrowNativeMemoryPool`) to
`ArrowNativeMemoryPool.scala`, thanks.
--
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]