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

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

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

    https://github.com/apache/nifi/pull/2523#discussion_r174895925
  
    --- Diff: 
nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-standard-record-utils/src/main/java/org/apache/nifi/schema/access/HortonworksAttributeSchemaReferenceWriter.java
 ---
    @@ -40,8 +40,8 @@ public void writeHeader(RecordSchema schema, OutputStream 
out) throws IOExceptio
             final Map<String, String> attributes = new HashMap<>(4);
             final SchemaIdentifier id = schema.getIdentifier();
     
    -        final long schemaId = id.getIdentifier().getAsLong();
    -        final int schemaVersion = id.getVersion().getAsInt();
    +        final Long schemaId = id.getIdentifier().getAsLong();
    +        final Integer schemaVersion = id.getVersion().getAsInt();
     
             
attributes.put(HortonworksAttributeSchemaReferenceStrategy.SCHEMA_ID_ATTRIBUTE, 
String.valueOf(schemaId));
             
attributes.put(HortonworksAttributeSchemaReferenceStrategy.SCHEMA_VERSION_ATTRIBUTE,
 String.valueOf(schemaVersion));
    --- End diff --
    
    We can do that... one unfortunate thing though is that we will only have 
the branch name if we also did the lookup with the branch name. If you do the 
lookup by id+version then nothing I can see on the client API tells you the 
branch name (i.e. SchemaVersionInfo does not have getBranchName())


> Support Schema Branches when using HWX Schema Registry
> ------------------------------------------------------
>
>                 Key: NIFI-4935
>                 URL: https://issues.apache.org/jira/browse/NIFI-4935
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Minor
>
> The latest version of Hortonworks Schema Registry now supports a 
> forking/branching concept. This means that when retrieving a schema by name, 
> it may be desirable to also specify a branch name, as the default would 
> retrieve from the "master" branch. We'll need to pass down an optional branch 
> name to the SchemaRegistry implementations.



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

Reply via email to