Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
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.