Thanks Miklos Szegedi for the patch. One question, if a node without any preemption reservation release some resources smaller than preemption resource request, scheduler still does the normal reservation?
I was wondering would be easier and cleaner if we put resourcesPreemptedForApp, appIdToAppMap and totalResourcesPreempted into one single class? That case, we may get rid of appIdToAppMap and totalResourcesPreempted as well, and handle lock nicely.
- Need to expand this line import static org.junit.Assert.*;
- Extra space on this line return resourcesPreemptedForApp.containsKey(app);
- Comment "Reserve only, if not reserved for preempted resources," seems confusing to me, can you rewrite this comment block?