You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/01 14:21:00 UTC

[jira] [Commented] (NIFI-5781) Incorrect schema for provenance events in SiteToSiteProvenanceReportingTask

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

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

GitHub user pvillard31 opened a pull request:

    https://github.com/apache/nifi/pull/3123

    NIFI-5781 - Incorrect schema for provenance events in SiteToSiteProve…

    …nanceReportingTask
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pvillard31/nifi NIFI-5781

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/3123.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3123
    
----
commit 15ba89ccae4c01cc5130869a5619dde9881dee16
Author: Pierre Villard <pi...@...>
Date:   2018-11-01T14:19:06Z

    NIFI-5781 - Incorrect schema for provenance events in SiteToSiteProvenanceReportingTask

----


> Incorrect schema for provenance events in SiteToSiteProvenanceReportingTask
> ---------------------------------------------------------------------------
>
>                 Key: NIFI-5781
>                 URL: https://issues.apache.org/jira/browse/NIFI-5781
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.7.0, 1.8.0, 1.7.1
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>            Priority: Major
>
> The current schema does not allow null values for "details", "remoteIdentifier" and "alternateIdentifier" fields.
> This will cause error looking like:
> {noformat}
> 2018-11-01 14:59:30,551 ERROR [Timer-Driven Process Thread-2] o.a.n.r.SiteToSiteProvenanceReportingTask SiteToSiteProvenanceReportingTask[id=0751c46f-0163-1000-7d33-f276e8654728] Error running task SiteToSiteProvenanceReportingTask[id=0751c46f-0163-1000-7d33-f276e8654728] due to org.apache.avro.file.DataFileWriter$AppendWriteException: java.lang.NullPointerException: null of string in field details of nifi.provenanceEvent{noformat}
> +*Workaround*+: specify a writer with a custom schema instead of inheriting record schema.
> {noformat}
> {
>   "namespace": "nifi",
>   "name": "provenanceEvent",
>   "type": "record",
>   "fields": [
>     { "name": "eventId", "type": "string" },
>     { "name": "eventOrdinal", "type": "long" },
>     { "name": "eventType", "type": "string" },
>     { "name": "timestampMillis", "type": "long" },
>     { "name": "durationMillis", "type": "long" },
>     { "name": "lineageStart", "type": { "type": "long", "logicalType": "timestamp-millis" } },
>     { "name": "details", "type": ["null", "string"] },
>     { "name": "componentId", "type": "string" },
>     { "name": "componentType", "type": "string" },
>     { "name": "componentName", "type": "string" },
>     { "name": "processGroupId", "type": "string" },
>     { "name": "processGroupName", "type": "string" },
>     { "name": "entityId", "type": "string" },
>     { "name": "entityType", "type": "string" },
>     { "name": "entitySize", "type": ["null", "long"] },
>     { "name": "previousEntitySize", "type": ["null", "long"] },
>     { "name": "updatedAttributes", "type": { "type": "map", "values": "string" } },
>     { "name": "previousAttributes", "type": { "type": "map", "values": "string" } },
>     { "name": "actorHostname", "type": "string" },
>     { "name": "contentURI", "type": "string" },
>     { "name": "previousContentURI", "type": "string" },
>     { "name": "parentIds", "type": { "type": "array", "items": "string" } },
>     { "name": "childIds", "type": { "type": "array", "items": "string" } },
>     { "name": "platform", "type": "string" },
>     { "name": "application", "type": "string" },
>     { "name": "remoteIdentifier", "type": ["null", "string"] },
>     { "name": "alternateIdentifier", "type": ["null", "string"] },
>     { "name": "transitUri", "type": ["null", "string"] }
>   ]
> }{noformat}



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