Uploaded image for project: 'Apache NiFi MiNiFi C++'
  1. Apache NiFi MiNiFi C++
  2. MINIFICPP-1697

Give a better error message on unsupported algorithms in HashContent

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.14.0

    Description

      If you specify an unsupported hash algorithm in the Hash Algorithm property of the HashContent processor, it will fail with an error like this in onTrigger:

      [2021-12-07 10:48:56.508] [org::apache::nifi::minifi::core::Processor] [warning] Caught "map::at" (St12out_of_range) during Processor::onTrigger of processor: 345ddcb9-a73b-4d4e-8c3d-66ed162d60fc (HashContent)
      [2021-12-07 10:48:56.508] [org::apache::nifi::minifi::core::ProcessSession] [info] Penalizing c1565920-5742-11ec-bc73-5c879c2c3c60 for 30000ms at HashContent
      [2021-12-07 10:48:56.508] [org::apache::nifi::minifi::core::ProcessSession] [warning] ProcessSession rollback for HashContent executed
      

      It would be better to check the value in onSchedule, and if it is not supported, then log a better error message like "algorithm X is not supported; supported algorithms are: ..." and throw an exception, ie. fail to schedule the processor.

      Attachments

        Activity

          People

            MZink Martin Zink
            fgerlits Ferenc Gerlits
            Votes:
            0 Vote for this issue
            Watchers:
            0 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