Skip to content

Commit ea1939a

Browse files
committed
fix spotbugs
1 parent bb390f7 commit ea1939a

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ DatanodeInfo[] getCachedDatanodeReport(DatanodeReportType type)
10901090
throws IOException {
10911091
try {
10921092
DatanodeInfo[] dns = this.dnCache.get(type);
1093-
if (dns == null) {
1093+
if (dns.length == 0) {
10941094
LOG.debug("Get null DN report from cache");
10951095
dns = getCachedDatanodeReportImpl(type);
10961096
this.dnCache.put(type, dns);

0 commit comments

Comments
 (0)