Skip to content

Commit 2ba93be

Browse files
author
weixiaoxing3
committed
HDFS-16693. RBF: fix NPE in Quota
1 parent 589695c commit 2ba93be

File tree

1 file changed

+2
-1
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router

1 file changed

+2
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Quota.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ QuotaUsage getGlobalQuota(String path) throws IOException {
204204
* @return {@code true} if path is a mount entry; {@code false} otherwise.
205205
*/
206206
private boolean isMountEntry(String path) {
207-
return router.getQuotaManager().isMountEntry(path);
207+
return router.isQuotaEnabled() &&
208+
router.getQuotaManager().isMountEntry(path);
208209
}
209210

210211
/**

0 commit comments

Comments
 (0)