Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-6956

PutHive3Streaming improperly handles permissions error by reporting NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.11.0
    • Extensions
    • None

    Description

      In the PutHive3Streaming processor, there is an exception handler that assumes that any connection errors have already been handled, and thus assumes there are connection statistics to add as attributes to the flow file being routed to failure.

      However there are some errors such as filesystem permissions errors (if the user is not allowed to write into the Hive warehouse) that are not previously caught, yet the connection has not been created. This causes a NullPointerException when the connection statistics (records written) are added as attribute(s), which causes a rollback instead of routing the flow file to failure.

      A null check should be added to skip the setting of the attribute if no connection is available, thus allowing the flow file to be correctly routed to failure

      Attachments

        Issue Links

          Activity

            People

              mattyb149 Matt Burgess
              mattyb149 Matt Burgess
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m