You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by go...@apache.org on 2020/05/21 21:30:08 UTC
[tez] branch master updated: TEZ-4186: Limits: Fix init order
regression from TEZ-4155 (Gopal V, reviewed by Rajesh Balamohan)
This is an automated email from the ASF dual-hosted git repository.
gopalv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tez.git
The following commit(s) were added to refs/heads/master by this push:
new 9d6b11c TEZ-4186: Limits: Fix init order regression from TEZ-4155 (Gopal V, reviewed by Rajesh Balamohan)
9d6b11c is described below
commit 9d6b11ca3ef2d51b0a5fd19d979a4a862f4aaa69
Author: Gopal V <go...@apache.org>
AuthorDate: Thu May 21 14:29:42 2020 -0700
TEZ-4186: Limits: Fix init order regression from TEZ-4155 (Gopal V, reviewed by Rajesh Balamohan)
Signed-off-by: Gopal V <go...@apache.org>
---
tez-api/src/main/java/org/apache/tez/common/counters/Limits.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tez-api/src/main/java/org/apache/tez/common/counters/Limits.java b/tez-api/src/main/java/org/apache/tez/common/counters/Limits.java
index 13cc7fb..3e926c6 100644
--- a/tez-api/src/main/java/org/apache/tez/common/counters/Limits.java
+++ b/tez-api/src/main/java/org/apache/tez/common/counters/Limits.java
@@ -30,6 +30,7 @@ public class Limits {
private static final Logger LOG = LoggerFactory.getLogger(Limits.class);
+ private static final Configuration DEFAULT_CONFIGURATION = new TezConfiguration();
private static Configuration conf = null;
private static int GROUP_NAME_MAX;
private static int COUNTER_NAME_MAX;
@@ -37,11 +38,12 @@ public class Limits {
private static int COUNTERS_MAX;
static {
- init(new TezConfiguration());
+ init(DEFAULT_CONFIGURATION);
}
public synchronized static void setConfiguration(Configuration conf) {
- if (Limits.conf == null && conf != null) {
+ // see change to reset()
+ if (Limits.conf == DEFAULT_CONFIGURATION && conf != null) {
init(conf);
}
}
@@ -105,7 +107,7 @@ public class Limits {
@VisibleForTesting
@InterfaceAudience.Private
public synchronized static void reset() {
- conf = null;
+ conf = DEFAULT_CONFIGURATION;
}
}