You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ij...@apache.org on 2018/12/11 01:45:48 UTC

nifi git commit: NIFI-5875 Improve docs around the PriorityAttributePrioritizer

Repository: nifi
Updated Branches:
  refs/heads/master 1ac5b9314 -> 1a937b651


NIFI-5875 Improve docs around the PriorityAttributePrioritizer

Clear up the documentation around the PriorityAttributePrioritizer to make it clearer that if the attributes are both number the largest wins but if they are not numbers they sort the other way around.

I had to go and look at the code to work out what was going on after reading the existing documentation.

Simplify PriorityAttributePrioritzer docs

Simplify the main section of documentation for PriorityAttributePrioritzer and then add a notes section with more details about the ordering.

Fix example.

Put back comment setting the priority attribute

Further improvements to the Priority ordering

This closes #3205.

Signed-off-by: Koji Kawamura <ij...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/1a937b65
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/1a937b65
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/1a937b65

Branch: refs/heads/master
Commit: 1a937b65111173d77255984f9856bbc63f2c22f0
Parents: 1ac5b93
Author: Wil Selwood <ws...@gmail.com>
Authored: Thu Dec 6 10:17:19 2018 +0000
Committer: Koji Kawamura <ij...@apache.org>
Committed: Tue Dec 11 10:43:25 2018 +0900

----------------------------------------------------------------------
 nifi-docs/src/main/asciidoc/user-guide.adoc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/1a937b65/nifi-docs/src/main/asciidoc/user-guide.adoc
----------------------------------------------------------------------
diff --git a/nifi-docs/src/main/asciidoc/user-guide.adoc b/nifi-docs/src/main/asciidoc/user-guide.adoc
index 873b949..ba62327 100644
--- a/nifi-docs/src/main/asciidoc/user-guide.adoc
+++ b/nifi-docs/src/main/asciidoc/user-guide.adoc
@@ -1091,7 +1091,11 @@ The following prioritizers are available:
 - *FirstInFirstOutPrioritizer*: Given two FlowFiles, the one that reached the connection first will be processed first.
 - *NewestFlowFileFirstPrioritizer*: Given two FlowFiles, the one that is newest in the dataflow will be processed first.
 - *OldestFlowFileFirstPrioritizer*: Given two FlowFiles, the one that is oldest in the dataflow will be processed first. 'This is the default scheme that is used if no prioritizers are selected'.
-- *PriorityAttributePrioritizer*: Given two FlowFiles that both have a "priority" attribute, the one that has the highest priority value will be processed first. Note that an UpdateAttribute processor should be used to add the "priority" attribute to the FlowFiles before they reach a connection that has this prioritizer set. Values for the "priority" attribute may be alphanumeric, where "a" is a higher priority than "z", and "1" is a higher priority than "9", for example.
+- *PriorityAttributePrioritizer*: Given two FlowFiles, an attribute called “priority” will be extracted. The one that has the lowest priority value will be processed first.
+** Note that an UpdateAttribute processor should be used to add the "priority" attribute to the FlowFiles before they reach a connection that has this prioritizer set.
+** If only one has that attribute it will go first.
+** Values for the "priority" attribute can be alphanumeric, where "a" will come before "z" and "1" before "9"
+** If "priority" attribute cannot be parsed as a long, unicode string ordering will be used. For example: "99" and "100" will be ordered so the flowfile with "99" comes first, but "A-99" and "A-100" will sort so the flowfile with "A-100" comes first.
 
 NOTE: With a <<load_balance_strategy>> configured, the connection has a queue per node in addition to the local queue. The prioritizer will sort the data in each queue independently.