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

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

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

    https://github.com/apache/nifi/pull/2237#discussion_r147990929
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-services/nifi-hbase_1_1_2-client-service-bundle/nifi-hbase_1_1_2-client-service/src/main/java/org/apache/nifi/hbase/HBase_1_1_2_ClientService.java
 ---
    @@ -535,4 +539,16 @@ public Configuration getConfiguration() {
         public byte[] toBytesBinary(String s) {
             return Bytes.toBytesBinary(s);
         }
    +
    +    @Override
    +    public String toTransitUri(String tableName, String rowKey) {
    +        if (connection == null) {
    +            logger.warn("Connection has not been established, could not 
create a transit URI. Returning null.");
    +            return null;
    +        }
    +        final Configuration configuration = connection.getConfiguration();
    +        // Remove white spaces.
    +        final String zkQuorum = 
configuration.get(HBASE_CONF_ZK_QUORUM).replaceAll("\\s", "");
    +        return "hbase://" + zkQuorum + "/" + tableName + (rowKey != null 
&& !rowKey.isEmpty() ? "/" + rowKey : "");
    --- End diff --
    
    I don't think it does. I am not a HBase expert by any means, but I know 
that you can manually specify the IP address to the HBase master when 
configuring a Java client. This URL could also be problematic for people 
attempting a Thrift connection via Python or another client that side steps 
ZooKeeper.


> Improve HBase processors provenance transit URL
> -----------------------------------------------
>
>                 Key: NIFI-4543
>                 URL: https://issues.apache.org/jira/browse/NIFI-4543
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Koji Kawamura
>            Assignee: Koji Kawamura
>
> HBase related processors report NiFi provenance events with transit URLs in a 
> format as 'hbase://tablename/rowid'. However, the URL is not descriptive 
> enough if a NiFi interacts with multiple HBase clusters having the same table 
> names.
> HBase processors transit URL should include host information it operates 
> with, so that an URL can identify a HBase cluster.
> Target Processors:
> * FetchHBaseRow
> * GetHBase
> * PutHBaseCell
> * PutHBaseJSON
> * PutHBaseRecord



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to