public static ApplicationReport NewApplicationReport(ApplicationId applicationId, ApplicationAttemptId applicationAttemptId, string user, string queue, string name , string host, int rpcPort, Org.Apache.Hadoop.Yarn.Api.Records.Token clientToAMToken , YarnApplicationState state, string diagnostics, string url, long startTime, long finishTime, FinalApplicationStatus finalStatus, ApplicationResourceUsageReport appResources, string origTrackingUrl, float progress, string appType, Org.Apache.Hadoop.Yarn.Api.Records.Token amRmToken, ICollection <string> tags) { ApplicationReport report = recordFactory.NewRecordInstance <ApplicationReport>(); report.SetApplicationId(applicationId); report.SetCurrentApplicationAttemptId(applicationAttemptId); report.SetUser(user); report.SetQueue(queue); report.SetName(name); report.SetHost(host); report.SetRpcPort(rpcPort); report.SetClientToAMToken(clientToAMToken); report.SetYarnApplicationState(state); report.SetDiagnostics(diagnostics); report.SetTrackingUrl(url); report.SetStartTime(startTime); report.SetFinishTime(finishTime); report.SetFinalApplicationStatus(finalStatus); report.SetApplicationResourceUsageReport(appResources); report.SetOriginalTrackingUrl(origTrackingUrl); report.SetProgress(progress); report.SetApplicationType(appType); report.SetAMRMToken(amRmToken); report.SetApplicationTags(tags); return(report); }
/// <exception cref="System.IO.IOException"/> public virtual GetApplicationReportResponse GetApplicationReport(GetApplicationReportRequest request) { ApplicationId applicationId = request.GetApplicationId(); ApplicationReport application = TestClientRedirect.recordFactory.NewRecordInstance <ApplicationReport>(); application.SetApplicationId(applicationId); application.SetFinalApplicationStatus(FinalApplicationStatus.Undefined); if (this._enclosing.amRunning) { application.SetYarnApplicationState(YarnApplicationState.Running); } else { if (this._enclosing.amRestarting) { application.SetYarnApplicationState(YarnApplicationState.Submitted); } else { application.SetYarnApplicationState(YarnApplicationState.Finished); application.SetFinalApplicationStatus(FinalApplicationStatus.Succeeded); } } string[] split = TestClientRedirect.Amhostaddress.Split(":"); application.SetHost(split[0]); application.SetRpcPort(System.Convert.ToInt32(split[1])); application.SetUser("TestClientRedirect-user"); application.SetName("N/A"); application.SetQueue("N/A"); application.SetStartTime(0); application.SetFinishTime(0); application.SetTrackingUrl("N/A"); application.SetDiagnostics("N/A"); GetApplicationReportResponse response = TestClientRedirect.recordFactory.NewRecordInstance <GetApplicationReportResponse>(); response.SetApplicationReport(application); return(response); }