[ 
https://issues.apache.org/jira/browse/HDDS-16192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18105665#comment-18105665
 ] 

Tsz-wo Sze commented on HDDS-16192:
-----------------------------------

[~echonesis], these are good questions.  Take StorageContainerLocationProtocol 
as an example -- ProtocolInfo and KerberosInfo are defined repeatedly in both 
StorageContainerLocationProtocol and StorageContainerLocationProtocolPB.  One 
of them probably is not needed (and the other one is the real thing).

I traced the code a little bit.  It seems that 
StorageContainerLocationProtocolPB is the real thing (since it  extends 
StorageContainerLocationProtocolService.BlockingInterface and the 
translators/FailoverProxyProvider are using it.  We should verify it first.

- StorageContainerLocationProtocol
{code}
@KerberosInfo(serverPrincipal = ScmConfig.ConfigStrings
      .HDDS_SCM_KERBEROS_PRINCIPAL_KEY)
public interface StorageContainerLocationProtocol extends Closeable {

  // Accessed and checked via reflection in Hadoop RPC - changing it is 
incompatible
  @SuppressWarnings({"checkstyle:ConstantName", "unused"})
  /**
   * Version 1: Initial version.
   */
  long versionID = 1L;

  ...
}
{code}

- StorageContainerLocationProtocolPB
{code}
@ProtocolInfo(protocolName =
    "org.apache.hadoop.hdds.scm.protocol.StorageContainerLocationProtocol",
    protocolVersion = 1)
@KerberosInfo(
    serverPrincipal = ScmConfig.ConfigStrings.HDDS_SCM_KERBEROS_PRINCIPAL_KEY)
@InterfaceAudience.Private
public interface StorageContainerLocationProtocolPB
    extends StorageContainerLocationProtocolService.BlockingInterface {
}
{code}


> Refactor  o.a.h.hdds.scm.protocol
> ---------------------------------
>
>                 Key: HDDS-16192
>                 URL: https://issues.apache.org/jira/browse/HDDS-16192
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: SCM
>            Reporter: Tsz-wo Sze
>            Priority: Major
>
> ||interface||protocol (gRPC service)||
> |StorageContainerLocationProtocol|StorageContainerLocationProtocolService|
> |ScmBlockLocationProtocol|ScmBlockLocationProtocolService|
> The above interfaces in package org.apache.hadoop.hdds.scm.protocol are just 
> internal interfaces but not really protocols, in the sense that changing the 
> signatures of the methods does NOT change the underlying protocols, where the 
> underlying protocols are defined in the corresponding gRPC services.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to