diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMGetDelegationTokenRequest.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMGetDelegationTokenRequest.java index 77d16d575e..be88b43df4 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMGetDelegationTokenRequest.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMGetDelegationTokenRequest.java @@ -147,8 +147,8 @@ public class OMGetDelegationTokenRequest extends OMClientRequest { OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager(); try { - OzoneTokenIdentifier ozoneTokenIdentifier = - ozoneTokenIdentifierToken.decodeIdentifier(); + OzoneTokenIdentifier ozoneTokenIdentifier = OzoneTokenIdentifier. + readProtoBuf(ozoneTokenIdentifierToken.getIdentifier()); // Update in memory map of token. long renewTime = ozoneManager.getDelegationTokenMgr() diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMRenewDelegationTokenRequest.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMRenewDelegationTokenRequest.java index 49cc72495c..11c0c82b52 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMRenewDelegationTokenRequest.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMRenewDelegationTokenRequest.java @@ -123,8 +123,8 @@ public class OMRenewDelegationTokenRequest extends OMClientRequest { .setSuccess(true); try { - OzoneTokenIdentifier ozoneTokenIdentifier = - ozoneTokenIdentifierToken.decodeIdentifier(); + OzoneTokenIdentifier ozoneTokenIdentifier = OzoneTokenIdentifier. + readProtoBuf(ozoneTokenIdentifierToken.getIdentifier()); // Update in memory map of token. ozoneManager.getDelegationTokenMgr()