sumitagrawl commented on code in PR #4340:
URL: https://github.com/apache/ozone/pull/4340#discussion_r1133190314


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeInfoMetrics.java:
##########
@@ -104,23 +104,26 @@ public String getMetricsSourceName() {
    */
   @Metric("Returns the Used space")
   public long getUsed() {
-    return volume.getVolumeInfo().getScmUsed();
+    return volume.getVolumeInfo() != null ?

Review Comment:
   getVolumeInfo() is used multiple places and its null if failedVolume. So 
need to have null check of isFailed check wherever this is called.
   Similarly need fix for refreshVolumeInfo() also



-- 
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