@Private @VisibleForTesting public ApplicationId getAppId() { if (tezClientInternal == null) { LOG.warn("TezClient is not initialized, return null for AppId"); return null; } return tezClientInternal.getAppMasterApplicationId(); } }
System.err.println(timeStamp + " Shutting down Tez session " + ", sessionName=" + session.getClientName() + ", applicationId=" + session.getAppMasterApplicationId()); session.stop(); sessionToRemove = sessionInfo;
+ " Tez session is already shutdown " + session + ", sessionName=" + session.getClientName() + ", applicationId=" + session.getAppMasterApplicationId()); continue; + ", applicationId=" + session.getAppMasterApplicationId()); session.stop(); } catch (Exception 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; }
log.info("Submitting DAG " + dag.getName()); dagClient = tezClient.submitDAG(dag); appId = tezClient.getAppMasterApplicationId(); log.info("Submitted DAG " + dag.getName() + ". Application id: " + appId); } catch (Exception e) { if (tezClient != null) { log.error("Cannot submit DAG - Application id: " + tezClient.getAppMasterApplicationId(), e); } else { log.error("Cannot submit DAG", e);
null, instance.credentials); tezSession.start(); if (tezSession.getAppMasterApplicationId() != null) { TezUtilsInternal.setHadoopCallerContext(hadoopShim, tezSession.getAppMasterApplicationId()); maxDataLengthThroughIPC,exceedDataLimit); String callerType = "TestOrderedWordCount"; String callerId = tezSession.getAppMasterApplicationId() == null ? ( "UnknownApp_" + System.currentTimeMillis() + dagIndex ) : ( tezSession.getAppMasterApplicationId().toString() + "_" + dagIndex); dag.setCallerContext(CallerContext.create("Tez", callerId, callerType, "TestOrderedWordCount Job"));
ApplicationId appId = tezClientInternal.getAppMasterApplicationId(); if (hadoopShim == null) { Configuration conf = (getConf() == null ? new Configuration(false) : getConf());
protected void internalNonBlockingStart() throws IOException { try { if( !isTimelineServiceEnabled( jobConfiguration ) ) flowStep.logWarn( "'" + YarnConfiguration.TIMELINE_SERVICE_ENABLED + "' is disabled, please enable to capture detailed metrics of completed flows, this may require starting the YARN timeline server daemon" ); TezConfiguration workingConf = new TezConfiguration( jobConfiguration ); // this could be problematic flowStep.logInfo( "tez session mode enabled: " + workingConf.getBoolean( TezConfiguration.TEZ_AM_SESSION_MODE, TezConfiguration.TEZ_AM_SESSION_MODE_DEFAULT ) ); prepareEnsureStagingDir( workingConf ); tezClient = TezClient.create( flowStep.getName(), workingConf, ( (Hadoop2TezFlowStep) flowStep ).getAllLocalResources(), null ); tezClient.start(); dagClient = tezClient.submitDAG( dag ); dagId = Util.returnInstanceFieldIfExistsSafe( dagClient, "dagId" ); flowStep.logInfo( "submitted tez dag to app master: {}, with dag id: {}", tezClient.getAppMasterApplicationId(), dagId ); } catch( TezException exception ) { this.throwable = exception; throw new CascadingException( exception ); } }
protected void internalNonBlockingStart() throws IOException { try { if( !isTimelineServiceEnabled( jobConfiguration ) ) flowStep.logWarn( "'" + YarnConfiguration.TIMELINE_SERVICE_ENABLED + "' is disabled, please enable to capture detailed metrics of completed flows, this may require starting the YARN timeline server daemon" ); TezConfiguration workingConf = new TezConfiguration( jobConfiguration ); // this could be problematic flowStep.logInfo( "tez session mode enabled: " + workingConf.getBoolean( TezConfiguration.TEZ_AM_SESSION_MODE, TezConfiguration.TEZ_AM_SESSION_MODE_DEFAULT ) ); prepareEnsureStagingDir( workingConf ); tezClient = TezClient.create( flowStep.getName(), workingConf, ( (Hadoop2TezFlowStep) flowStep ).getAllLocalResources(), null ); tezClient.start(); dagClient = tezClient.submitDAG( dag ); dagId = Util.returnInstanceFieldIfExistsSafe( dagClient, "dagId" ); flowStep.logInfo( "submitted tez dag to app master: {}, with dag id: {}", tezClient.getAppMasterApplicationId(), dagId ); } catch( TezException exception ) { this.throwable = exception; throw new CascadingException( exception ); } }