exam questions

Exam AZ-203 All Questions

View all questions & answers for the AZ-203 exam

Exam AZ-203 topic 1 question 2 discussion

Actual exam question from Microsoft's AZ-203
Question #: 2
Topic #: 1
[All AZ-203 Questions]

You are writing code to create and run an Azure Batch job.
You have created a pool of compute nodes.
You need to choose the right class and its method to submit a batch job to the Batch service.
Which method should you use?

  • A. JobOperations.EnableJobAsync(String, IEnumerable<BatchClientBehavior>,CancellationToken)
  • B. JobOperations.CreateJob()
  • C. CloudJob.Enable(IEnumerable<BatchClientBehavior>)
  • D. JobOperations.EnableJob(String,IEnumerable<BatchClientBehavior>)
  • E. CloudJob.CommitAsync(IEnumerable<BatchClientBehavior>, CancellationToken)
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️
A Batch job is a logical grouping of one or more tasks. A job includes settings common to the tasks, such as priority and the pool to run tasks on. The app uses the
BatchClient.JobOperations.CreateJob method to create a job on your pool.
The Commit method submits the job to the Batch service. Initially the job has no tasks.
{
CloudJob job = batchClient.JobOperations.CreateJob();
job.Id = JobId;
job.PoolInformation = new PoolInformation { PoolId = PoolId }; job.Commit();
}
...
References:
https://docs.microsoft.com/en-us/azure/batch/quick-run-dotnet

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
justanotherusername
Highly Voted 5 years, 3 months ago
E is the answer, JobOperations.CreateJob() creates a job that has not been submitted to the Batch service, the question asks for the method that SUBMITS the job to the service.
upvoted 23 times
Juanlu
4 years, 4 months ago
Agree !
upvoted 3 times
...
...
lywwind
Highly Voted 5 years, 3 months ago
Answer is E https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.batch.cloudjob.commitasync?view=azure-dotnet Commits this CloudJob to the Azure Batch service.
upvoted 13 times
...
Larry88
Most Recent 4 years, 7 months ago
tested below code, answer is E try { CloudJob job = batchClient.JobOperations.CreateJob(); job.Id = JobId; job.PoolInformation = new PoolInformation { PoolId = PoolId }; job.CommitAsync(); }
upvoted 2 times
...
Larry88
4 years, 7 months ago
tested below code, answer is E try { CloudPool pool = batchClient.PoolOperations.CreatePool( poolId: PoolId, targetDedicatedComputeNodes: PoolNodeCount, virtualMachineSize: PoolVMSize, virtualMachineConfiguration: vmConfiguration); pool.CommitAsync(); }
upvoted 2 times
...
navaneeth
4 years, 8 months ago
B doesn't make sense.It Clears says Submits the job.How come B?
upvoted 1 times
...
sathish11
4 years, 9 months ago
Correct answer is E
upvoted 1 times
...
tim291
4 years, 9 months ago
Yes E is correct
upvoted 1 times
...
gssicftohbcrcsgtjg
5 years, 2 months ago
E is correct https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.batch.cloudjob.commitasync?view=azure-dotnet The Commit method submits the job to the Batch service https://docs.microsoft.com/en-us/azure/batch/quick-run-dotnet
upvoted 10 times
...
JohnyT
5 years, 3 months ago
The question is about submitting the job, so answer E.
upvoted 13 times
...
Nagarajan
5 years, 3 months ago
Answer is B and E
upvoted 2 times
...
PraPat
5 years, 3 months ago
Yes, ANS is B. Check https://docs.microsoft.com/en-us/azure/batch/quick-run-dotnet
upvoted 1 times
...
AzureGC
5 years, 3 months ago
Answer # does NOT match the solution description; The correct answer should be "B"., https://docs.microsoft.com/en-us/azure/batch/quick-run-dotnet#review-the-code
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago