adoroszlai commented on a change in pull request #1969:
URL: https://github.com/apache/ozone/pull/1969#discussion_r584627903



##########
File path: 
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/authority/CertificateStore.java
##########
@@ -41,19 +41,18 @@
    * Writes a new certificate that was issued to the persistent store.
    * @param serialID - Certificate Serial Number.
    * @param certificate - Certificate to persist.
+   * @param role - OM/DN/SCM.
    * @throws IOException - on Failure.
    */
   void storeValidCertificate(BigInteger serialID,
-                             X509Certificate certificate) throws IOException;
+      X509Certificate certificate, NodeType role) throws IOException;
 
   /**
    * Writes a new SCM certificate that was issued to the persistent store.
    * @param serialID - Certificate Serial Number.
    * @param certificate - Certificate to persist.
    * @throws IOException - on Failure.
    */

Review comment:
       Nit: leftover doc.

##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMCertStore.java
##########
@@ -136,40 +154,32 @@ public void removeExpiredCertificate(BigInteger serialID)
   public X509Certificate getCertificateByID(BigInteger serialID,
                                             CertType certType)
       throws IOException {
-    if (certType == CertType.VALID_CERTS) {
+    if (certType == VALID_CERTS) {
       return scmMetadataStore.getValidCertsTable().get(serialID);
     } else {
       return scmMetadataStore.getRevokedCertsTable().get(serialID);
     }
   }
 
   @Override
-  public List<X509Certificate> listCertificate(HddsProtos.NodeType role,
+  public List<X509Certificate> listCertificate(NodeType role,
       BigInteger startSerialID, int count, CertType certType)
       throws IOException {
-    // TODO: Filter by role
     List<? extends Table.KeyValue<BigInteger, X509Certificate>> certs;

Review comment:
       Nit: can be joined with assignment below.




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

Reply via email to