Exemple #1
0
 /// <summary>
 /// Submits a Hive job to an HDInsight cluster.
 /// </summary>
 /// <param name='parameters'>
 /// Required. Hive job parameters.
 /// </param>
 /// <returns>
 /// The Create Job operation response.
 /// </returns>
 public async Task <AzureOperationResponse <JobSubmissionJsonResponse> > SubmitHiveJobWithHttpMessagesAsync(HiveJobSubmissionParameters parameters, Dictionary <string, List <string> > customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var requestContents = new MemoryStream(Encoding.UTF8.GetBytes(parameters.GetJobPostRequestContent())))
     {
         return(await SubmitHiveJobWithHttpMessagesAsync(requestContents, customHeaders, cancellationToken).ConfigureAwait(false));
     }
 }
 /// <summary>
 /// Submits a Hive job to an HDInsight cluster.
 /// </summary>
 /// <param name='parameters'>
 /// Required. Hive job parameters.
 /// </param>
 /// <returns>
 /// The Create Job operation response.
 /// </returns>
 public async Task <JobSubmissionResponse> SubmitHiveJobAsync(HiveJobSubmissionParameters parameters)
 {
     return(await SubmitHiveJobAsync(new JobSubmissionParameters { Content = parameters.GetJobPostRequestContent() }, CancellationToken.None));
 }
Exemple #3
0
 /// <summary>
 /// Submits a Hive job to an HDInsight cluster.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.HDInsight.Job.IJobOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Hive job parameters.
 /// </param>
 /// <returns>
 /// The Create Job operation response.
 /// </returns>
 public static JobSubmissionResponse SubmitHiveJob(this IJobOperations operations, HiveJobSubmissionParameters parameters)
 {
     return(operations.SubmitHiveJob(new JobSubmissionParameters {
         Content = parameters.GetJobPostRequestContent()
     }));
 }