Map<String, Long> allocationTagsInfo = ni.getAllocationTagsWithCount(); if (allocationTagsInfo != null) { allocationTagsInfo.forEach((tag, count) ->
+ rmNodes[0].getAllocationTagsWithCount().get("mapper")); System.out.println("Mappers on HOST1: " + rmNodes[1].getAllocationTagsWithCount().get("mapper")); System.out.println("Mappers on HOST2: " + rmNodes[2].getAllocationTagsWithCount().get("mapper"));
Assert.assertTrue("server2 should not co-allocate to server1 as" + " they both need to use port 6000", rmNode.getAllocationTagsWithCount().get("port_6000") == 1); Assert.assertFalse(rmNode.getAllocationTagsWithCount() .containsKey("port_7000")); Assert.assertFalse(rmNode.getAllocationTagsWithCount() .containsKey("port_8000"));
Assert.assertTrue("If ws-inst is allocated to a node," + " this node should have inherited the ws-inst tag ", rmNode.getAllocationTagsWithCount().get("ws-inst") == 1); Assert.assertTrue("ws-inst should be co-allocated to " + "hbase-master nodes", rmNode.getAllocationTagsWithCount().get("hbase-master") == 1); Assert.assertNotNull(rmNode); Assert.assertTrue("Node has ws-servant allocated must have 3 instances", rmNode.getAllocationTagsWithCount().get("ws-servant") == 3); Assert.assertTrue("Every ws-servant container should be co-allocated" + " with ws-inst", rmNode.getAllocationTagsWithCount().get("ws-inst") == 1);
.getAllocationTagsWithCount().get("foo") == 2); } finally { rm.stop();