mirror of https://github.com/apache/nifi.git
NIFI-1279: Take the FlowFile's 1-up id into account for the newest and oldest flowfile prioritizers
Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
parent
1869b44682
commit
bd4f31a4c2
|
@ -31,7 +31,12 @@ public class NewestFlowFileFirstPrioritizer implements FlowFilePrioritizer {
|
|||
return 1;
|
||||
}
|
||||
|
||||
return Long.compare(o2.getLineageStartDate(), o1.getLineageStartDate());
|
||||
final int lineageDateCompare = Long.compare(o2.getLineageStartDate(), o1.getLineageStartDate());
|
||||
if (lineageDateCompare != 0) {
|
||||
return lineageDateCompare;
|
||||
}
|
||||
|
||||
return Long.compare(o2.getId(), o1.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,12 @@ public class OldestFlowFileFirstPrioritizer implements FlowFilePrioritizer {
|
|||
return 1;
|
||||
}
|
||||
|
||||
return Long.compare(o1.getLineageStartDate(), o2.getLineageStartDate());
|
||||
final int lineageDateCompare = Long.compare(o1.getLineageStartDate(), o2.getLineageStartDate());
|
||||
if (lineageDateCompare != 0) {
|
||||
return lineageDateCompare;
|
||||
}
|
||||
|
||||
return Long.compare(o1.getId(), o2.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue