davisusanibar commented on code in PR #35314:
URL: https://github.com/apache/arrow/pull/35314#discussion_r1228473853
##########
java/memory/memory-netty/src/test/java/org/apache/arrow/memory/TestBaseAllocator.java:
##########
@@ -1091,6 +1099,43 @@ public void testMemoryLeakWithReservation() throws
Exception {
}
}
+ @Test
+ public void testMemoryUsage() {
+ ListAppender<ILoggingEvent> memoryLogsAppender = new ListAppender<>();
+ Logger logger = (Logger) LoggerFactory.getLogger("arrow.allocator");
+ try {
+ logger.setLevel(Level.TRACE);
+ logger.addAppender(memoryLogsAppender);
+ memoryLogsAppender.start();
+ try (ArrowBuf buf = new ArrowBuf(ReferenceManager.NO_OP, null,
+ 1024, new PooledByteBufAllocatorL().empty.memoryAddress())) {
+ buf.memoryAddress();
Review Comment:
Just trying to use allocator but for some reason the log is not populated if
I run the test by command line, but able to populate log if I run the same test
with allocator thru the IDE.
--
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]