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


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/protocolPB/OzonePBHelper.java:
##########
@@ -82,7 +82,8 @@ public static TokenProto protoFromToken(Token<?> tok) {
             setIdentifier(getByteString(tok.getIdentifier())).
             setPassword(getByteString(tok.getPassword())).
             setKindBytes(getFixedByteString(tok.getKind())).
-            setServiceBytes(getFixedByteString(tok.getService()));
+            setServiceBytes(ByteString.copyFromUtf8(
+                tok.getService().toString()));

Review Comment:
   Would `getByteString(tok.getService().getBytes())` work, to avoid two-way 
conversion?



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