xiaoyuyao commented on a change in pull request #2191:
URL: https://github.com/apache/ozone/pull/2191#discussion_r631392175
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMSecurityProtocolServer.java
##########
@@ -333,6 +341,30 @@ public long getLatestCrlId() {
return scmCertificateServer.getLatestCrlId();
}
+ @Override
+ public long revokeCertificates(List<Long> certIds, int reason,
+ long revocationTime) throws IOException {
+ String remoteUser = getRpcRemoteUsername();
+ storageContainerManager.checkAdminAccess(remoteUser);
+
+ Future<Optional<Long>> revoked = scmCertificateServer.revokeCertificates(
+ certIds.stream().map(id -> BigInteger.valueOf(id))
+ .collect(Collectors.toList()),
Review comment:
Good question. Most of the caller and existing APIs use String for
certid and convert it to BigInteger when talking to the store layer. We can
follow that and covert it only once (String->BigInteger) when talking to the
store layer.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]