tasanuma commented on a change in pull request #3366:
URL: https://github.com/apache/hadoop/pull/3366#discussion_r707829233



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/protocol/StorageReport.java
##########
@@ -48,6 +49,8 @@ public StorageReport(DatanodeStorage storage, boolean failed, 
long capacity,
     this.nonDfsUsed = nonDfsUsed;
     this.remaining = remaining;
     this.blockPoolUsed = bpUsed;
+    this.blockPoolUsagePercent = capacity == 0 ? 0.0f :

Review comment:
       If I remember right, `capacity` can be 0.
   ```suggestion
       this.blockPoolUsagePercent = capacity <= 0 ? 0.0f :
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to