444445446447448449450451452453454
return ret; } catch (Exception e) { e.printStackTrace(); throw e; } finally { server.stop(); if (proxy != null) { RPC.stopProxy(proxy); } } }
495496497498499500501502503504505
8283848586878889909192
server.start(); } catch (YarnException e) { e.printStackTrace(); Assert.fail("Failed to crete server"); } finally { server.stop(); } } private void testPbClientFactory() {
113114115116117118119120121122123
} catch (YarnException e) { e.printStackTrace(); Assert.fail("Failed to crete server"); } finally { server.stop(); } } public class MRClientProtocolTestImpl implements MRClientProtocol {
102103104105106107108109110111112
proxy = (TaskUmbilicalProtocol) RPC.getProxy( TaskUmbilicalProtocol.class, TaskUmbilicalProtocol.versionID, addr, conf); proxy.ping(null, null); } finally { server.stop(); if (proxy != null) { RPC.stopProxy(proxy); } } return null;
470471472473474475476477478
LOG.info("Got the expected Exception: SocketTimeoutException"); } finally { if (proxy != null) { RPC.stopProxy(proxy); } server.stop(); } } }
177178179180181182183184185186187
Assert.assertEquals(PROXY_USER_NAME + " via " + REAL_USER_NAME, retVal); } catch (Exception e) { e.printStackTrace(); Assert.fail(); } finally { server.stop(); if (proxy != null) { RPC.stopProxy(proxy); } } }
219220221222223224225226227228229
265266267268269270271272273274275
Assert.fail("The RPC must have failed " + retVal); } catch (Exception e) { e.printStackTrace(); } finally { server.stop(); if (proxy != null) { RPC.stopProxy(proxy); } } }
304305306307308309310311312313314