slfan1989 commented on code in PR #5131:
URL: https://github.com/apache/hadoop/pull/5131#discussion_r1036559681
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/RouterStoreToken.java:
##########
@@ -22,6 +22,7 @@
import org.apache.hadoop.yarn.security.client.YARNDelegationTokenIdentifier;
import org.apache.hadoop.yarn.util.Records;
+import java.io.DataInput;
Review Comment:
The method we completed in the impl defines the abstract method declaration
in the abstract class.
`RouterStoreToken` is an abstract class, its impl class is
`RouterStoreTokenPBImpl`, we have implemented these 2 methods.
RouterStoreToken#toByteArray and readFields
```
public abstract byte[] toByteArray() throws IOException;
public abstract void readFields(DataInput in) throws IOException;
```
RouterStoreTokenPBImpl#toByteArray and readFields
```
public byte[] toByteArray() throws IOException {
return builder.build().toByteArray();
}
public void readFields(DataInput in) throws IOException {
builder.mergeFrom((DataInputStream) in);
}
```
--
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]