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