String rmLink = appReport.getTrackingUrl(); URL url = new URL(rmLink); hostRpt.rmHost = url.getHost();
this.slotsPerTaskManager = slotsPerTaskManager; this.appId = appReport.getApplicationId(); this.trackingURL = appReport.getTrackingUrl(); this.newlyCreatedCluster = newlyCreatedCluster;
public void display(boolean verbose, boolean isNew) { YarnApplicationState state = report.getYarnApplicationState(); if (verbose || !isNew) { System.out.println("Application State: " + state.toString()); System.out.println("Host: " + report.getHost()); } if (verbose || !isNew) { System.out.println("Queue: " + report.getQueue()); System.out.println("User: " + report.getUser()); long startTime = report.getStartTime(); System.out.println("Start Time: " + DoYUtil.toIsoTime(startTime)); System.out.println("Application Name: " + report.getName()); } System.out.println("Tracking URL: " + report.getTrackingUrl()); if (isNew) { System.out.println("Application Master URL: " + getAmUrl()); } showFinalStatus(); }
+ ", yarnAppState=" + report.getYarnApplicationState().toString() + ", distributedFinalState=" + report.getFinalApplicationStatus().toString() + ", appTrackingUrl=" + report.getTrackingUrl() + ", appUser=" + report.getUser());
private boolean waitCompleted() throws IOException, YarnException { ApplicationReport applicationReport = getApplicationReport(applicationId, yarnClient); LOG.info("The url to track the job: " + applicationReport.getTrackingUrl()); while (true) { assert (applicationReport != null);
ApplicationReport applicationReport = this.yarnClient.getApplicationReport(applicationId); LOGGER.info("Application Name: " + applicationReport.getName()); LOGGER.info("Application Tracking URL: " + applicationReport.getTrackingUrl()); LOGGER.info("Application User: " + applicationReport.getUser() + " Queue: " + applicationReport.getQueue());
+ ", yarnAppState=" + report.getYarnApplicationState().toString() + ", distributedFinalState=" + report.getFinalApplicationStatus().toString() + ", appTrackingUrl=" + report.getTrackingUrl() + ", appUser=" + report.getUser());
@Override public synchronized String getSchedulingInfo() { return report.getTrackingUrl(); }
@Override public synchronized String getTrackingUrl() { return report.getTrackingUrl(); }
@Override public String getTrackingUrl() { return report.getTrackingUrl(); }
@Override public String getTrackingUrl() { return "http://" + report.getTrackingUrl(); }
@Override public String getTrackingUrl() { return report.getTrackingUrl(); }
static InstanceInfo extractInstanceInfo(String clusterName, ApplicationReport report) { InstanceMetadata md = getMetadata(report.getApplicationTags()); if (md == null) { return null; } ApplicationResourceUsageReport usage = report.getApplicationResourceUsageReport(); InstanceStatus stat = new InstanceStatus() .allocatedVCores((long) usage.getUsedResources().getVirtualCores()) .allocatedMB((long) usage.getUsedResources().getMemory()) .clusterId(clusterName) .applicationId(report.getApplicationId().toString()) .startedTime(report.getStartTime()) .runningContainers((long) usage.getNumUsedContainers()) .trackingUrl(report.getTrackingUrl()) .state(InstanceStatus.StateEnum.fromValue(report.getYarnApplicationState().toString())); return new InstanceInfo(clusterName, report.getApplicationId(), md, stat); } }
private void logTrackingAndRMUrls(ApplicationReport report) { LOG.info("URL to track running application (will proxy to TensorBoard once it has started): " + report.getTrackingUrl()); LOG.info("ResourceManager web address for application: " + Utils.buildRMUrl(yarnConf, report.getApplicationId().toString())); }
@Override public void execute(String[] args, ConsoleReader reader) throws Exception { currentApp = getApplication(args[1]); if (currentApp == null) { throw new CliException("Streaming application with id " + args[1] + " is not found."); } LOG.debug("Selected {} with tracking url {}", currentApp.getApplicationId(), currentApp.getTrackingUrl()); getResource(StramWebServices.PATH_INFO, currentApp); if (consolePresent) { System.out.println("Connected to application " + currentApp.getApplicationId()); } }
@Override public boolean exitLoop(ApplicationReport report) { LOG.info("Got application report from ASM for, appId={}, clientToken={}, appDiagnostics={}, appMasterHost={}," + "appQueue={}, appMasterRpcPort={}, appStartTime={}, yarnAppState={}, distributedFinalState={}, " + "appTrackingUrl={}, appUser={}", appId.getId(), report.getClientToAMToken(), report.getDiagnostics(), report.getHost(), report.getQueue(), report.getRpcPort(), report.getStartTime(), report.getYarnApplicationState(), report.getFinalApplicationStatus(), report.getTrackingUrl(), report.getUser()); return false; }
@Test public void testGetAppReport() throws IOException { RMApp app = createNewTestApp(null); assertAppState(RMAppState.NEW, app); ApplicationReport report = app.createAndGetApplicationReport(null, true); Assert.assertNotNull(report.getApplicationResourceUsageReport()); Assert.assertEquals(report.getApplicationResourceUsageReport(),RMServerUtils.DUMMY_APPLICATION_RESOURCE_USAGE_REPORT); report = app.createAndGetApplicationReport("clientuser", true); Assert.assertNotNull(report.getApplicationResourceUsageReport()); Assert.assertTrue("bad proxy url for app", report.getTrackingUrl().endsWith("/proxy/" + app.getApplicationId() + "/")); }
@Test public void testGetAppReport() { RMApp app = createNewTestApp(null); assertAppState(RMAppState.NEW, app); ApplicationReport report = app.createAndGetApplicationReport(null, true); Assert.assertNotNull(report.getApplicationResourceUsageReport()); Assert.assertEquals(report.getApplicationResourceUsageReport(),RMServerUtils.DUMMY_APPLICATION_RESOURCE_USAGE_REPORT); report = app.createAndGetApplicationReport("clientuser", true); Assert.assertNotNull(report.getApplicationResourceUsageReport()); Assert.assertTrue("bad proxy url for app", report.getTrackingUrl().endsWith("/proxy/" + app.getApplicationId() + "/")); }
@Override public GetJobReportResponse getJobReport(GetJobReportRequest request) throws IOException { JobReport jobReport = recordFactory.newRecordInstance(JobReport.class); jobReport.setJobId(request.getJobId()); jobReport.setJobState(jobState); jobReport.setUser(applicationReport.getUser()); jobReport.setStartTime(applicationReport.getStartTime()); jobReport.setDiagnostics(applicationReport.getDiagnostics()); jobReport.setJobName(applicationReport.getName()); jobReport.setTrackingUrl(applicationReport.getTrackingUrl()); jobReport.setFinishTime(applicationReport.getFinishTime()); GetJobReportResponse resp = recordFactory.newRecordInstance(GetJobReportResponse.class); resp.setJobReport(jobReport); return resp; }
@Override public GetJobReportResponse getJobReport(GetJobReportRequest request) throws IOException { JobReport jobReport = recordFactory.newRecordInstance(JobReport.class); jobReport.setJobId(request.getJobId()); jobReport.setJobState(jobState); jobReport.setUser(applicationReport.getUser()); jobReport.setStartTime(applicationReport.getStartTime()); jobReport.setDiagnostics(applicationReport.getDiagnostics()); jobReport.setJobName(applicationReport.getName()); jobReport.setTrackingUrl(applicationReport.getTrackingUrl()); jobReport.setFinishTime(applicationReport.getFinishTime()); GetJobReportResponse resp = recordFactory.newRecordInstance(GetJobReportResponse.class); resp.setJobReport(jobReport); return resp; }