-
Notifications
You must be signed in to change notification settings - Fork 482
Update C# samples to the latest SDKs #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update C# samples to the latest SDKs #263
Conversation
|
@bgklein - for some reason I can't request a review from you -- maybe because you're not an admin of the repo. |
bgklein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a couple minor things
| /// <param name="dumpStandardOutOnTaskSuccess">True to log the standard output file of the task even if it succeeded. False to not log anything if the task succeeded.</param> | ||
| /// <returns>The string containing the standard out of the file, or null if stdout could not be gathered.</returns> | ||
| public static async Task<string> CheckForTaskSuccessAsync(CloudTask boundTask, bool dumpStandardOutOnTaskSuccess) | ||
| public static async Task CheckForTaskSuccessAsync(CloudTask boundTask, bool dumpStandardOutOnTaskSuccess) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this return something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to, it can just raise if the task failed.
I need to fix the comment though.
| private readonly string fileName; | ||
|
|
||
| /// <summary> | ||
| /// Constructs a mapper task object with the specified blob SAS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct method header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
CSharp/TextSearch/readme.md
Outdated
| ### About this sample | ||
| This map-reduce style sample uses Azure Batch to perform parallel text processing on an input file by splitting it up into multiple sub-files and performing regular expression matching on each sub-file. The results are then rolled-up into a final report by a reduction phase where it is uploaded to Azure Storage. | ||
| This map-reduce style sample uses Azure Batch to perform parallel text processing on an input file by splitting it up into multiple sub-files and performing regular expression matching on each sub-file. | ||
| This sample makes use of a variety of Azure Batch features, such as auto-pool functionality, task `ResourceFiles` for moving data into VMs, task `OutputFiles` for moving data out of VMs, and task dependencies for specifying tasks relationships to one another. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two new lines between new lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got rid of the line break actually as it's not really needed. The final text reads fine as one paragraph I think.
CSharp/Common/SampleHelpers.cs
Outdated
| /// </summary> | ||
| /// <param name="cloudStorageAccount">The cloud storage account.</param> | ||
| /// <param name="containerName">The container name to construct a SAS for.</param> | ||
| /// <returns>The container URL with the SAS.</returns> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix method header
CSharp/Common/SampleHelpers.cs
Outdated
| return containerSasUrl + "/" + blobName; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how I managed to do that, but good catch - fixed.
f0aa268 to
dfcf2d3
Compare
|
Thanks for reviewing @bgklein - I've updated according to your comments |
|
CI failure? |
CSharp/Common/SampleHelpers.cs
Outdated
| /// Upload a file as a blob. | ||
| /// </summary> | ||
| /// <param name="cloudStorageAccount">The cloud storage account to upload the file to.</param> | ||
| /// <param name="containerName">The name of the container to upload the blob to.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
container != containerName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops thought they were the same. Anyways missed this method header in my initial review
| ### [TextSearch](./TextSearch) | ||
| This map-reduce style sample uses Azure Batch to perform parallel text processing on an input file by splitting it up into multiple sub-files and performing regular expression matching on each sub-file. A Job Manager task is used to orchestrate the mapper and reducer tasks with the results rolled-up into a final report. See the readme in the source directory for more information. | ||
| This map-reduce style sample uses Azure Batch to perform parallel text processing on an input file by splitting it up into multiple sub-files and performing regular expression matching on each sub-file. | ||
| This sample makes use of a variety of Azure Batch features, such as auto-pool functionality, task `ResourceFiles` for moving data into VMs, task `OutputFiles` for moving data out of VMs, and task dependencies for specifying tasks relationships to one another. See the readme in the source directory for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is readme technically supposed to be lowercased or upper? I honestly don't know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like all upper? README?
I'm pretty sure we're not consistent, but I'll go fix casing to be the same as the actual file on disk (whatever case that is).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it's lowercase on disk there, so at least we're matching... I think I'll leave this as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, just kinda curious. As long as we are consistent its fine
CSharp/TextSearch/readme.md
Outdated
|
|
||
| #### JobManager | ||
| The job manager task submits mapper and reducer tasks and also monitors the status of those tasks. | ||
| Uploads the files required for the text processing to Azure Storage and submits a job to the Azure Batch service that utilizes the autopool functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autopool was previously auto-pool above. Make up your mind
bgklein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more minor things but otherwise looks good to me
dfcf2d3 to
672616b
Compare
- Use OutputFiles where it makes sense. - Use TaskDependencies in TextSearch, as it makes more sense than a JobManager for that case.
- Microsoft.Azure.Batch.FileStaging and
Microsoft.Azure.Batch.Conventions.Files.
672616b to
f2b4d49
Compare
Uh oh!
There was an error while loading. Please reload this page.