ApplicationReport getAppReport() throws IOException, TezException, ApplicationNotFoundException { FrameworkClient client = null; try { ApplicationReport appReport = null; if (!frameworkClient.isRunning()) { client = FrameworkClient.createFrameworkClient(conf); appReport = client.getApplicationReport(appId); } else { appReport = frameworkClient.getApplicationReport(appId); } if (LOG.isDebugEnabled()) { LOG.debug("App: " + appId + " in state: " + appReport.getYarnApplicationState()); } return appReport; } catch (ApplicationNotFoundException e) { throw e; } catch (YarnException e) { throw new TezException(e); } finally { if (client != null) { client.stop(); } } }
@Override protected ApplicationReport getApplicationReportInternal() { ApplicationReport appReport = null; try { appReport = frameworkClient.getApplicationReport(appId); } catch (YarnException e) { } catch (IOException e) { } return appReport; }
frameworkClient.init(amConfig.getTezConfiguration(), amConfig.getYarnConfiguration()); frameworkClient.start(); appContext.setMaxAppAttempts(1); frameworkClient.submitApplication(appContext); ApplicationReport appReport = frameworkClient.getApplicationReport(sessionAppId); LOG.info("The url to track the Tez Session: " + appReport.getTrackingUrl()); sessionStarted.set(true);
TezConfiguration.TEZ_CLIENT_HARD_KILL_TIMEOUT_MS_DEFAULT); ApplicationReport appReport = frameworkClient .getApplicationReport(sessionAppId); while ((currentTimeMillis < timeKillIssued + killTimeOut) && !isJobInTerminalState(appReport.getYarnApplicationState())) { appReport = frameworkClient.getApplicationReport(sessionAppId); frameworkClient.killApplication(sessionAppId); + ", applicationId=" + sessionAppId); try { frameworkClient.killApplication(sessionAppId); } catch (ApplicationNotFoundException e) { LOG.info("Failed to kill nonexistent application " + sessionAppId, e); frameworkClient.close();
+ callerContextStr); frameworkClient.submitApplication(appContext); ApplicationReport appReport = frameworkClient.getApplicationReport(appId); LOG.info("The url to track the Tez AM: " + appReport.getTrackingUrl()); lastSubmittedAppId = appId;
this.frameworkClient = frameworkClient; } else { this.frameworkClient = FrameworkClient.createFrameworkClient(conf); this.frameworkClient.init(conf, yarnConf); this.frameworkClient.start(); cleanupFrameworkClient = true;
@Override public void close() throws IOException { realClient.close(); if (frameworkClient != null && cleanupFrameworkClient) { frameworkClient.stop(); } }
@VisibleForTesting // for testing @Private protected FrameworkClient createFrameworkClient() { return FrameworkClient.createFrameworkClient(amConfig.getTezConfiguration()); }
private ApplicationId createApplication() throws TezException, IOException { try { return frameworkClient.createApplication(). getNewApplicationResponse().getApplicationId(); } catch (YarnException e) { throw new TezException(e); } }
public static String getTrackingURL( TezClient tezClient, DAGClient dagClient ) { if( tezClient == null || dagClient == null ) return null; try { ApplicationId applicationId = tezClient.getAppMasterApplicationId(); FrameworkClient frameworkClient = getFrameworkClient( dagClient ); if( frameworkClient == null ) { LOG.info( "unable to get framework client" ); return null; } ApplicationReport report = frameworkClient.getApplicationReport( applicationId ); if( report != null ) return report.getTrackingUrl(); } catch( YarnException | IOException exception ) { LOG.info( "unable to get tracking url" ); LOG.debug( "exception retrieving application report", exception ); } return null; }
public static String getTrackingURL( TezClient tezClient, DAGClient dagClient ) { if( tezClient == null || dagClient == null ) return null; try { ApplicationId applicationId = tezClient.getAppMasterApplicationId(); FrameworkClient frameworkClient = getFrameworkClient( dagClient ); if( frameworkClient == null ) { LOG.info( "unable to get framework client" ); return null; } ApplicationReport report = frameworkClient.getApplicationReport( applicationId ); if( report != null ) return report.getTrackingUrl(); } catch( YarnException | IOException exception ) { LOG.info( "unable to get tracking url" ); LOG.debug( "exception retrieving application report", exception ); } return null; }
ApplicationReport appReport = frameworkClient.getApplicationReport( appId); switch (appReport.getYarnApplicationState()) {
appReport = frameworkClient.getApplicationReport(appId); } catch (ApplicationNotFoundException e) { LOG.info("DAG is no longer running - application not found by YARN", e); try { Thread.sleep(100); appReport = frameworkClient.getApplicationReport(appId); } catch (YarnException e) { throw new TezException(e);
ApplicationReport appReport; try { appReport = yarnClient.getApplicationReport( applicationId);