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

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

GitHub user markap14 opened a pull request:

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

    NIFI-3088: Ensure that on recovery of FlowFile Repository, if we find…

    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.
    
    … a FlowFile that maps to an unknown queue that we log a warning that the 
queue is missing and drop the FlowFile, rather than throwing an NPE

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

    $ git pull https://github.com/markap14/nifi NIFI-3088

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

    https://github.com/apache/nifi/pull/1266.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 #1266
    
----
commit 8bb1b853ed24116507c84f554b8756a4568c8479
Author: Mark Payne <[email protected]>
Date:   2016-11-23T15:33:06Z

    NIFI-3088: Ensure that on recovery of FlowFile Repository, if we find a 
FlowFile that maps to an unknown queue that we log a warning that the queue is 
missing and drop the FlowFile, rather than throwing an NPE

----


> NPE occurs on start-up if there are orphaned FlowFiles
> ------------------------------------------------------
>
>                 Key: NIFI-3088
>                 URL: https://issues.apache.org/jira/browse/NIFI-3088
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Joseph Percivall
>            Priority: Blocker
>             Fix For: 1.1.0
>
>
> The repo serialization was re-done in this commit: 
> https://github.com/apache/nifi/commit/1be08714731f01347ac1f98e18047fe7d9ab8afd
> It causes the following exception on start-up if there are orphaned FlowFiles 
> (FlowFiles that are associated with a queue id that no longer exists in the 
> Flow).
> org.apache.nifi.web.NiFiCoreException: Unable to start Flow Controller.
>         at 
> org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:85)
>  ~[na:na]
>         at 
> org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:837)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:533)
>  ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:810)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:345)
>  ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1404) 
> ~[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1366) 
> ~[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
>  ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520) 
> ~[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:231)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at org.eclipse.jetty.server.Server.start(Server.java:411) 
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at org.eclipse.jetty.server.Server.doStart(Server.java:378) 
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:675) 
> ~[nifi-jetty-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.NiFi.<init>(NiFi.java:156) 
> [nifi-runtime-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.NiFi.main(NiFi.java:262) 
> [nifi-runtime-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
> Caused by: java.io.IOException: Failed to write field 'Repository Record 
> Update'
>         at 
> org.apache.nifi.repository.schema.SchemaRecordWriter.writeRecordFields(SchemaRecordWriter.java:46)
>  ~[nifi-schema-utils-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.repository.schema.SchemaRecordWriter.writeRecord(SchemaRecordWriter.java:35)
>  ~[nifi-schema-utils-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.controller.repository.SchemaRepositoryRecordSerde.serializeRecord(SchemaRepositoryRecordSerde.java:92)
>  ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.controller.repository.SchemaRepositoryRecordSerde.serializeRecord(SchemaRepositoryRecordSerde.java:44)
>  ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.wali.MinimalLockingWriteAheadLog.checkpoint(MinimalLockingWriteAheadLog.java:583)
>  ~[nifi-write-ahead-log-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.wali.MinimalLockingWriteAheadLog.recoverRecords(MinimalLockingWriteAheadLog.java:319)
>  ~[nifi-write-ahead-log-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.controller.repository.WriteAheadFlowFileRepository.loadFlowFiles(WriteAheadFlowFileRepository.java:346)
>  ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.controller.FlowController.initializeFlow(FlowController.java:700)
>  ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:701)
>  ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:508)
>  ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:69)
>  ~[na:na]
>         ... 28 common frames omitted
> Caused by: java.lang.NullPointerException: null
>         at 
> org.apache.nifi.controller.repository.schema.RepositoryRecordFieldMap.getFieldValue(RepositoryRecordFieldMap.java:68)
>  ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.repository.schema.Record.getFieldValue(Record.java:27) 
> ~[nifi-schema-utils-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.repository.schema.SchemaRecordWriter.writeRecordFields(SchemaRecordWriter.java:41)
>  ~[nifi-schema-utils-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.repository.schema.SchemaRecordWriter.writeFieldValue(SchemaRecordWriter.java:131)
>  ~[nifi-schema-utils-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.repository.schema.SchemaRecordWriter.writeFieldRepetitionAndValue(SchemaRecordWriter.java:57)
>  ~[nifi-schema-utils-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at 
> org.apache.nifi.repository.schema.SchemaRecordWriter.writeRecordFields(SchemaRecordWriter.java:44)
>  ~[nifi-schema-utils-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         ... 38 common frames omitted



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to