You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by bs...@apache.org on 2019/03/25 19:48:41 UTC
[hive] branch master updated: HIVE-21493: BuddyAllocator - Metrics
count for allocated arenas wrong if preallocation is done (Olli Draese via
Slim Bouguerra)
This is an automated email from the ASF dual-hosted git repository.
bslim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 80998ad HIVE-21493: BuddyAllocator - Metrics count for allocated arenas wrong if preallocation is done (Olli Draese via Slim Bouguerra)
80998ad is described below
commit 80998ad57e98a468c04f72d320d7aa797070d8c5
Author: Olli Draese <od...@cloudera.com>
AuthorDate: Mon Mar 25 12:48:25 2019 -0700
HIVE-21493: BuddyAllocator - Metrics count for allocated arenas wrong if preallocation is done (Olli Draese via Slim Bouguerra)
---
.../src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java b/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
index a5d20ee..60d6edf 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
@@ -162,6 +162,7 @@ public final class BuddyAllocator
int initCount = doPreallocate && !isMapped ? maxArenas : 1;
for (int i = 0; i < initCount; ++i) {
arenas[i].init(i);
+ metrics.incrAllocatedArena();
}
allocatedArenas.set(initCount);
this.memoryManager = memoryManager;
@@ -170,7 +171,6 @@ public final class BuddyAllocator
defragCounters[i] = new AtomicLong(0);
}
this.metrics = metrics;
- metrics.incrAllocatedArena();
boolean isBoth = null == discardMethod || "both".equalsIgnoreCase(discardMethod);
doUseFreeListDiscard = isBoth || "freelist".equalsIgnoreCase(discardMethod);
doUseBruteDiscard = isBoth || "brute".equalsIgnoreCase(discardMethod);