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

    https://github.com/apache/nifi/pull/2523#discussion_r174826270
  
    --- 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 --
    
    Should we also be adding an attribute now for the Branch Name, if 
specified? While I realize that it's not explicitly necessary, since the 
version would disambiguate anything, it may make it more clear when looking at 
FlowFiles in a queue or looking at provenance data if we have that info.


---

Reply via email to