am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(1000, Resource.newInstance(1024, 1)), Priority.newInstance(1), 1L, ImmutableSet.of("mapper"), "mapper");
am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(10, Resource.newInstance(1024, 1)), Priority.newInstance(1), 1L, ImmutableSet.of("mapper"), "mapper"); am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(10, Resource.newInstance(2048, 1)), Priority.newInstance(2), 1L, ImmutableSet.of("reducer"), "reducer"); am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(10, Resource.newInstance(2048, 1)), Priority.newInstance(3), 1L, ImmutableSet.of("reducer2"), "mapper");
am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(2, Resource.newInstance(1024, 1)), Priority.newInstance(1), 1L, ImmutableSet.of("tag_1_1", "tag_1_2"), am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(1, Resource.newInstance(1024, 1)), Priority.newInstance(2), 1L, ImmutableSet.of("tag_2_1", "tag_2_2"), am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(1, Resource.newInstance(1024, 1)), Priority.newInstance(3), 1L, ImmutableSet.of("tag_3"),
try { am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(2, Resource.newInstance(1024, 1)), Priority.newInstance(1), 1L, ImmutableSet.of("tag_1_1", "tag_1_2"),
am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(3, Resource.newInstance(1024, 1)), Priority.newInstance(1), 1L, ImmutableSet.of("mapper"), "mapper");
MockAM am2 = MockRM.launchAndRegisterAM(app2, rm, nm2); am1.allocateIntraAppAntiAffinity("x", ResourceSizing.newInstance(8, Resource.newInstance(1 * GB, 1)), Priority.newInstance(1), 0, "mapper", "reducer"); am2.allocateIntraAppAntiAffinity("x", ResourceSizing.newInstance(8, Resource.newInstance(1 * GB, 1)), Priority.newInstance(1), 0, "mapper", "reducer"); am1.allocateIntraAppAntiAffinity("x", ResourceSizing.newInstance(6, Resource.newInstance(1 * GB, 1)), Priority.newInstance(2), 0, "mapper", "reducer"); am1.allocateIntraAppAntiAffinity("x", ResourceSizing.newInstance(4, Resource.newInstance(1 * GB, 1)), Priority.newInstance(1), 0, "mapper", "reducer");
MockAM am2 = MockRM.launchAndRegisterAM(app2, rm, nm2); am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(8, Resource.newInstance(1 * GB, 1)), Priority.newInstance(1), 0, ImmutableSet.of("mapper", "reducer"), am1.allocateIntraAppAntiAffinity( ResourceSizing.newInstance(4, Resource.newInstance(1 * GB, 1)), Priority.newInstance(1), 0, ImmutableSet.of("mapper", "reducer"),