@Override public SubmitApplicationResponse run() { try { return client.submitApplication(req); } catch (YarnException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } PrivilegedAction<SubmitApplicationResponse> setClientReq(
@Override protected ApplicationHistoryProtocol getAHSProxy(Configuration conf) throws IOException { GetApplicationReportResponse resp = Mockito. mock(GetApplicationReportResponse.class); historyManager = Mockito.mock(ApplicationHistoryProtocol.class); try { Mockito.when(historyManager.getApplicationReport(Mockito .any(GetApplicationReportRequest.class))).thenReturn(resp); } catch (YarnException e) { // TODO Auto-generated catch block e.printStackTrace(); } return historyManager; } }
@Override protected ApplicationHistoryProtocol getAHSProxy(Configuration conf) throws IOException { GetApplicationReportResponse resp = Mockito. mock(GetApplicationReportResponse.class); historyManager = Mockito.mock(ApplicationHistoryProtocol.class); try { Mockito.when(historyManager.getApplicationReport(Mockito .any(GetApplicationReportRequest.class))).thenReturn(resp); } catch (YarnException e) { // TODO Auto-generated catch block e.printStackTrace(); } return historyManager; } }
e.printStackTrace(System.out); LOG.error("Heartbeat failed while dying: ", e);
e.printStackTrace(System.out); LOG.error("Heartbeat failed while dying: ", e);
e.printStackTrace(); return null;