/// <inheritdoc /> public async Task <JobCreationResults> SubmitPigJob(PigJobCreateParameters pigJobCreateParameters) { //NEIN: Any code modification here should add unit tests for this class var converter = new PayloadConverter(); var payload = converter.SerializePigRequest(this.credentials.UserName, pigJobCreateParameters); var client = ServiceLocator.Instance.Locate <IHadoopRemoteJobSubmissionRestClientFactory>().Create(this.credentials, this.context, this.ignoreSslErrors, this.GetUserAgentString()); var result = await client.SubmitPigJob(payload); return(new JobCreationResults() { JobId = converter.DeserializeJobSubmissionResponse(result.Content) }); }
/// <inheritdoc /> public async Task<JobCreationResults> SubmitPigJob(PigJobCreateParameters pigJobCreateParameters) { //NEIN: Any code modification here should add unit tests for this class var converter = new PayloadConverter(); var payload = converter.SerializePigRequest(this.credentials.UserName, pigJobCreateParameters); var client = ServiceLocator.Instance.Locate<IHadoopRemoteJobSubmissionRestClientFactory>().Create(this.credentials, this.context, this.ignoreSslErrors, this.GetUserAgentString()); var result = await client.SubmitPigJob(payload); return new JobCreationResults() { JobId = converter.DeserializeJobSubmissionResponse(result.Content) }; }