/// <inheritdoc />
        public async Task<IEnumerable<ApplicationAttemptDetails>> ListApplicationAttemptsAsync(ApplicationDetails application)
        {
            ApplicationAttemptListResult attemptListResult = await this.readProxy.ListApplicationAttemptsAsync(application.ApplicationId);

            ApplicationAttemptList attempts = new ApplicationAttemptList(attemptListResult, application);

            return attempts.ApplicationAttempts;
        }
        /// <inheritdoc />
        public async Task<ApplicationDetails> GetApplicationDetailsAsync(string applicationId)
        {
            ApplicationGetResult applicationResult = await this.readProxy.GetApplicationDetailsAsync(applicationId);

            ApplicationDetails application = new ApplicationDetails(applicationResult);

            return application;
        }
        /// <inheritdoc />
        public async Task <ApplicationDetails> GetApplicationDetailsAsync(string applicationId)
        {
            ApplicationGetResult applicationResult = await this.readProxy.GetApplicationDetailsAsync(applicationId);

            ApplicationDetails application = new ApplicationDetails(applicationResult);

            return(application);
        }
        /// <summary>
        /// Initializes a new instance of the ApplicationAttemptList class.
        /// </summary>
        /// <param name="applicationAttemptListResult">
        /// Result of a REST call, containing list of application attempts.
        /// </param>
        /// <param name="parentApplication">
        /// The parent ApplicationDetails object.
        /// </param>
        internal ApplicationAttemptList(ApplicationAttemptListResult applicationAttemptListResult, ApplicationDetails parentApplication)
        {
            if (applicationAttemptListResult == null)
            {
                throw new ArgumentNullException("applicationAttemptListResult");
            }

            if (parentApplication == null)
            {
                throw new ArgumentNullException("parentApplication");
            }

            this.ApplicationAttempts = applicationAttemptListResult.ApplicationAttempts.Select(applicationAttemptResult => new ApplicationAttemptDetails(applicationAttemptResult, parentApplication));
        }
        /// <summary>
        /// Initializes a new instance of the ApplicationAttemptDetails class.
        /// </summary>
        /// <param name="attemptResult">
        /// Result of a REST call, containing details about an application's attempt.
        /// </param>
        /// <param name="application">
        /// The application with which this attempt is associated.
        /// </param>
        internal ApplicationAttemptDetails(ApplicationAttemptGetResult attemptResult, ApplicationDetails application)
        {
            if (attemptResult == null)
            {
                throw new ArgumentNullException("attemptResult");
            }

            if (application == null)
            {
                throw new ArgumentNullException("application");
            }

            this.ApplicationAttemptId = attemptResult.ApplicationAttemptId;
            this.Host = attemptResult.Host;
            this.State = attemptResult.State;
            this.ApplicationMasterContainerId = attemptResult.ApplicationMasterContainerId;
            this.DiagnosticInfo = attemptResult.DiagnosticInfo;

            this.ParentApplication = application;
        }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the ApplicationAttemptList class.
        /// </summary>
        /// <param name="applicationAttemptListResult">
        /// Result of a REST call, containing list of application attempts.
        /// </param>
        /// <param name="parentApplication">
        /// The parent ApplicationDetails object.
        /// </param>
        internal ApplicationAttemptList(ApplicationAttemptListResult applicationAttemptListResult, ApplicationDetails parentApplication)
        {
            if (applicationAttemptListResult == null)
            {
                throw new ArgumentNullException("applicationAttemptListResult");
            }

            if (parentApplication == null)
            {
                throw new ArgumentNullException("parentApplication");
            }

            this.ApplicationAttempts = applicationAttemptListResult.ApplicationAttempts.Select(applicationAttemptResult => new ApplicationAttemptDetails(applicationAttemptResult, parentApplication));
        }
예제 #7
0
        /// <summary>
        /// Initializes a new instance of the ApplicationAttemptDetails class.
        /// </summary>
        /// <param name="attemptResult">
        /// Result of a REST call, containing details about an application's attempt.
        /// </param>
        /// <param name="application">
        /// The application with which this attempt is associated.
        /// </param>
        internal ApplicationAttemptDetails(ApplicationAttemptGetResult attemptResult, ApplicationDetails application)
        {
            if (attemptResult == null)
            {
                throw new ArgumentNullException("attemptResult");
            }

            if (application == null)
            {
                throw new ArgumentNullException("application");
            }

            this.ApplicationAttemptId = attemptResult.ApplicationAttemptId;
            this.Host  = attemptResult.Host;
            this.State = attemptResult.State;
            this.ApplicationMasterContainerId = attemptResult.ApplicationMasterContainerId;
            this.DiagnosticInfo = attemptResult.DiagnosticInfo;

            this.ParentApplication = application;
        }
예제 #8
0
 /// <inheritdoc />
 public IEnumerable <ApplicationAttemptDetails> ListApplicationAttempts(ApplicationDetails application)
 {
     return(this.ListApplicationAttemptsAsync(application).WaitForResult());
 }
예제 #9
0
        /// <inheritdoc />
        public async Task <IEnumerable <ApplicationAttemptDetails> > ListApplicationAttemptsAsync(ApplicationDetails application)
        {
            var factory = ServiceLocator.Instance.Locate <IHadoopApplicationHistoryRestClientFactory>();
            var applicationHistoryRestClient = factory.Create(this.credentials, this.Context, this.IgnoreSslErrors);
            var attempts = await applicationHistoryRestClient.ListApplicationAttemptsAsync(application);

            return(attempts);
        }
 /// <inheritdoc />
 public void DownloadApplicationLogs(ApplicationDetails application, string targetDirectory, TimeSpan timeout)
 {
     this.DownloadApplicationLogsAsync(application, targetDirectory).WaitForResult(timeout);
 }
 /// <inheritdoc />
 public void DownloadApplicationLogs(ApplicationDetails application, string targetDirectory)
 {
     this.DownloadApplicationLogs(application, targetDirectory, this.timeout);
 }
 /// <inheritdoc />
 public IEnumerable<ApplicationAttemptDetails> ListApplicationAttempts(ApplicationDetails application)
 {
     return this.ListApplicationAttemptsAsync(application).WaitForResult(this.timeout);
 }
        /// <inheritdoc />
        public async Task DownloadApplicationLogsAsync(ApplicationDetails application, string targetDirectory)
        {
            application.ArgumentNotNull("application");
            targetDirectory.ArgumentNotNullOrEmpty("targetDirectory");

            await DownloadApplicationLogsAsync(application.ApplicationId, application.User, targetDirectory);
        }
        /// <inheritdoc />
        public async Task<IEnumerable<ApplicationAttemptDetails>> ListApplicationAttemptsAsync(ApplicationDetails application)
        {
            application.ArgumentNotNull("application");

            return await this.applicationHistoryClient.ListApplicationAttemptsAsync(application);
        }
        /// <inheritdoc />
        public async Task <IEnumerable <ApplicationAttemptDetails> > ListApplicationAttemptsAsync(ApplicationDetails application)
        {
            ApplicationAttemptListResult attemptListResult = await this.readProxy.ListApplicationAttemptsAsync(application.ApplicationId);

            ApplicationAttemptList attempts = new ApplicationAttemptList(attemptListResult, application);

            return(attempts.ApplicationAttempts);
        }