hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject [19/49] hadoop git commit: HDDS-823. OzoneRestClient is failing with NPE on getKeyDetails call. Contributed by Bharat Viswanadham.
Date Tue, 13 Nov 2018 07:50:46 GMT
HDDS-823. OzoneRestClient is failing with NPE on getKeyDetails call. Contributed by Bharat
Viswanadham.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/47194fef
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/47194fef
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/47194fef

Branch: refs/heads/HDFS-13891
Commit: 47194fefdd7a225399342af1960cbd219a9b4763
Parents: 66bf624
Author: Bharat Viswanadham <bharat@apache.org>
Authored: Thu Nov 8 21:28:04 2018 -0800
Committer: Bharat Viswanadham <bharat@apache.org>
Committed: Thu Nov 8 21:28:04 2018 -0800

----------------------------------------------------------------------
 .../hadoop/ozone/web/storage/DistributedStorageHandler.java     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/47194fef/hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/web/storage/DistributedStorageHandler.java
----------------------------------------------------------------------
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 88f2d6e..a8df114 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 final class DistributedStorageHandler implements StorageHandler
{
         HddsClientUtils.formatDateTime(omKeyInfo.getCreationTime()));
     keyInfo.setModifiedOn(
         HddsClientUtils.formatDateTime(omKeyInfo.getModificationTime()));
+    keyInfo.setType(ReplicationType.valueOf(omKeyInfo.getType().toString()));
     return keyInfo;
   }
 
@@ -510,6 +512,8 @@ public final class DistributedStorageHandler implements StorageHandler
{
     keyInfoDetails.setModifiedOn(
         HddsClientUtils.formatDateTime(omKeyInfo.getModificationTime()));
     keyInfoDetails.setKeyLocations(keyLocations);
+    keyInfoDetails.setType(ReplicationType.valueOf(omKeyInfo.getType()
+        .toString()));
     return keyInfoDetails;
   }
 
@@ -553,6 +557,7 @@ public final class DistributedStorageHandler implements StorageHandler
{
             HddsClientUtils.formatDateTime(info.getCreationTime()));
         tempInfo.setModifiedOn(
             HddsClientUtils.formatDateTime(info.getModificationTime()));
+        tempInfo.setType(ReplicationType.valueOf(info.getType().toString()));
 
         result.addKey(tempInfo);
       }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message