mirror of
https://github.com/apache/nifi.git
synced 2025-02-06 18:18:27 +00:00
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…
x
Reference in New Issue
Block a user