< Summary

Class:Microsoft.Azure.HDInsight.Job.JobOperationsExtensions
Assembly:Microsoft.Azure.HDInsight.Job
File(s):C:\Git\azure-sdk-for-net\sdk\hdinsight\Microsoft.Azure.HDInsight.Job\src\Customizations\JobOperationsExtensions.Customizations.cs
C:\Git\azure-sdk-for-net\sdk\hdinsight\Microsoft.Azure.HDInsight.Job\src\Generated\JobOperationsExtensions.cs
Covered lines:89
Uncovered lines:61
Coverable lines:150
Total lines:1371
Line coverage:59.3% (89 of 150)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
SubmitHiveJob(...)-100%100%
SubmitHiveJobAsync()-100%100%
SubmitMapReduceJob(...)-100%100%
SubmitMapReduceJobAsync()-100%100%
SubmitMapReduceStreamingJob(...)-100%100%
SubmitMapReduceStreamingJobAsync()-100%100%
SubmitPigJob(...)-100%100%
SubmitPigJobAsync()-100%100%
SubmitSqoopJob(...)-100%100%
SubmitSqoopJobAsync()-100%100%
GetJobOutput(...)-0%100%
GetJobOutputAsync(...)-0%100%
GetJobErrorLogs(...)-0%100%
GetJobErrorLogsAsync(...)-0%100%
WaitForJobCompletion(...)-100%100%
WaitForJobCompletionAsync()-100%100%
Get(...)-100%100%
GetAsync()-33.33%100%
Kill(...)-100%100%
KillAsync()-100%100%
List(...)-100%100%
ListAsync()-100%100%
ListAfterJobId(...)-100%100%
ListAfterJobIdAsync()-100%100%
SubmitHiveJob(...)-0%100%
SubmitHiveJobAsync()-0%100%
SubmitMapReduceJob(...)-0%100%
SubmitMapReduceJobAsync()-0%100%
SubmitMapReduceStreamingJob(...)-0%100%
SubmitMapReduceStreamingJobAsync()-0%100%
SubmitPigJob(...)-0%100%
SubmitPigJobAsync()-0%100%
SubmitSqoopJob(...)-0%100%
SubmitSqoopJobAsync()-0%100%
GetAppState(...)-0%100%
GetAppStateAsync()-100%100%
ListSparkBatchJob(...)-100%100%
ListSparkBatchJobAsync()-100%100%
SubmitSparkBatchJob(...)-100%100%
SubmitSparkBatchJobAsync()-100%100%
GetSparkBatchJob(...)-100%100%
GetSparkBatchJobAsync()-100%100%
DeleteSparkBatchJob(...)-100%100%
DeleteSparkBatchJobAsync()-100%100%
GetSparkBatchLog(...)-0%100%
GetSparkBatchLogAsync()-0%100%
GetSparkBatchState(...)-0%100%
GetSparkBatchStateAsync()-0%100%
ListSparkSessionJob(...)-100%100%
ListSparkSessionJobAsync()-100%100%
SubmitSparkSessionJob(...)-100%100%
SubmitSparkSessionJobAsync()-100%100%
GetSparkSessionJob(...)-100%100%
GetSparkSessionJobAsync()-100%100%
DeleteSparkSessionJob(...)-100%100%
DeleteSparkSessionJobAsync()-100%100%
GetSparkSessionLog(...)-0%100%
GetSparkSessionLogAsync()-0%100%
GetSparkSessionState(...)-0%100%
GetSparkSessionStateAsync()-0%100%
ListSparkStatementJob(...)-100%100%
ListSparkStatementJobAsync()-100%100%
SubmitSparkStatementJob(...)-100%100%
SubmitSparkStatementJobAsync()-100%100%
GetSparkStatementJob(...)-0%100%
GetSparkStatementJobAsync()-0%100%
DeleteSparkStatementJob(...)-100%100%
DeleteSparkStatementJobAsync()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\hdinsight\Microsoft.Azure.HDInsight.Job\src\Customizations\JobOperationsExtensions.Customizations.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for
 3// license information.
 4
 5namespace Microsoft.Azure.HDInsight.Job
 6{
 7    using Microsoft.Azure.HDInsight.Job.Models;
 8    using System;
 9    using System.IO;
 10    using System.Threading;
 11    using System.Threading.Tasks;
 12
 13    /// <summary>
 14    /// Operations for managing jobs against HDInsight clusters.
 15    /// </summary>
 16    public partial class JobOperationsExtensions
 17    {
 18        /// <summary>
 19        /// Submits a Hive job to an HDInsight cluster.
 20        /// </summary>
 21        /// <param name='operations'>
 22        /// Reference to the
 23        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 24        /// </param>
 25        /// <param name='parameters'>
 26        /// Required. Hive job parameters.
 27        /// </param>
 28        /// <returns>
 29        /// The Create Job operation response.
 30        /// </returns>
 31        public static JobSubmissionJsonResponse SubmitHiveJob(this IJobOperations operations, HiveJobSubmissionParameter
 32        {
 1833            return SubmitHiveJobAsync(operations, parameters).GetAwaiter().GetResult();
 34        }
 35
 36        /// <summary>
 37        /// Submits a Hive job to an HDInsight cluster.
 38        /// </summary>
 39        /// <param name='operations'>
 40        /// Reference to the
 41        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 42        /// </param>
 43        /// <param name='parameters'>
 44        /// Required. Hive job parameters.
 45        /// </param>
 46        /// <returns>
 47        /// The Create Job operation response.
 48        /// </returns>
 49        public static async Task<JobSubmissionJsonResponse> SubmitHiveJobAsync(this IJobOperations operations, HiveJobSu
 50        {
 2051            using (var _result = await operations.SubmitHiveJobWithHttpMessagesAsync(parameters, null, cancellationToken
 52            {
 2053                return _result.Body;
 54            }
 2055        }
 56
 57        /// <summary>
 58        /// Submits a MapReduce job to an HDInsight cluster.
 59        /// </summary>
 60        /// <param name='operations'>
 61        /// Reference to the
 62        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 63        /// </param>
 64        /// <param name='parameters'>
 65        /// Required. MapReduce job parameters.
 66        /// </param>
 67        /// <returns>
 68        /// The Create Job operation response.
 69        /// </returns>
 70        public static JobSubmissionJsonResponse SubmitMapReduceJob(this IJobOperations operations, MapReduceJobSubmissio
 71        {
 472            return operations.SubmitMapReduceJobAsync(parameters).GetAwaiter().GetResult();
 73        }
 74
 75        /// <summary>
 76        /// Submits a MapReduce job to an HDInsight cluster.
 77        /// </summary>
 78        /// <param name='operations'>
 79        /// Reference to the
 80        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 81        /// </param>
 82        /// <param name='parameters'>
 83        /// Required. MapReduce job parameters.
 84        /// </param>
 85        /// <returns>
 86        /// The Create Job operation response.
 87        /// </returns>
 88        public static async Task<JobSubmissionJsonResponse> SubmitMapReduceJobAsync(this IJobOperations operations, MapR
 89        {
 690            using (var _result = await operations.SubmitMapReduceJobWithHttpMessagesAsync(parameters, null, cancellation
 91            {
 692                return _result.Body;
 93            }
 694        }
 95
 96        /// <summary>
 97        /// Submits a MapReduce streaming job to an HDInsight cluster.
 98        /// </summary>
 99        /// <param name='operations'>
 100        /// Reference to the
 101        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 102        /// </param>
 103        /// <param name='parameters'>
 104        /// Required. MapReduce job parameters.
 105        /// </param>
 106        /// <returns>
 107        /// The Create Job operation response.
 108        /// </returns>
 109        public static JobSubmissionJsonResponse SubmitMapReduceStreamingJob(this IJobOperations operations, MapReduceStr
 110        {
 2111            return operations.SubmitMapReduceStreamingJobAsync(parameters).GetAwaiter().GetResult();
 112        }
 113
 114        /// <summary>
 115        /// Submits a MapReduce streaming job to an HDInsight cluster.
 116        /// </summary>
 117        /// <param name='operations'>
 118        /// Reference to the
 119        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 120        /// </param>
 121        /// <param name='parameters'>
 122        /// Required. MapReduce job parameters.
 123        /// </param>
 124        /// <returns>
 125        /// The Create Job operation response.
 126        /// </returns>
 127        public static async Task<JobSubmissionJsonResponse> SubmitMapReduceStreamingJobAsync(this IJobOperations operati
 128        {
 4129            using (var _result = await operations.SubmitMapReduceStreamingJobWithHttpMessagesAsync(parameters, null, can
 130            {
 4131                return _result.Body;
 132            }
 4133        }
 134
 135        /// <summary>
 136        /// Submits a Pig job to an HDInsight cluster.
 137        /// </summary>
 138        /// <param name='operations'>
 139        /// Reference to the
 140        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 141        /// </param>
 142        /// <param name='parameters'>
 143        /// Required. Pig job parameters.
 144        /// </param>
 145        /// <returns>
 146        /// The Create Job operation response.
 147        /// </returns>
 148        public static JobSubmissionJsonResponse SubmitPigJob(this IJobOperations operations, PigJobSubmissionParameters 
 149        {
 2150            return operations.SubmitPigJobAsync(parameters).GetAwaiter().GetResult();
 151        }
 152
 153        /// <summary>
 154        /// Submits a Pig job to an HDInsight cluster.
 155        /// </summary>
 156        /// <param name='operations'>
 157        /// Reference to the
 158        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 159        /// </param>
 160        /// <param name='parameters'>
 161        /// Required. Pig job parameters.
 162        /// </param>
 163        /// <returns>
 164        /// The Create Job operation response.
 165        /// </returns>
 166        public static async Task<JobSubmissionJsonResponse> SubmitPigJobAsync(this IJobOperations operations, PigJobSubm
 167        {
 4168            using (var _result = await operations.SubmitPigJobWithHttpMessagesAsync(parameters, null, cancellationToken)
 169            {
 4170                return _result.Body;
 171            }
 4172        }
 173
 174        /// <summary>
 175        /// Submits a Sqoop job to an HDInsight cluster.
 176        /// </summary>
 177        /// <param name='operations'>
 178        /// Reference to the
 179        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 180        /// </param>
 181        /// <param name='parameters'>
 182        /// Required. Sqoop job parameters.
 183        /// </param>
 184        /// <returns>
 185        /// The Create Job operation response.
 186        /// </returns>
 187        public static JobSubmissionJsonResponse SubmitSqoopJob(this IJobOperations operations, SqoopJobSubmissionParamet
 188        {
 2189            return operations.SubmitSqoopJobAsync(parameters).GetAwaiter().GetResult();
 190        }
 191
 192        /// <summary>
 193        /// Submits a Sqoop job to an HDInsight cluster.
 194        /// </summary>
 195        /// <param name='operations'>
 196        /// Reference to the
 197        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 198        /// </param>
 199        /// <param name='parameters'>
 200        /// Required. Sqoop job parameters.
 201        /// </param>
 202        /// <returns>
 203        /// The Create Job operation response.
 204        /// </returns>
 205        public static async Task<JobSubmissionJsonResponse> SubmitSqoopJobAsync(this IJobOperations operations, SqoopJob
 206        {
 4207            using (var _result = await operations.SubmitSqoopJobWithHttpMessagesAsync(parameters, null, cancellationToke
 208            {
 4209                return _result.Body;
 210            }
 4211        }
 212
 213        /// <summary>
 214        /// Gets the output from the execution of an individual jobDetails.
 215        /// </summary>
 216        /// <param name='operations'>
 217        /// Reference to the
 218        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 219        /// </param>
 220        /// <param name="jobId">
 221        /// Required. The id of the job.
 222        /// </param>
 223        /// <param name="storageAccess">
 224        /// Required. The storage account object of type IStorageAccess.
 225        /// </param>
 226        /// <returns>
 227        /// The output of an individual jobDetails by jobId.
 228        /// </returns>
 229        public static Stream GetJobOutput(this IJobOperations operations, string jobId, IStorageAccess storageAccess)
 230        {
 0231            return Task.Factory.StartNew(
 0232                (object s) =>
 0233                ((IJobOperations)s).GetJobOutputAsync(jobId, storageAccess), operations,
 0234                CancellationToken.None,
 0235                TaskCreationOptions.None, TaskScheduler.Default)
 0236                .Unwrap()
 0237                .GetAwaiter()
 0238                .GetResult();
 239        }
 240
 241        /// <summary>
 242        /// Gets the output from the execution of an individual jobDetails.
 243        /// </summary>
 244        /// <param name='operations'>
 245        /// Reference to the
 246        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 247        /// </param>
 248        /// <param name="jobId">
 249        /// Required. The id of the job.
 250        /// </param>
 251        /// <param name="storageAccess">
 252        /// Required. The storage account object of type IStorageAccess.
 253        /// </param>
 254        /// <returns>
 255        /// The output of an individual jobDetails by jobId.
 256        /// </returns>
 257        public static Task<Stream> GetJobOutputAsync(this IJobOperations operations, string jobId,
 258            IStorageAccess storageAccess)
 259        {
 0260            return operations.GetJobOutputAsync(jobId, storageAccess, CancellationToken.None);
 261        }
 262
 263        /// <summary>
 264        /// Gets the error logs from the execution of an individual jobDetails.
 265        /// </summary>
 266        /// <param name='operations'>
 267        /// Reference to the
 268        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 269        /// </param>
 270        /// <param name="jobId">
 271        /// Required. The id of the job.
 272        /// </param>
 273        /// <param name="storageAccess">
 274        /// Required. The storage account object of type IStorageAccess.
 275        /// </param>
 276        /// <returns>
 277        /// The error logs of an individual jobDetails by jobId.
 278        /// </returns>
 279        public static Stream GetJobErrorLogs(this IJobOperations operations, string jobId,
 280            IStorageAccess storageAccess)
 281        {
 0282            return Task.Factory.StartNew(
 0283                (object s) =>
 0284                    ((IJobOperations)s).GetJobErrorLogsAsync(jobId, storageAccess), operations,
 0285                CancellationToken.None,
 0286                TaskCreationOptions.None, TaskScheduler.Default)
 0287                .Unwrap()
 0288                .GetAwaiter()
 0289                .GetResult();
 290        }
 291
 292        /// <summary>
 293        /// Gets the error logs from the execution of an individual jobDetails.
 294        /// </summary>
 295        /// <param name='operations'>
 296        /// Reference to the
 297        /// Microsoft.Azure.HDInsight.Job.IJobOperations.
 298        /// </param>
 299        /// <param name="jobId">
 300        /// Required. The id of the job.
 301        /// </param>
 302        /// <param name="storageAccess">
 303        /// Required. The storage account object of type IStorageAccess.
 304        /// </param>
 305        /// <returns>
 306        /// The error logs of an individual jobDetails by jobId.
 307        /// </returns>
 308        public static Task<Stream> GetJobErrorLogsAsync(this IJobOperations operations, string jobId,
 309            IStorageAccess storageAccess)
 310        {
 0311            return operations.GetJobErrorLogsAsync(jobId, storageAccess, CancellationToken.None);
 312        }
 313
 314        /// <summary>
 315        /// Wait for completion of a Job.
 316        /// </summary>
 317        /// <param name='jobId'>
 318        /// Required. The id of the job.
 319        /// </param>
 320        /// <param name='duration'>
 321        /// Optional. The maximum duration to wait for completion of job before returning to client. If not passed then 
 322        /// </param>
 323        /// <param name='waitInterval'>
 324        /// Optional. The interval to poll for job status. The default value is set from DefaultPollInterval property of
 325        /// </param>
 326        /// <exception cref="TimeoutException">
 327        /// Thrown when waiting for job completion exceeds the maximum duration specified by parameter duration.
 328        /// </exception>
 329        public static JobDetailRootJsonObject WaitForJobCompletion(this IJobOperations operations, string jobId, TimeSpa
 330        {
 24331            return Task.Factory.StartNew((object s) =>
 24332            {
 48333                return ((IJobOperations)s).WaitForJobCompletionAsync(jobId, duration, waitInterval);
 24334            }
 24335            , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter()
 336        }
 337
 338        /// <summary>
 339        /// Wait for completion of a Job.
 340        /// </summary>
 341        /// <param name='jobId'>
 342        /// Required. The id of the job.
 343        /// </param>
 344        /// <param name='duration'>
 345        /// Optional. The maximum duration to wait for completion of job before returning to client. If not passed then 
 346        /// </param>
 347        /// <param name='waitInterval'>
 348        /// Optional. The interval to poll for job status. The default value is set from DefaultPollInterval property of
 349        /// </param>
 350        /// <exception cref="TimeoutException">
 351        /// Thrown when waiting for job completion exceeds the maximum duration specified by parameter duration.
 352        /// </exception>
 353        public static async Task<JobDetailRootJsonObject> WaitForJobCompletionAsync(this IJobOperations operations, stri
 354        {
 26355            using (var _result = await operations.WaitForJobCompletionWithHttpMessagesAsync(jobId, duration, waitInterva
 356            {
 26357                return _result.Body;
 358            }
 26359        }
 360    }
 361}

C:\Git\azure-sdk-for-net\sdk\hdinsight\Microsoft.Azure.HDInsight.Job\src\Generated\JobOperationsExtensions.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.HDInsight.Job
 12{
 13    using Microsoft.Rest;
 14    using Microsoft.Rest.Azure;
 15    using Models;
 16    using System.Collections;
 17    using System.Collections.Generic;
 18    using System.IO;
 19    using System.Threading;
 20    using System.Threading.Tasks;
 21
 22    /// <summary>
 23    /// Extension methods for JobOperations.
 24    /// </summary>
 25    public static partial class JobOperationsExtensions
 26    {
 27            /// <summary>
 28            /// Gets job details from the specified HDInsight cluster.
 29            /// </summary>
 30            /// <param name='operations'>
 31            /// The operations group for this extension method.
 32            /// </param>
 33            /// <param name='jobId'>
 34            /// The id of the job.
 35            /// </param>
 36            public static JobDetailRootJsonObject Get(this IJobOperations operations, string jobId)
 37            {
 238                return operations.GetAsync(jobId).GetAwaiter().GetResult();
 39            }
 40
 41            /// <summary>
 42            /// Gets job details from the specified HDInsight cluster.
 43            /// </summary>
 44            /// <param name='operations'>
 45            /// The operations group for this extension method.
 46            /// </param>
 47            /// <param name='jobId'>
 48            /// The id of the job.
 49            /// </param>
 50            /// <param name='cancellationToken'>
 51            /// The cancellation token.
 52            /// </param>
 53            public static async Task<JobDetailRootJsonObject> GetAsync(this IJobOperations operations, string jobId, Can
 54            {
 255                using (var _result = await operations.GetWithHttpMessagesAsync(jobId, null, cancellationToken).Configure
 56                {
 057                    return _result.Body;
 58                }
 059            }
 60
 61            /// <summary>
 62            /// Initiates cancel on given running job in the specified HDInsight.
 63            /// </summary>
 64            /// <param name='operations'>
 65            /// The operations group for this extension method.
 66            /// </param>
 67            /// <param name='jobId'>
 68            /// The id of the job.
 69            /// </param>
 70            public static JobDetailRootJsonObject Kill(this IJobOperations operations, string jobId)
 71            {
 472                return operations.KillAsync(jobId).GetAwaiter().GetResult();
 73            }
 74
 75            /// <summary>
 76            /// Initiates cancel on given running job in the specified HDInsight.
 77            /// </summary>
 78            /// <param name='operations'>
 79            /// The operations group for this extension method.
 80            /// </param>
 81            /// <param name='jobId'>
 82            /// The id of the job.
 83            /// </param>
 84            /// <param name='cancellationToken'>
 85            /// The cancellation token.
 86            /// </param>
 87            public static async Task<JobDetailRootJsonObject> KillAsync(this IJobOperations operations, string jobId, Ca
 88            {
 489                using (var _result = await operations.KillWithHttpMessagesAsync(jobId, null, cancellationToken).Configur
 90                {
 291                    return _result.Body;
 92                }
 293            }
 94
 95            /// <summary>
 96            /// Gets the list of jobs from the specified HDInsight cluster.
 97            /// </summary>
 98            /// <param name='operations'>
 99            /// The operations group for this extension method.
 100            /// </param>
 101            public static IList<JobListJsonObject> List(this IJobOperations operations)
 102            {
 6103                return operations.ListAsync().GetAwaiter().GetResult();
 104            }
 105
 106            /// <summary>
 107            /// Gets the list of jobs from the specified HDInsight cluster.
 108            /// </summary>
 109            /// <param name='operations'>
 110            /// The operations group for this extension method.
 111            /// </param>
 112            /// <param name='cancellationToken'>
 113            /// The cancellation token.
 114            /// </param>
 115            public static async Task<IList<JobListJsonObject>> ListAsync(this IJobOperations operations, CancellationTok
 116            {
 6117                using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(
 118                {
 6119                    return _result.Body;
 120                }
 6121            }
 122
 123            /// <summary>
 124            /// Gets numrecords Of Jobs after jobid from the specified HDInsight cluster.
 125            /// </summary>
 126            /// <param name='operations'>
 127            /// The operations group for this extension method.
 128            /// </param>
 129            /// <param name='jobid'>
 130            /// JobId from where to list jobs.
 131            /// </param>
 132            /// <param name='numrecords'>
 133            /// Number of jobs to fetch.
 134            /// </param>
 135            public static IList<JobListJsonObject> ListAfterJobId(this IJobOperations operations, string jobid = default
 136            {
 18137                return operations.ListAfterJobIdAsync(jobid, numrecords).GetAwaiter().GetResult();
 138            }
 139
 140            /// <summary>
 141            /// Gets numrecords Of Jobs after jobid from the specified HDInsight cluster.
 142            /// </summary>
 143            /// <param name='operations'>
 144            /// The operations group for this extension method.
 145            /// </param>
 146            /// <param name='jobid'>
 147            /// JobId from where to list jobs.
 148            /// </param>
 149            /// <param name='numrecords'>
 150            /// Number of jobs to fetch.
 151            /// </param>
 152            /// <param name='cancellationToken'>
 153            /// The cancellation token.
 154            /// </param>
 155            public static async Task<IList<JobListJsonObject>> ListAfterJobIdAsync(this IJobOperations operations, strin
 156            {
 18157                using (var _result = await operations.ListAfterJobIdWithHttpMessagesAsync(jobid, numrecords, null, cance
 158                {
 18159                    return _result.Body;
 160                }
 18161            }
 162
 163            /// <summary>
 164            /// Submits a Hive job to an HDInsight cluster.
 165            /// </summary>
 166            /// <param name='operations'>
 167            /// The operations group for this extension method.
 168            /// </param>
 169            /// <param name='content'>
 170            /// The content of the Hive job request.
 171            /// </param>
 172            public static JobSubmissionJsonResponse SubmitHiveJob(this IJobOperations operations, Stream content)
 173            {
 0174                return operations.SubmitHiveJobAsync(content).GetAwaiter().GetResult();
 175            }
 176
 177            /// <summary>
 178            /// Submits a Hive job to an HDInsight cluster.
 179            /// </summary>
 180            /// <param name='operations'>
 181            /// The operations group for this extension method.
 182            /// </param>
 183            /// <param name='content'>
 184            /// The content of the Hive job request.
 185            /// </param>
 186            /// <param name='cancellationToken'>
 187            /// The cancellation token.
 188            /// </param>
 189            public static async Task<JobSubmissionJsonResponse> SubmitHiveJobAsync(this IJobOperations operations, Strea
 190            {
 0191                using (var _result = await operations.SubmitHiveJobWithHttpMessagesAsync(content, null, cancellationToke
 192                {
 0193                    return _result.Body;
 194                }
 0195            }
 196
 197            /// <summary>
 198            /// Submits a MapReduce job to an HDInsight cluster.
 199            /// </summary>
 200            /// <param name='operations'>
 201            /// The operations group for this extension method.
 202            /// </param>
 203            /// <param name='content'>
 204            /// The content of the MapReduce job request.
 205            /// </param>
 206            public static JobSubmissionJsonResponse SubmitMapReduceJob(this IJobOperations operations, Stream content)
 207            {
 0208                return operations.SubmitMapReduceJobAsync(content).GetAwaiter().GetResult();
 209            }
 210
 211            /// <summary>
 212            /// Submits a MapReduce job to an HDInsight cluster.
 213            /// </summary>
 214            /// <param name='operations'>
 215            /// The operations group for this extension method.
 216            /// </param>
 217            /// <param name='content'>
 218            /// The content of the MapReduce job request.
 219            /// </param>
 220            /// <param name='cancellationToken'>
 221            /// The cancellation token.
 222            /// </param>
 223            public static async Task<JobSubmissionJsonResponse> SubmitMapReduceJobAsync(this IJobOperations operations, 
 224            {
 0225                using (var _result = await operations.SubmitMapReduceJobWithHttpMessagesAsync(content, null, cancellatio
 226                {
 0227                    return _result.Body;
 228                }
 0229            }
 230
 231            /// <summary>
 232            /// Submits a MapReduce streaming job to an HDInsight cluster.
 233            /// </summary>
 234            /// <param name='operations'>
 235            /// The operations group for this extension method.
 236            /// </param>
 237            /// <param name='content'>
 238            /// The content of the MapReduce job request.
 239            /// </param>
 240            public static JobSubmissionJsonResponse SubmitMapReduceStreamingJob(this IJobOperations operations, Stream c
 241            {
 0242                return operations.SubmitMapReduceStreamingJobAsync(content).GetAwaiter().GetResult();
 243            }
 244
 245            /// <summary>
 246            /// Submits a MapReduce streaming job to an HDInsight cluster.
 247            /// </summary>
 248            /// <param name='operations'>
 249            /// The operations group for this extension method.
 250            /// </param>
 251            /// <param name='content'>
 252            /// The content of the MapReduce job request.
 253            /// </param>
 254            /// <param name='cancellationToken'>
 255            /// The cancellation token.
 256            /// </param>
 257            public static async Task<JobSubmissionJsonResponse> SubmitMapReduceStreamingJobAsync(this IJobOperations ope
 258            {
 0259                using (var _result = await operations.SubmitMapReduceStreamingJobWithHttpMessagesAsync(content, null, ca
 260                {
 0261                    return _result.Body;
 262                }
 0263            }
 264
 265            /// <summary>
 266            /// Submits a Pig job to an HDInsight cluster.
 267            /// </summary>
 268            /// <param name='operations'>
 269            /// The operations group for this extension method.
 270            /// </param>
 271            /// <param name='content'>
 272            /// The content of the Pig job request.
 273            /// </param>
 274            public static JobSubmissionJsonResponse SubmitPigJob(this IJobOperations operations, Stream content)
 275            {
 0276                return operations.SubmitPigJobAsync(content).GetAwaiter().GetResult();
 277            }
 278
 279            /// <summary>
 280            /// Submits a Pig job to an HDInsight cluster.
 281            /// </summary>
 282            /// <param name='operations'>
 283            /// The operations group for this extension method.
 284            /// </param>
 285            /// <param name='content'>
 286            /// The content of the Pig job request.
 287            /// </param>
 288            /// <param name='cancellationToken'>
 289            /// The cancellation token.
 290            /// </param>
 291            public static async Task<JobSubmissionJsonResponse> SubmitPigJobAsync(this IJobOperations operations, Stream
 292            {
 0293                using (var _result = await operations.SubmitPigJobWithHttpMessagesAsync(content, null, cancellationToken
 294                {
 0295                    return _result.Body;
 296                }
 0297            }
 298
 299            /// <summary>
 300            /// Submits a Sqoop job to an HDInsight cluster.
 301            /// </summary>
 302            /// <param name='operations'>
 303            /// The operations group for this extension method.
 304            /// </param>
 305            /// <param name='content'>
 306            /// The content of the Sqoop job request.
 307            /// </param>
 308            public static JobSubmissionJsonResponse SubmitSqoopJob(this IJobOperations operations, Stream content)
 309            {
 0310                return operations.SubmitSqoopJobAsync(content).GetAwaiter().GetResult();
 311            }
 312
 313            /// <summary>
 314            /// Submits a Sqoop job to an HDInsight cluster.
 315            /// </summary>
 316            /// <param name='operations'>
 317            /// The operations group for this extension method.
 318            /// </param>
 319            /// <param name='content'>
 320            /// The content of the Sqoop job request.
 321            /// </param>
 322            /// <param name='cancellationToken'>
 323            /// The cancellation token.
 324            /// </param>
 325            public static async Task<JobSubmissionJsonResponse> SubmitSqoopJobAsync(this IJobOperations operations, Stre
 326            {
 0327                using (var _result = await operations.SubmitSqoopJobWithHttpMessagesAsync(content, null, cancellationTok
 328                {
 0329                    return _result.Body;
 330                }
 0331            }
 332
 333            /// <summary>
 334            /// Gets application state from the specified HDInsight cluster.
 335            /// </summary>
 336            /// <param name='operations'>
 337            /// The operations group for this extension method.
 338            /// </param>
 339            /// <param name='appId'>
 340            /// The id of the job.
 341            /// </param>
 342            public static AppState GetAppState(this IJobOperations operations, string appId)
 343            {
 0344                return operations.GetAppStateAsync(appId).GetAwaiter().GetResult();
 345            }
 346
 347            /// <summary>
 348            /// Gets application state from the specified HDInsight cluster.
 349            /// </summary>
 350            /// <param name='operations'>
 351            /// The operations group for this extension method.
 352            /// </param>
 353            /// <param name='appId'>
 354            /// The id of the job.
 355            /// </param>
 356            /// <param name='cancellationToken'>
 357            /// The cancellation token.
 358            /// </param>
 359            public static async Task<AppState> GetAppStateAsync(this IJobOperations operations, string appId, Cancellati
 360            {
 406361                using (var _result = await operations.GetAppStateWithHttpMessagesAsync(appId, null, cancellationToken).C
 362                {
 406363                    return _result.Body;
 364                }
 406365            }
 366
 367            /// <summary>
 368            /// List all spark batch jobs
 369            /// </summary>
 370            /// <param name='operations'>
 371            /// The operations group for this extension method.
 372            /// </param>
 373            /// <param name='fromParameter'>
 374            /// Optional param specifying which index the list should begin from.
 375            /// </param>
 376            /// <param name='size'>
 377            /// Optional param specifying the size of the returned list.
 378            /// By default it is 20 and that is the maximum.
 379            /// </param>
 380            public static SparkBatchJobCollection ListSparkBatchJob(this IJobOperations operations, int? fromParameter =
 381            {
 10382                return operations.ListSparkBatchJobAsync(fromParameter, size).GetAwaiter().GetResult();
 383            }
 384
 385            /// <summary>
 386            /// List all spark batch jobs
 387            /// </summary>
 388            /// <param name='operations'>
 389            /// The operations group for this extension method.
 390            /// </param>
 391            /// <param name='fromParameter'>
 392            /// Optional param specifying which index the list should begin from.
 393            /// </param>
 394            /// <param name='size'>
 395            /// Optional param specifying the size of the returned list.
 396            /// By default it is 20 and that is the maximum.
 397            /// </param>
 398            /// <param name='cancellationToken'>
 399            /// The cancellation token.
 400            /// </param>
 401            public static async Task<SparkBatchJobCollection> ListSparkBatchJobAsync(this IJobOperations operations, int
 402            {
 10403                using (var _result = await operations.ListSparkBatchJobWithHttpMessagesAsync(fromParameter, size, null, 
 404                {
 10405                    return _result.Body;
 406                }
 10407            }
 408
 409            /// <summary>
 410            /// Create a new spark batch job.
 411            /// </summary>
 412            /// <param name='operations'>
 413            /// The operations group for this extension method.
 414            /// </param>
 415            /// <param name='sparkBatchJobRequest'>
 416            /// Livy compatible batch job request payload.
 417            /// </param>
 418            /// <param name='requestedBy'>
 419            /// Add default value for X-Requested-By in header.
 420            /// </param>
 421            public static SparkBatchJob SubmitSparkBatchJob(this IJobOperations operations, SparkBatchJobRequest sparkBa
 422            {
 6423                return operations.SubmitSparkBatchJobAsync(sparkBatchJobRequest, requestedBy).GetAwaiter().GetResult();
 424            }
 425
 426            /// <summary>
 427            /// Create a new spark batch job.
 428            /// </summary>
 429            /// <param name='operations'>
 430            /// The operations group for this extension method.
 431            /// </param>
 432            /// <param name='sparkBatchJobRequest'>
 433            /// Livy compatible batch job request payload.
 434            /// </param>
 435            /// <param name='requestedBy'>
 436            /// Add default value for X-Requested-By in header.
 437            /// </param>
 438            /// <param name='cancellationToken'>
 439            /// The cancellation token.
 440            /// </param>
 441            public static async Task<SparkBatchJob> SubmitSparkBatchJobAsync(this IJobOperations operations, SparkBatchJ
 442            {
 6443                using (var _result = await operations.SubmitSparkBatchJobWithHttpMessagesAsync(sparkBatchJobRequest, req
 444                {
 6445                    return _result.Body;
 446                }
 6447            }
 448
 449            /// <summary>
 450            /// Gets a single spark batch job.
 451            /// </summary>
 452            /// <param name='operations'>
 453            /// The operations group for this extension method.
 454            /// </param>
 455            /// <param name='batchId'>
 456            /// Identifier for the batch job.
 457            /// </param>
 458            public static SparkBatchJob GetSparkBatchJob(this IJobOperations operations, int batchId)
 459            {
 2460                return operations.GetSparkBatchJobAsync(batchId).GetAwaiter().GetResult();
 461            }
 462
 463            /// <summary>
 464            /// Gets a single spark batch job.
 465            /// </summary>
 466            /// <param name='operations'>
 467            /// The operations group for this extension method.
 468            /// </param>
 469            /// <param name='batchId'>
 470            /// Identifier for the batch job.
 471            /// </param>
 472            /// <param name='cancellationToken'>
 473            /// The cancellation token.
 474            /// </param>
 475            public static async Task<SparkBatchJob> GetSparkBatchJobAsync(this IJobOperations operations, int batchId, C
 476            {
 2477                using (var _result = await operations.GetSparkBatchJobWithHttpMessagesAsync(batchId, null, cancellationT
 478                {
 2479                    return _result.Body;
 480                }
 2481            }
 482
 483            /// <summary>
 484            /// Cancels a running spark batch job.
 485            /// </summary>
 486            /// <param name='operations'>
 487            /// The operations group for this extension method.
 488            /// </param>
 489            /// <param name='batchId'>
 490            /// Identifier for the batch job.
 491            /// </param>
 492            /// <param name='requestedBy'>
 493            /// Add default value for X-Requested-By in header.
 494            /// </param>
 495            public static SparkJobDeletedResult DeleteSparkBatchJob(this IJobOperations operations, int batchId, string 
 496            {
 2497                return operations.DeleteSparkBatchJobAsync(batchId, requestedBy).GetAwaiter().GetResult();
 498            }
 499
 500            /// <summary>
 501            /// Cancels a running spark batch job.
 502            /// </summary>
 503            /// <param name='operations'>
 504            /// The operations group for this extension method.
 505            /// </param>
 506            /// <param name='batchId'>
 507            /// Identifier for the batch job.
 508            /// </param>
 509            /// <param name='requestedBy'>
 510            /// Add default value for X-Requested-By in header.
 511            /// </param>
 512            /// <param name='cancellationToken'>
 513            /// The cancellation token.
 514            /// </param>
 515            public static async Task<SparkJobDeletedResult> DeleteSparkBatchJobAsync(this IJobOperations operations, int
 516            {
 2517                using (var _result = await operations.DeleteSparkBatchJobWithHttpMessagesAsync(batchId, requestedBy, nul
 518                {
 2519                    return _result.Body;
 520                }
 2521            }
 522
 523            /// <summary>
 524            /// Gets a single spark batch job logs.
 525            /// </summary>
 526            /// <param name='operations'>
 527            /// The operations group for this extension method.
 528            /// </param>
 529            /// <param name='batchId'>
 530            /// Identifier for the batch job.
 531            /// </param>
 532            /// <param name='fromParameter'>
 533            /// Optional param specifying which index the list should begin from.
 534            /// </param>
 535            /// <param name='size'>
 536            /// Optional param specifying the size of the returned list.
 537            /// By default it is 20 and that is the maximum.
 538            /// </param>
 539            public static SparkJobLog GetSparkBatchLog(this IJobOperations operations, int batchId, int? fromParameter =
 540            {
 0541                return operations.GetSparkBatchLogAsync(batchId, fromParameter, size).GetAwaiter().GetResult();
 542            }
 543
 544            /// <summary>
 545            /// Gets a single spark batch job logs.
 546            /// </summary>
 547            /// <param name='operations'>
 548            /// The operations group for this extension method.
 549            /// </param>
 550            /// <param name='batchId'>
 551            /// Identifier for the batch job.
 552            /// </param>
 553            /// <param name='fromParameter'>
 554            /// Optional param specifying which index the list should begin from.
 555            /// </param>
 556            /// <param name='size'>
 557            /// Optional param specifying the size of the returned list.
 558            /// By default it is 20 and that is the maximum.
 559            /// </param>
 560            /// <param name='cancellationToken'>
 561            /// The cancellation token.
 562            /// </param>
 563            public static async Task<SparkJobLog> GetSparkBatchLogAsync(this IJobOperations operations, int batchId, int
 564            {
 0565                using (var _result = await operations.GetSparkBatchLogWithHttpMessagesAsync(batchId, fromParameter, size
 566                {
 0567                    return _result.Body;
 568                }
 0569            }
 570
 571            /// <summary>
 572            /// Gets a single spark batch state.
 573            /// </summary>
 574            /// <param name='operations'>
 575            /// The operations group for this extension method.
 576            /// </param>
 577            /// <param name='batchId'>
 578            /// Identifier for the batch job.
 579            /// </param>
 580            public static SparkJobState GetSparkBatchState(this IJobOperations operations, int batchId)
 581            {
 0582                return operations.GetSparkBatchStateAsync(batchId).GetAwaiter().GetResult();
 583            }
 584
 585            /// <summary>
 586            /// Gets a single spark batch state.
 587            /// </summary>
 588            /// <param name='operations'>
 589            /// The operations group for this extension method.
 590            /// </param>
 591            /// <param name='batchId'>
 592            /// Identifier for the batch job.
 593            /// </param>
 594            /// <param name='cancellationToken'>
 595            /// The cancellation token.
 596            /// </param>
 597            public static async Task<SparkJobState> GetSparkBatchStateAsync(this IJobOperations operations, int batchId,
 598            {
 0599                using (var _result = await operations.GetSparkBatchStateWithHttpMessagesAsync(batchId, null, cancellatio
 600                {
 0601                    return _result.Body;
 602                }
 0603            }
 604
 605            /// <summary>
 606            /// List all spark sessions.
 607            /// </summary>
 608            /// <param name='operations'>
 609            /// The operations group for this extension method.
 610            /// </param>
 611            /// <param name='fromParameter'>
 612            /// Optional param specifying which index the list should begin from.
 613            /// </param>
 614            /// <param name='size'>
 615            /// Optional param specifying the size of the returned list.
 616            /// By default it is 20 and that is the maximum.
 617            /// </param>
 618            public static SparkSessionCollection ListSparkSessionJob(this IJobOperations operations, int? fromParameter 
 619            {
 10620                return operations.ListSparkSessionJobAsync(fromParameter, size).GetAwaiter().GetResult();
 621            }
 622
 623            /// <summary>
 624            /// List all spark sessions.
 625            /// </summary>
 626            /// <param name='operations'>
 627            /// The operations group for this extension method.
 628            /// </param>
 629            /// <param name='fromParameter'>
 630            /// Optional param specifying which index the list should begin from.
 631            /// </param>
 632            /// <param name='size'>
 633            /// Optional param specifying the size of the returned list.
 634            /// By default it is 20 and that is the maximum.
 635            /// </param>
 636            /// <param name='cancellationToken'>
 637            /// The cancellation token.
 638            /// </param>
 639            public static async Task<SparkSessionCollection> ListSparkSessionJobAsync(this IJobOperations operations, in
 640            {
 10641                using (var _result = await operations.ListSparkSessionJobWithHttpMessagesAsync(fromParameter, size, null
 642                {
 10643                    return _result.Body;
 644                }
 10645            }
 646
 647            /// <summary>
 648            /// Create a new spark session.
 649            /// </summary>
 650            /// <param name='operations'>
 651            /// The operations group for this extension method.
 652            /// </param>
 653            /// <param name='sparkSessionJobRequest'>
 654            /// Livy compatible session job request payload.
 655            /// </param>
 656            /// <param name='requestedBy'>
 657            /// Add default value for X-Requested-By in header.
 658            /// </param>
 659            public static SparkSessionJob SubmitSparkSessionJob(this IJobOperations operations, SparkSessionJobRequest s
 660            {
 8661                return operations.SubmitSparkSessionJobAsync(sparkSessionJobRequest, requestedBy).GetAwaiter().GetResult
 662            }
 663
 664            /// <summary>
 665            /// Create a new spark session.
 666            /// </summary>
 667            /// <param name='operations'>
 668            /// The operations group for this extension method.
 669            /// </param>
 670            /// <param name='sparkSessionJobRequest'>
 671            /// Livy compatible session job request payload.
 672            /// </param>
 673            /// <param name='requestedBy'>
 674            /// Add default value for X-Requested-By in header.
 675            /// </param>
 676            /// <param name='cancellationToken'>
 677            /// The cancellation token.
 678            /// </param>
 679            public static async Task<SparkSessionJob> SubmitSparkSessionJobAsync(this IJobOperations operations, SparkSe
 680            {
 8681                using (var _result = await operations.SubmitSparkSessionJobWithHttpMessagesAsync(sparkSessionJobRequest,
 682                {
 8683                    return _result.Body;
 684                }
 8685            }
 686
 687            /// <summary>
 688            /// Gets a single spark session.
 689            /// </summary>
 690            /// <param name='operations'>
 691            /// The operations group for this extension method.
 692            /// </param>
 693            /// <param name='sessionId'>
 694            /// Identifier for the session.
 695            /// </param>
 696            public static SparkSessionJob GetSparkSessionJob(this IJobOperations operations, int sessionId)
 697            {
 2698                return operations.GetSparkSessionJobAsync(sessionId).GetAwaiter().GetResult();
 699            }
 700
 701            /// <summary>
 702            /// Gets a single spark session.
 703            /// </summary>
 704            /// <param name='operations'>
 705            /// The operations group for this extension method.
 706            /// </param>
 707            /// <param name='sessionId'>
 708            /// Identifier for the session.
 709            /// </param>
 710            /// <param name='cancellationToken'>
 711            /// The cancellation token.
 712            /// </param>
 713            public static async Task<SparkSessionJob> GetSparkSessionJobAsync(this IJobOperations operations, int sessio
 714            {
 2715                using (var _result = await operations.GetSparkSessionJobWithHttpMessagesAsync(sessionId, null, cancellat
 716                {
 2717                    return _result.Body;
 718                }
 2719            }
 720
 721            /// <summary>
 722            /// Cancels a running spark session.
 723            /// </summary>
 724            /// <param name='operations'>
 725            /// The operations group for this extension method.
 726            /// </param>
 727            /// <param name='sessionId'>
 728            /// Identifier for the session.
 729            /// </param>
 730            /// <param name='requestedBy'>
 731            /// Add default value for X-Requested-By in header.
 732            /// </param>
 733            public static SparkJobDeletedResult DeleteSparkSessionJob(this IJobOperations operations, int sessionId, str
 734            {
 8735                return operations.DeleteSparkSessionJobAsync(sessionId, requestedBy).GetAwaiter().GetResult();
 736            }
 737
 738            /// <summary>
 739            /// Cancels a running spark session.
 740            /// </summary>
 741            /// <param name='operations'>
 742            /// The operations group for this extension method.
 743            /// </param>
 744            /// <param name='sessionId'>
 745            /// Identifier for the session.
 746            /// </param>
 747            /// <param name='requestedBy'>
 748            /// Add default value for X-Requested-By in header.
 749            /// </param>
 750            /// <param name='cancellationToken'>
 751            /// The cancellation token.
 752            /// </param>
 753            public static async Task<SparkJobDeletedResult> DeleteSparkSessionJobAsync(this IJobOperations operations, i
 754            {
 8755                using (var _result = await operations.DeleteSparkSessionJobWithHttpMessagesAsync(sessionId, requestedBy,
 756                {
 8757                    return _result.Body;
 758                }
 8759            }
 760
 761            /// <summary>
 762            /// Gets a single spark session job logs.
 763            /// </summary>
 764            /// <param name='operations'>
 765            /// The operations group for this extension method.
 766            /// </param>
 767            /// <param name='sessionId'>
 768            /// Identifier for the session job.
 769            /// </param>
 770            /// <param name='fromParameter'>
 771            /// Optional param specifying which index the list should begin from.
 772            /// </param>
 773            /// <param name='size'>
 774            /// Optional param specifying the size of the returned list.
 775            /// By default it is 20 and that is the maximum.
 776            /// </param>
 777            public static SparkJobLog GetSparkSessionLog(this IJobOperations operations, int sessionId, int? fromParamet
 778            {
 0779                return operations.GetSparkSessionLogAsync(sessionId, fromParameter, size).GetAwaiter().GetResult();
 780            }
 781
 782            /// <summary>
 783            /// Gets a single spark session job logs.
 784            /// </summary>
 785            /// <param name='operations'>
 786            /// The operations group for this extension method.
 787            /// </param>
 788            /// <param name='sessionId'>
 789            /// Identifier for the session job.
 790            /// </param>
 791            /// <param name='fromParameter'>
 792            /// Optional param specifying which index the list should begin from.
 793            /// </param>
 794            /// <param name='size'>
 795            /// Optional param specifying the size of the returned list.
 796            /// By default it is 20 and that is the maximum.
 797            /// </param>
 798            /// <param name='cancellationToken'>
 799            /// The cancellation token.
 800            /// </param>
 801            public static async Task<SparkJobLog> GetSparkSessionLogAsync(this IJobOperations operations, int sessionId,
 802            {
 0803                using (var _result = await operations.GetSparkSessionLogWithHttpMessagesAsync(sessionId, fromParameter, 
 804                {
 0805                    return _result.Body;
 806                }
 0807            }
 808
 809            /// <summary>
 810            /// Gets a single spark session job state.
 811            /// </summary>
 812            /// <param name='operations'>
 813            /// The operations group for this extension method.
 814            /// </param>
 815            /// <param name='sessionId'>
 816            /// Identifier for the session job.
 817            /// </param>
 818            public static SparkJobState GetSparkSessionState(this IJobOperations operations, int sessionId)
 819            {
 0820                return operations.GetSparkSessionStateAsync(sessionId).GetAwaiter().GetResult();
 821            }
 822
 823            /// <summary>
 824            /// Gets a single spark session job state.
 825            /// </summary>
 826            /// <param name='operations'>
 827            /// The operations group for this extension method.
 828            /// </param>
 829            /// <param name='sessionId'>
 830            /// Identifier for the session job.
 831            /// </param>
 832            /// <param name='cancellationToken'>
 833            /// The cancellation token.
 834            /// </param>
 835            public static async Task<SparkJobState> GetSparkSessionStateAsync(this IJobOperations operations, int sessio
 836            {
 0837                using (var _result = await operations.GetSparkSessionStateWithHttpMessagesAsync(sessionId, null, cancell
 838                {
 0839                    return _result.Body;
 840                }
 0841            }
 842
 843            /// <summary>
 844            /// Gets a list of statements within a spark session.
 845            /// </summary>
 846            /// <param name='operations'>
 847            /// The operations group for this extension method.
 848            /// </param>
 849            /// <param name='sessionId'>
 850            /// Identifier for the session.
 851            /// </param>
 852            public static SparkStatementCollection ListSparkStatementJob(this IJobOperations operations, int sessionId)
 853            {
 4854                return operations.ListSparkStatementJobAsync(sessionId).GetAwaiter().GetResult();
 855            }
 856
 857            /// <summary>
 858            /// Gets a list of statements within a spark session.
 859            /// </summary>
 860            /// <param name='operations'>
 861            /// The operations group for this extension method.
 862            /// </param>
 863            /// <param name='sessionId'>
 864            /// Identifier for the session.
 865            /// </param>
 866            /// <param name='cancellationToken'>
 867            /// The cancellation token.
 868            /// </param>
 869            public static async Task<SparkStatementCollection> ListSparkStatementJobAsync(this IJobOperations operations
 870            {
 4871                using (var _result = await operations.ListSparkStatementJobWithHttpMessagesAsync(sessionId, null, cancel
 872                {
 4873                    return _result.Body;
 874                }
 4875            }
 876
 877            /// <summary>
 878            /// Create a statement within a spark session.
 879            /// </summary>
 880            /// <param name='operations'>
 881            /// The operations group for this extension method.
 882            /// </param>
 883            /// <param name='sessionId'>
 884            /// Identifier for the session.
 885            /// </param>
 886            /// <param name='sparkStatementRequest'>
 887            /// Livy compatible batch job request payload.
 888            /// </param>
 889            /// <param name='requestedBy'>
 890            /// Add default value for X-Requested-By in header.
 891            /// </param>
 892            public static SparkStatement SubmitSparkStatementJob(this IJobOperations operations, int sessionId, SparkSta
 893            {
 2894                return operations.SubmitSparkStatementJobAsync(sessionId, sparkStatementRequest, requestedBy).GetAwaiter
 895            }
 896
 897            /// <summary>
 898            /// Create a statement within a spark session.
 899            /// </summary>
 900            /// <param name='operations'>
 901            /// The operations group for this extension method.
 902            /// </param>
 903            /// <param name='sessionId'>
 904            /// Identifier for the session.
 905            /// </param>
 906            /// <param name='sparkStatementRequest'>
 907            /// Livy compatible batch job request payload.
 908            /// </param>
 909            /// <param name='requestedBy'>
 910            /// Add default value for X-Requested-By in header.
 911            /// </param>
 912            /// <param name='cancellationToken'>
 913            /// The cancellation token.
 914            /// </param>
 915            public static async Task<SparkStatement> SubmitSparkStatementJobAsync(this IJobOperations operations, int se
 916            {
 2917                using (var _result = await operations.SubmitSparkStatementJobWithHttpMessagesAsync(sessionId, sparkState
 918                {
 2919                    return _result.Body;
 920                }
 2921            }
 922
 923            /// <summary>
 924            /// Gets a single statement within a spark session.
 925            /// </summary>
 926            /// <param name='operations'>
 927            /// The operations group for this extension method.
 928            /// </param>
 929            /// <param name='sessionId'>
 930            /// Identifier for the session.
 931            /// </param>
 932            /// <param name='statementId'>
 933            /// Identifier for the statement.
 934            /// </param>
 935            public static SparkStatement GetSparkStatementJob(this IJobOperations operations, int sessionId, int stateme
 936            {
 0937                return operations.GetSparkStatementJobAsync(sessionId, statementId).GetAwaiter().GetResult();
 938            }
 939
 940            /// <summary>
 941            /// Gets a single statement within a spark session.
 942            /// </summary>
 943            /// <param name='operations'>
 944            /// The operations group for this extension method.
 945            /// </param>
 946            /// <param name='sessionId'>
 947            /// Identifier for the session.
 948            /// </param>
 949            /// <param name='statementId'>
 950            /// Identifier for the statement.
 951            /// </param>
 952            /// <param name='cancellationToken'>
 953            /// The cancellation token.
 954            /// </param>
 955            public static async Task<SparkStatement> GetSparkStatementJobAsync(this IJobOperations operations, int sessi
 956            {
 0957                using (var _result = await operations.GetSparkStatementJobWithHttpMessagesAsync(sessionId, statementId, 
 958                {
 0959                    return _result.Body;
 960                }
 0961            }
 962
 963            /// <summary>
 964            /// Kill a statement within a session.
 965            /// </summary>
 966            /// <param name='operations'>
 967            /// The operations group for this extension method.
 968            /// </param>
 969            /// <param name='sessionId'>
 970            /// Identifier for the session.
 971            /// </param>
 972            /// <param name='statementId'>
 973            /// Identifier for the statement.
 974            /// </param>
 975            /// <param name='requestedBy'>
 976            /// Add default value for X-Requested-By in header.
 977            /// </param>
 978            public static SparkStatementCancellationResult DeleteSparkStatementJob(this IJobOperations operations, int s
 979            {
 2980                return operations.DeleteSparkStatementJobAsync(sessionId, statementId, requestedBy).GetAwaiter().GetResu
 981            }
 982
 983            /// <summary>
 984            /// Kill a statement within a session.
 985            /// </summary>
 986            /// <param name='operations'>
 987            /// The operations group for this extension method.
 988            /// </param>
 989            /// <param name='sessionId'>
 990            /// Identifier for the session.
 991            /// </param>
 992            /// <param name='statementId'>
 993            /// Identifier for the statement.
 994            /// </param>
 995            /// <param name='requestedBy'>
 996            /// Add default value for X-Requested-By in header.
 997            /// </param>
 998            /// <param name='cancellationToken'>
 999            /// The cancellation token.
 1000            /// </param>
 1001            public static async Task<SparkStatementCancellationResult> DeleteSparkStatementJobAsync(this IJobOperations 
 1002            {
 21003                using (var _result = await operations.DeleteSparkStatementJobWithHttpMessagesAsync(sessionId, statementI
 1004                {
 21005                    return _result.Body;
 1006                }
 21007            }
 1008
 1009    }
 1010}

Methods/Properties

SubmitHiveJob(...)
SubmitHiveJobAsync()
SubmitMapReduceJob(...)
SubmitMapReduceJobAsync()
SubmitMapReduceStreamingJob(...)
SubmitMapReduceStreamingJobAsync()
SubmitPigJob(...)
SubmitPigJobAsync()
SubmitSqoopJob(...)
SubmitSqoopJobAsync()
GetJobOutput(...)
GetJobOutputAsync(...)
GetJobErrorLogs(...)
GetJobErrorLogsAsync(...)
WaitForJobCompletion(...)
WaitForJobCompletionAsync()
Get(...)
GetAsync()
Kill(...)
KillAsync()
List(...)
ListAsync()
ListAfterJobId(...)
ListAfterJobIdAsync()
SubmitHiveJob(...)
SubmitHiveJobAsync()
SubmitMapReduceJob(...)
SubmitMapReduceJobAsync()
SubmitMapReduceStreamingJob(...)
SubmitMapReduceStreamingJobAsync()
SubmitPigJob(...)
SubmitPigJobAsync()
SubmitSqoopJob(...)
SubmitSqoopJobAsync()
GetAppState(...)
GetAppStateAsync()
ListSparkBatchJob(...)
ListSparkBatchJobAsync()
SubmitSparkBatchJob(...)
SubmitSparkBatchJobAsync()
GetSparkBatchJob(...)
GetSparkBatchJobAsync()
DeleteSparkBatchJob(...)
DeleteSparkBatchJobAsync()
GetSparkBatchLog(...)
GetSparkBatchLogAsync()
GetSparkBatchState(...)
GetSparkBatchStateAsync()
ListSparkSessionJob(...)
ListSparkSessionJobAsync()
SubmitSparkSessionJob(...)
SubmitSparkSessionJobAsync()
GetSparkSessionJob(...)
GetSparkSessionJobAsync()
DeleteSparkSessionJob(...)
DeleteSparkSessionJobAsync()
GetSparkSessionLog(...)
GetSparkSessionLogAsync()
GetSparkSessionState(...)
GetSparkSessionStateAsync()
ListSparkStatementJob(...)
ListSparkStatementJobAsync()
SubmitSparkStatementJob(...)
SubmitSparkStatementJobAsync()
GetSparkStatementJob(...)
GetSparkStatementJobAsync()
DeleteSparkStatementJob(...)
DeleteSparkStatementJobAsync()