From 48c4246b9dedfc36a4cac7d854bb70228a5d4a5b Mon Sep 17 00:00:00 2001 From: jokercurry <982458633@qq.com> Date: Fri, 14 Apr 2023 17:47:05 +0800 Subject: [PATCH] [MINOR][0.7] Avoid returning null in defaultUserApps when quota file does't config user --- .../main/java/org/apache/uniffle/coordinator/QuotaManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coordinator/src/main/java/org/apache/uniffle/coordinator/QuotaManager.java b/coordinator/src/main/java/org/apache/uniffle/coordinator/QuotaManager.java index c9bb635afe..f797a832b8 100644 --- a/coordinator/src/main/java/org/apache/uniffle/coordinator/QuotaManager.java +++ b/coordinator/src/main/java/org/apache/uniffle/coordinator/QuotaManager.java @@ -117,7 +117,7 @@ public void parseQuotaFile(DataInputStream fsDataInputStream) { public boolean checkQuota(String user, String uuid) { Map appAndTimes = currentUserAndApp.computeIfAbsent(user, x -> Maps.newConcurrentMap()); - Integer defaultAppNum = defaultUserApps.getOrDefault(user, quotaAppNum); + Integer defaultAppNum = defaultUserApps.computeIfAbsent(user, x -> quotaAppNum); synchronized (this) { int currentAppNum = appAndTimes.size(); if (currentAppNum >= defaultAppNum) {