Skip to content

Commit

Permalink
[MINOR][0.7] Avoid returning null in defaultUserApps when quota file …
Browse files Browse the repository at this point in the history
…does't config user
  • Loading branch information
smallzhongfeng committed Apr 14, 2023
1 parent bcb591e commit 48c4246
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void parseQuotaFile(DataInputStream fsDataInputStream) {

public boolean checkQuota(String user, String uuid) {
Map<String, Long> 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) {
Expand Down

0 comments on commit 48c4246

Please sign in to comment.