コード例 #1
0
        public async Task <JobCreationResults> SubmitSqoopJob(SqoopJobCreateParameters sqoopJobCreateParameters)
        {
            //NEIN: Any code modification here should add unit tests for this class
            var converter = new PayloadConverter();
            var payload   = converter.SerializeSqoopRequest(this.credentials.UserName, sqoopJobCreateParameters);
            var client    = ServiceLocator.Instance.Locate <IHadoopRemoteJobSubmissionRestClientFactory>().Create(this.credentials, this.context, this.ignoreSslErrors, this.GetUserAgentString());
            var result    = await client.SubmitSqoopJob(payload);

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