.targetNodeAttribute(scope, opCode, target); return placementConstraints;
TargetExpression target = PlacementTargets .nodeAttribute("rm.yarn.io/foo", "true"); expectedPc1 = targetNodeAttribute("node", NodeAttributeOpCode.EQ, target); target = PlacementTargets .nodeAttribute("rm.yarn.io/foo", "abc"); expectedPc1 = targetNodeAttribute("node", NodeAttributeOpCode.NE, target); target = PlacementTargets .nodeAttribute("rm.yarn.io/foo", "abc"); expectedPc1 = targetNodeAttribute("node", NodeAttributeOpCode.NE, target); target = PlacementTargets .nodeAttribute("rm.yarn.io/bar", "true"); expectedPc2 = targetNodeAttribute("node", NodeAttributeOpCode.EQ, target); Assert.assertEquals(1, result.size()); target = PlacementTargets.nodeAttribute("rm.yarn.io/foo", "true"); expectedPc1 = targetNodeAttribute("node", NodeAttributeOpCode.EQ, target);
PlacementConstraints.and( PlacementConstraints .targetNodeAttribute(PlacementConstraints.NODE, NodeAttributeOpCode.NE, PlacementConstraints.PlacementTargets .nodeAttribute("python", "3")), PlacementConstraints .targetNodeAttribute(PlacementConstraints.NODE, NodeAttributeOpCode.EQ, PlacementConstraints.PlacementTargets PlacementConstraints.or( PlacementConstraints .targetNodeAttribute(PlacementConstraints.NODE, NodeAttributeOpCode.NE, PlacementConstraints.PlacementTargets .nodeAttribute("python", "3")), PlacementConstraints .targetNodeAttribute(PlacementConstraints.NODE, NodeAttributeOpCode.EQ, PlacementConstraints.PlacementTargets
.allocationRequestId(10L).priority(Priority.newInstance(1)) .placementConstraintExpression(PlacementConstraints .targetNodeAttribute(PlacementConstraints.NODE, NodeAttributeOpCode.EQ, PlacementConstraints.PlacementTargets .allocationRequestId(10L).priority(Priority.newInstance(1)) .placementConstraintExpression(PlacementConstraints .targetNodeAttribute(PlacementConstraints.NODE, NodeAttributeOpCode.NE, PlacementConstraints.PlacementTargets