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(); }
+ ", appDiagnostics=" + report.getDiagnostics() + ", appMasterHost=" + report.getHost() + ", appQueue=" + report.getQueue() + ", appMasterRpcPort=" + report.getRpcPort() + ", appStartTime=" + report.getStartTime()
LOGGER.info("Application Name: " + applicationReport.getName()); LOGGER.info("Application Tracking URL: " + applicationReport.getTrackingUrl()); LOGGER.info("Application User: " + applicationReport.getUser() + " Queue: " + applicationReport.getQueue());
+ ", appDiagnostics=" + report.getDiagnostics() + ", appMasterHost=" + report.getHost() + ", appQueue=" + report.getQueue() + ", appMasterRpcPort=" + report.getRpcPort() + ", appStartTime=" + report.getStartTime()
@Override public String getQueue() { return report.getQueue(); }
@Override public String getQueue() { return report.getQueue(); }
@Override public synchronized String getQueue() { return report.getQueue(); }
@Override public String getQueue() { return report.getQueue(); }
@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; }
.addValue(2, a.getUser()) .addValue(3, a.getName()) .addValue(4, a.getQueue()) .addValue(5, DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format( new Date(a.getStartTime())))
public AppInfo(ApplicationReport app) { appId = app.getApplicationId().toString(); if (app.getCurrentApplicationAttemptId() != null) { currentAppAttemptId = app.getCurrentApplicationAttemptId().toString(); } user = app.getUser(); queue = app.getQueue(); name = app.getName(); type = app.getApplicationType(); host = app.getHost(); rpcPort = app.getRpcPort(); appState = app.getYarnApplicationState(); diagnosticsInfo = app.getDiagnostics(); trackingUrl = app.getTrackingUrl(); originalTrackingUrl = app.getOriginalTrackingUrl(); submittedTime = app.getStartTime(); startedTime = app.getStartTime(); finishedTime = app.getFinishTime(); elapsedTime = Times.elapsed(startedTime, finishedTime); finalAppStatus = app.getFinalApplicationStatus(); progress = app.getProgress() * 100; // in percent if (app.getApplicationTags() != null && !app.getApplicationTags().isEmpty()) { this.applicationTags = CSV_JOINER.join(app.getApplicationTags()); } }
public AppInfo(ApplicationReport app) { appId = app.getApplicationId().toString(); if (app.getCurrentApplicationAttemptId() != null) { currentAppAttemptId = app.getCurrentApplicationAttemptId().toString(); } user = app.getUser(); queue = app.getQueue(); name = app.getName(); type = app.getApplicationType(); host = app.getHost(); rpcPort = app.getRpcPort(); appState = app.getYarnApplicationState(); diagnosticsInfo = app.getDiagnostics(); trackingUrl = app.getTrackingUrl(); originalTrackingUrl = app.getOriginalTrackingUrl(); submittedTime = app.getStartTime(); startedTime = app.getStartTime(); finishedTime = app.getFinishTime(); elapsedTime = Times.elapsed(startedTime, finishedTime); finalAppStatus = app.getFinalApplicationStatus(); progress = app.getProgress() * 100; // in percent if (app.getApplicationTags() != null && !app.getApplicationTags().isEmpty()) { this.applicationTags = CSV_JOINER.join(app.getApplicationTags()); } }
public SerializedApplicationReport(ApplicationReport report) { this.applicationId = report.getApplicationId().toString(); ApplicationAttemptId attemptId = report.getCurrentApplicationAttemptId(); this.applicationAttemptId = attemptId != null ? attemptId.toString() : "N/A"; this.name = report.getName(); this.applicationType = report.getApplicationType(); this.user = report.getUser(); this.queue = report.getQueue(); this.host = report.getHost(); this.rpcPort = report.getRpcPort(); this.state = report.getYarnApplicationState().toString(); this.diagnostics = report.getDiagnostics(); this.startTime = report.getStartTime(); this.finishTime = report.getFinishTime(); FinalApplicationStatus appStatus = report.getFinalApplicationStatus(); this.finalStatus = appStatus == null ? "" : appStatus.toString(); this.progress = report.getProgress(); this.url = report.getTrackingUrl(); this.origTrackingUrl= report.getOriginalTrackingUrl(); }
public SerializedApplicationReport(ApplicationReport report) { this.applicationId = report.getApplicationId().toString(); ApplicationAttemptId attemptId = report.getCurrentApplicationAttemptId(); this.applicationAttemptId = attemptId != null ? attemptId.toString() : "N/A"; this.name = report.getName(); this.applicationType = report.getApplicationType(); this.user = report.getUser(); this.queue = report.getQueue(); this.host = report.getHost(); this.rpcPort = report.getRpcPort(); this.state = report.getYarnApplicationState().toString(); this.diagnostics = report.getDiagnostics(); this.startTime = report.getStartTime(); this.finishTime = report.getFinishTime(); FinalApplicationStatus appStatus = report.getFinalApplicationStatus(); this.finalStatus = appStatus == null ? "" : appStatus.toString(); this.progress = report.getProgress(); this.url = report.getTrackingUrl(); this.origTrackingUrl= report.getOriginalTrackingUrl(); }
@Test public void testApplicationReport() throws IOException, YarnException { ApplicationId appId = null; appId = ApplicationId.newInstance(0, 1); GetApplicationReportRequest request = GetApplicationReportRequest.newInstance(appId); GetApplicationReportResponse response = clientService.getApplicationReport(request); ApplicationReport appReport = response.getApplicationReport(); Assert.assertNotNull(appReport); Assert.assertEquals(123, appReport.getApplicationResourceUsageReport() .getMemorySeconds()); Assert.assertEquals(345, appReport.getApplicationResourceUsageReport() .getVcoreSeconds()); Assert.assertEquals("application_0_0001", appReport.getApplicationId() .toString()); Assert.assertEquals("test app type", appReport.getApplicationType().toString()); Assert.assertEquals("test queue", appReport.getQueue().toString()); }
@Test public void testApplicationReport() throws IOException, YarnException { ApplicationId appId = null; appId = ApplicationId.newInstance(0, 1); writeApplicationStartData(appId); writeApplicationFinishData(appId); ApplicationAttemptId appAttemptId = ApplicationAttemptId.newInstance(appId, 1); writeApplicationAttemptStartData(appAttemptId); writeApplicationAttemptFinishData(appAttemptId); ApplicationReport appReport = applicationHistoryManagerImpl.getApplication(appId); Assert.assertNotNull(appReport); Assert.assertEquals(appId, appReport.getApplicationId()); Assert.assertEquals(appAttemptId, appReport.getCurrentApplicationAttemptId()); Assert.assertEquals(appAttemptId.toString(), appReport.getHost()); Assert.assertEquals("test type", appReport.getApplicationType().toString()); Assert.assertEquals("test queue", appReport.getQueue().toString()); } }
public void testSubmitLauncherConfigurationOverridesLauncherMapperProperties() throws Exception { final String actionXml = "<java>" + "<job-tracker>" + getJobTrackerUri() + "</job-tracker>" + "<name-node>" + getNameNodeUri() + "</name-node>" + "<configuration>" + " <property><name>oozie.launcher.queue</name><value>default1</value></property>" + " <property><name>mapreduce.job.queuename</name><value>default2</value></property>" + "</configuration>" + "<main-class>" + LauncherMainTester.class.getName() + "</main-class>" + "</java>"; final Context context = createContext(actionXml, null); String applicationId = submitAction(context); final ApplicationId appId = ConverterUtils.toApplicationId(context.getAction().getExternalId()); final Configuration conf = getHadoopAccessorService().createConfiguration(getJobTrackerUri()); final String queue = getHadoopAccessorService().createYarnClient(getTestUser(), conf) .getApplicationReport(appId).getQueue(); if (isFairSchedulerUsed(conf)) { assertEquals("queue name", "root.default1", queue); } waitUntilYarnAppDoneAndAssertSuccess(applicationId); }
public void testSubmitWithLauncherQueue() throws Exception { String actionXml = "<java>" + "<job-tracker>" + getJobTrackerUri() + "</job-tracker>" + "<name-node>" + getNameNodeUri() + "</name-node>" + "<configuration>" + " <property><name>oozie.launcher.queue</name><value>test</value></property>" + "</configuration>" + "<main-class>" + LauncherMainTester.class.getName() + "</main-class>" + "</java>"; Context context = createContext(actionXml, null); submitAction(context); final ApplicationId appId = ConverterUtils.toApplicationId(context.getAction().getExternalId()); Configuration conf = getHadoopAccessorService().createConfiguration(getJobTrackerUri()); String queue = getHadoopAccessorService().createYarnClient(getTestUser(), conf).getApplicationReport(appId).getQueue(); if (isFairSchedulerUsed(conf)) { assertEquals("root.test", queue); } else { assertEquals("test", queue); } }
org.apache.hadoop.mapreduce.JobPriority.NORMAL, application.getUser(), application.getName(), application.getQueue(), jobFile, trackingUrl, false );
application.getPriority().getPriority()), application.getUser(), application.getName(), application.getQueue(), jobFile, trackingUrl, false );