The NMToken is used for authenticating communication with NodeManager
NodeManager
It is issued by ResourceMananger when ApplicationMaster negotiates resource with ResourceManager and validated on NodeManager side.
ResourceMananger
ApplicationMaster
ResourceManager
231232233234235236237
new NCName("_Atlanta.Braves"),true); } public void testNMToken() throws Exception { deserialize("<result xsi:type=\"xsd:NMTOKEN\">_A.B.C.1-2-3</result>", new NMToken("_A.B.C.1-2-3"),true); }
213214215216217218219
277278279280281282283
311312313314315316317
31323334353637383940414243
/** * Run a failure test. value should be invalid. */ private void runFailTest(String value) throws Exception { NMToken oToken = null; try { oToken = new NMToken(value); } catch (Exception e) { // catch the validation exception } assertNull( "NMToken validation restriction failed. did not restrict bad value [" +
46474849505152535455565758
/** * Run a successful test. value should be valid. */ private void runPassTest(String value) throws Exception { NMToken oToken = null; try { oToken = new NMToken(value); } catch (Exception e) { // catch the validation exception } assertEquals("NMToken strings not equal. orig value:" + value, oToken.toString(), value); }
295296297298299300301302303304
} assertTrue("binding is null", binding != null); // Test operation org.apache.axis.types.NMToken value = null; NMToken token = new NMToken(); token.setValue("eye_am_an_en_em_tokin"); value = binding.echoNMToken(token); assertEquals(token, value); }
427428429430431432433
return new NMTokens(Caster.toString(value)); } private static NMToken toNMToken(Object value) throws PageException { if(value instanceof NMToken) return (NMToken) value; return new NMToken(Caster.toString(value)); }
70717273747576777879808182
85868788899091929394959697