/// <inheritdoc />
 public async Task<HadoopJobCreationResults> SubmitMapReduceJob(HadoopMapReduceJobCreationDetails details)
 {
     JobPayloadConverter converter = new JobPayloadConverter();
     using (var client = ServiceLocator.Instance.Locate<IHDInsightJobSubmissionRestClientFactory>().Create(this.credentials))
     {
         var payload = converter.SerializeJobCreationDetails(details);
         var result = await client.CreateJob(dnsName, location, payload);
         return converter.DeserializeJobCreationResults(result.Content);
     }
 }
Ejemplo n.º 2
0
 public void ICanSerializeAndDeserialzeCreationResults()
 {
     JobCreationResults expected = new JobCreationResults() { HttpStatusCode = HttpStatusCode.Accepted, JobId = "job123" };
     JobPayloadServerConverter ser = new JobPayloadServerConverter();
     JobPayloadConverter deser = new JobPayloadConverter();
     var payload = ser.SerializeJobCreationResults(expected);
     var actual = deser.DeserializeJobCreationResults(payload);
 }