diff --git a/hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/web/storage/DistributedStorageHandler.java b/hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/web/storage/DistributedStorageHandler.java index 88f2d6ef943..a8df11440fa 100644 --- a/hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/web/storage/DistributedStorageHandler.java +++ b/hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/web/storage/DistributedStorageHandler.java @@ -19,6 +19,7 @@ package org.apache.hadoop.ozone.web.storage; import com.google.common.base.Strings; +import org.apache.hadoop.hdds.client.ReplicationType; import org.apache.hadoop.hdds.scm.client.HddsClientUtils; import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.io.retry.RetryPolicy; @@ -486,6 +487,7 @@ public KeyInfo getKeyInfo(KeyArgs args) throws IOException, OzoneException { HddsClientUtils.formatDateTime(omKeyInfo.getCreationTime())); keyInfo.setModifiedOn( HddsClientUtils.formatDateTime(omKeyInfo.getModificationTime())); + keyInfo.setType(ReplicationType.valueOf(omKeyInfo.getType().toString())); return keyInfo; } @@ -510,6 +512,8 @@ public KeyInfo getKeyInfoDetails(KeyArgs args) throws IOException{ keyInfoDetails.setModifiedOn( HddsClientUtils.formatDateTime(omKeyInfo.getModificationTime())); keyInfoDetails.setKeyLocations(keyLocations); + keyInfoDetails.setType(ReplicationType.valueOf(omKeyInfo.getType() + .toString())); return keyInfoDetails; } @@ -553,6 +557,7 @@ public ListKeys listKeys(ListArgs args) throws IOException, OzoneException { HddsClientUtils.formatDateTime(info.getCreationTime())); tempInfo.setModifiedOn( HddsClientUtils.formatDateTime(info.getModificationTime())); + tempInfo.setType(ReplicationType.valueOf(info.getType().toString())); result.addKey(tempInfo); }