Пример #1
0
 /// <summary>
 /// Asynchronously polls this job for completion.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="BigQueryClient.PollJobUntilCompletedAsync(JobReference, GetJobOptions, PollSettings, CancellationToken)"/>.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="pollSettings">The settings to control how often and long the job is fetched before timing out if it is still incomplete.
 /// May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// the completed job.</returns>
 public Task <BigQueryJob> PollUntilCompletedAsync(GetJobOptions options = null, PollSettings pollSettings = null, CancellationToken cancellationToken = default) =>
 _client.PollJobUntilCompletedAsync(Reference, options, pollSettings, cancellationToken);
 /// <inheritdoc />
 public override Task <BigQueryJob> PollJobUntilCompletedAsync(JobReference jobReference, GetJobOptions options = null,
                                                               PollSettings pollSettings = null, CancellationToken cancellationToken = default)
 {
     GaxPreconditions.CheckNotNull(jobReference, nameof(jobReference));
     return(Polling.PollRepeatedlyAsync(ignoredDeadline => GetJobAsync(jobReference, options, cancellationToken),
                                        job => job.State == JobState.Done,
                                        Clock, Scheduler, pollSettings ?? s_defaultPollSettings, cancellationToken));
 }
Пример #3
0
 /// <summary>
 /// Polls the specified job for completion.
 /// </summary>
 /// <param name="jobReference">A fully-qualified identifier for the job. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="pollSettings">The settings to control how often and long the job is fetched before timing out if it is still incomplete.
 /// May be null, in which case defaults will be supplied.</param>
 /// <returns>The completed job.</returns>
 public virtual BigQueryJob PollJobUntilCompleted(JobReference jobReference, GetJobOptions options = null, PollSettings pollSettings = null)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 /// <summary>
 /// Polls this job for completion.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="BigQueryClient.PollJobUntilCompleted(JobReference, GetJobOptions, PollSettings)"/>.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="pollSettings">The settings to control how often and long the job is fetched before timing out if it is still incomplete.
 /// May be null, in which case defaults will be supplied.</param>
 /// <returns>The completed job.</returns>
 public BigQueryJob PollUntilCompleted(GetJobOptions options = null, PollSettings pollSettings = null) =>
 _client.PollJobUntilCompleted(Reference, options, pollSettings);
Пример #5
0
 /// <summary>
 /// Retrieves a job.
 /// </summary>
 /// <param name="jobReference">A fully-qualified identifier for the job. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// the retrieved job.</returns>
 public virtual Task <BigQueryJob> GetJobAsync(JobReference jobReference, GetJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     throw new NotImplementedException();
 }
Пример #6
0
 /// <summary>
 /// Polls the job with the specified project ID and job ID.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="PollJobUntilCompleted(JobReference,GetJobOptions,PollSettings)"/>.
 /// </summary>
 /// <param name="projectId">The project ID. Must not be null.</param>
 /// <param name="jobId">The job ID. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="pollSettings">The settings to control how often and long the job is fetched before timing out if it is still incomplete.
 /// May be null, in which case defaults will be supplied.</param>
 /// <returns>The completed job.</returns>
 public virtual BigQueryJob PollJobUntilCompleted(string projectId, string jobId, GetJobOptions options = null, PollSettings pollSettings = null) =>
 PollJobUntilCompleted(GetJobReference(projectId, jobId), options, pollSettings);
Пример #7
0
 /// <summary>
 /// Polls the specified job for completion.
 /// </summary>
 /// <param name="jobReference">A fully-qualified identifier for the job. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="pollSettings">The settings to control how often and long the job is fetched before timing out if it is still incomplete.
 /// May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// the completed job.</returns>
 public virtual Task <BigQueryJob> PollJobUntilCompletedAsync(JobReference jobReference, GetJobOptions options = null, PollSettings pollSettings = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     throw new NotImplementedException();
 }
Пример #8
0
 /// <summary>
 /// Retrieves a job given a project ID and job ID.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="GetJobAsync(JobReference,GetJobOptions,CancellationToken)"/>.
 /// </summary>
 /// <param name="projectId">The project ID. Must not be null.</param>
 /// <param name="jobId">The job ID. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// the retrieved job.</returns>
 public virtual Task <BigQueryJob> GetJobAsync(string projectId, string jobId, GetJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) =>
 GetJobAsync(GetJobReference(projectId, jobId), options, cancellationToken);
Пример #9
0
 /// <summary>
 /// Polls the job with the specified project ID and job ID.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="PollJobUntilCompletedAsync(JobReference,GetJobOptions,PollSettings,CancellationToken)"/>.
 /// </summary>
 /// <param name="projectId">The project ID. Must not be null.</param>
 /// <param name="jobId">The job ID. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="pollSettings">The settings to control how often and long the job is fetched before timing out if it is still incomplete.
 /// May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// the completed job.</returns>
 public virtual Task <BigQueryJob> PollJobUntilCompletedAsync(string projectId, string jobId, GetJobOptions options = null, PollSettings pollSettings = null, CancellationToken cancellationToken = default(CancellationToken)) =>
 PollJobUntilCompletedAsync(GetJobReference(projectId, jobId), options, pollSettings, cancellationToken);
Пример #10
0
 /// <summary>
 /// Retrieves a job.
 /// </summary>
 /// <param name="jobReference">A fully-qualified identifier for the job. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>The retrieved job.</returns>
 public virtual BigQueryJob GetJob(JobReference jobReference, GetJobOptions options = null)
 {
     throw new NotImplementedException();
 }
Пример #11
0
 /// <summary>
 /// Retrieves a job given a project ID and job ID.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="GetJob(JobReference,GetJobOptions)"/>.
 /// </summary>
 /// <param name="projectId">The project ID. Must not be null.</param>
 /// <param name="jobId">The job ID. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>The retrieved job.</returns>
 public virtual BigQueryJob GetJob(string projectId, string jobId, GetJobOptions options = null) =>
 GetJob(GetJobReference(projectId, jobId), options);
Пример #12
0
        /// <inheritdoc />
        public override async Task <BigQueryJob> GetJobAsync(JobReference jobReference, GetJobOptions options = null,
                                                             CancellationToken cancellationToken = default)
        {
            GaxPreconditions.CheckNotNull(jobReference, nameof(jobReference));

            var request = Service.Jobs.Get(jobReference.ProjectId, jobReference.JobId);

            request.ModifyRequest += _versionHeaderAction;
            options?.ModifyRequest(request);
            var job = await request.ExecuteAsync(cancellationToken).ConfigureAwait(false);

            return(new BigQueryJob(this, job));
        }
        /// <inheritdoc />
        public override async Task <BigQueryJob> GetJobAsync(JobReference jobReference, GetJobOptions options = null,
                                                             CancellationToken cancellationToken = default)
        {
            var request = CreateGetJobRequest(jobReference, options);
            var job     = await request.ExecuteAsync(cancellationToken).ConfigureAwait(false);

            return(new BigQueryJob(this, job));
        }