adoroszlai commented on code in PR #8181:
URL: https://github.com/apache/ozone/pull/8181#discussion_r2022421424


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/StorageLocationReport.java:
##########
@@ -227,34 +232,28 @@ public static StorageLocationReport 
getFromProtobuf(StorageReportProto report)
     return builder.build();
   }
 
-  /**
-   * Returns the StorageLocationReport from the protoBuf message.
-   * @param report MetadataStorageReportProto
-   * @return StorageLocationReport
-   * @throws IOException in case of invalid storage type
-   */
-
-  public static StorageLocationReport getMetadataFromProtobuf(
-      MetadataStorageReportProto report) throws IOException {
-    StorageLocationReport.Builder builder = StorageLocationReport.newBuilder();
-    builder.setStorageLocation(report.getStorageLocation());
-    if (report.hasCapacity()) {
-      builder.setCapacity(report.getCapacity());
-    }
-    if (report.hasScmUsed()) {
-      builder.setScmUsed(report.getScmUsed());
-    }
-    if (report.hasStorageType()) {
-      builder.setStorageType(getStorageType(report.getStorageType()));
-    }
-    if (report.hasRemaining()) {
-      builder.setRemaining(report.getRemaining());
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder(128)
+        .append("{")
+        .append(" dir=").append(storageLocation)
+        .append(" type=").append(storageType);
+
+    if (id != null) {

Review Comment:
   Yes.  For existing volumes it is set only when the version file is read from 
disk, and we log `Creating ...` message before that.



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