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

ASF GitHub Bot commented on NIFI-5746:
--------------------------------------

Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3109#discussion_r228061483
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/server/StandardLoadBalanceProtocol.java
 ---
    @@ -130,17 +130,14 @@ public void receiveFlowFiles(final Socket socket) 
throws IOException {
                 final Set<String> certIdentities;
                 try {
                     certIdentities = getCertificateIdentities(sslSession);
    -
    -                final String dn = 
CertificateUtils.extractPeerDNFromSSLSocket(socket);
    -                peerDescription = CertificateUtils.extractUsername(dn);
                 } catch (final CertificateException e) {
                     throw new IOException("Failed to extract Client 
Certificate", e);
                 }
     
                 logger.debug("Connection received from peer {}. Will perform 
authorization against Client Identities '{}'",
                     peerDescription, certIdentities);
     
    -            authorizer.authorize(certIdentities);
    +            peerDescription = authorizer.authorize(certIdentities);
    --- End diff --
    
    Although the commit message says "Use Node Identifier's node address 
instead of getting from socket for RECEIVE prov events", we still uses the 
`nodename` for RECEIVE provenance events [1] that is derived from 
`socket.getInetAddress().getHostName()` [2].
    
    I wonder if you intended to use this peerDescription instead. Thoughts?
    
    1. 
https://github.com/apache/nifi/blob/c5e79da4449db81119ab898f15ab7c2aa64b9c91/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/server/StandardLoadBalanceProtocol.java#L343
    2. 
https://github.com/apache/nifi/blob/c5e79da4449db81119ab898f15ab7c2aa64b9c91/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/server/StandardLoadBalanceProtocol.java#L155


> The SEND and RECEIVE provenance events for load balancing do not have the 
> same transit uri syntax
> -------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-5746
>                 URL: https://issues.apache.org/jira/browse/NIFI-5746
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.8.0
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>             Fix For: 1.9.0
>
>
> The SEND event has a transit uri like nifi:connection:<connection id>
> The RECEIVE event has a transit uri like nifi://<source node 
> address>/loadbalance/<connection id>
> The RECEIVE event is much preferred, as it indicates not only that the 
> transfer was via load balance but also includes the address of the node and 
> the UUID of the connection. The SEND Transit URI should be changed to 
> nifi://<destination node address>/loadbalance/<connection id>



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to