From 4a661ed7f5a4489c9adc40cb7dbc39dff291a14d Mon Sep 17 00:00:00 2001 From: siddharth Date: Mon, 15 Jan 2018 13:52:39 -0800 Subject: [PATCH] Add getReservation to Accountant --- .../main/java/org/apache/arrow/memory/Accountant.java | 9 +++++++++ .../java/org/apache/arrow/memory/BufferAllocator.java | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java b/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java index 5bd6b9fe37956..ed2184aadab16 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java @@ -219,6 +219,15 @@ public long getLimit() { return allocationLimit.get(); } + /** + * Return the initial reservation. + * + * @return reservation in bytes. + */ + public long getInitReservation() { + return reservation; + } + /** * Set the maximum amount of memory that can be allocated in the this Accountant before failing * an allocation. diff --git a/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java b/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java index b23a6e4bd8507..a5da50e627874 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java @@ -91,6 +91,13 @@ public interface BufferAllocator extends AutoCloseable { */ public long getLimit(); + /** + * Return the initial reservation. + * + * @return reservation in bytes. + */ + public long getInitReservation(); + /** * Set the maximum amount of memory this allocator is allowed to allocate. *