/// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/> /// <exception cref="System.IO.IOException"/> public override IList <ApplicationAttemptReport> GetApplicationAttempts(ApplicationId appId) { try { GetApplicationAttemptsRequest request = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <GetApplicationAttemptsRequest>(); request.SetApplicationId(appId); GetApplicationAttemptsResponse response = rmClient.GetApplicationAttempts(request ); return(response.GetApplicationAttemptList()); } catch (YarnException e) { if (!historyServiceEnabled) { // Just throw it as usual if historyService is not enabled. throw; } // Even if history-service is enabled, treat all exceptions still the same // except the following if (e.GetType() != typeof(ApplicationNotFoundException)) { throw; } return(historyClient.GetApplicationAttempts(appId)); } }
/// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/> /// <exception cref="System.IO.IOException"/> public virtual GetApplicationAttemptsResponse GetApplicationAttempts(GetApplicationAttemptsRequest request) { GetApplicationAttemptsResponse response = GetApplicationAttemptsResponse.NewInstance (new AList <ApplicationAttemptReport>(history.GetApplicationAttempts(request.GetApplicationId ()).Values)); return(response); }
/// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/> /// <exception cref="System.IO.IOException"/> public override IList <ApplicationAttemptReport> GetApplicationAttempts(ApplicationId appId) { GetApplicationAttemptsRequest request = GetApplicationAttemptsRequest.NewInstance (appId); GetApplicationAttemptsResponse response = ahsClient.GetApplicationAttempts(request ); return(response.GetApplicationAttemptList()); }
/// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/> /// <exception cref="System.IO.IOException"/> public override GetApplicationAttemptsResponse GetApplicationAttempts(GetApplicationAttemptsRequest request) { this._enclosing.ResetStartFailoverFlag(true); // make sure failover has been triggered NUnit.Framework.Assert.IsTrue(this._enclosing.WaittingForFailOver()); // return fake ApplicationAttemptReports return(GetApplicationAttemptsResponse.NewInstance(this._enclosing.CreateFakeApplicationAttemptReports ())); }
public virtual void TestApplicationAttempts() { ApplicationId appId = ApplicationId.NewInstance(0, 1); ApplicationAttemptId appAttemptId = ApplicationAttemptId.NewInstance(appId, 1); ApplicationAttemptId appAttemptId1 = ApplicationAttemptId.NewInstance(appId, 2); GetApplicationAttemptsRequest request = GetApplicationAttemptsRequest.NewInstance (appId); GetApplicationAttemptsResponse response = clientService.GetApplicationAttempts(request ); IList <ApplicationAttemptReport> attemptReports = response.GetApplicationAttemptList (); NUnit.Framework.Assert.IsNotNull(attemptReports); NUnit.Framework.Assert.AreEqual(appAttemptId, attemptReports[0].GetApplicationAttemptId ()); NUnit.Framework.Assert.AreEqual(appAttemptId1, attemptReports[1].GetApplicationAttemptId ()); }
/// <exception cref="Com.Google.Protobuf.ServiceException"/> public virtual YarnServiceProtos.GetApplicationAttemptsResponseProto GetApplicationAttempts (RpcController controller, YarnServiceProtos.GetApplicationAttemptsRequestProto proto) { GetApplicationAttemptsRequestPBImpl request = new GetApplicationAttemptsRequestPBImpl (proto); try { GetApplicationAttemptsResponse response = real.GetApplicationAttempts(request); return(((GetApplicationAttemptsResponsePBImpl)response).GetProto()); } catch (YarnException e) { throw new ServiceException(e); } catch (IOException e) { throw new ServiceException(e); } }