ashishkumar50 commented on code in PR #4340:
URL: https://github.com/apache/ozone/pull/4340#discussion_r1135102019
##########
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 ?
+ volume.getVolumeInfo().getScmUsed() : 0;
Review Comment:
Hi @swamirishi , Thanks for review. I have updated volumeInfo to Optional.
##########
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:
Handled the change.
--
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]