Comments (4)
Hi,
Which solution are you talking about specifically?
We will update the samples to 5.0.0 shortly, but in the meantime they are not targeting 5.0.0 they are targeting 4.0.1 (and thus they should all compile).
from azure-batch-samples.
Thanks. It's this one:
https://github.com/Azure/azure-batch-samples/tree/master/CSharp/ArticleProjects/DotNetTutorial
https://azure.microsoft.com/en-us/documentation/articles/batch-dotnet-get-started/
In 5.0.0, how should this line be re-written?
bool timedOut = await taskStateMonitor.WhenAllAsync(tasks, TaskState.Completed, timeout);
from azure-batch-samples.
Generally speaking we don't have the samples track the most up to date release immediately (it usually lags by a few days). During this time period the samples should still work against the version of the Azure.Batch package specified in their packages.config (which right now is 4.0.1).
Azure.Batch 5.0.0 just shipped last week, and we haven't updated the samples yet because there is a 5.0.1 coming (today). Once 5.0.1 drops later today we'll move all of the samples to 5.0.1, but that might not fully merge in for a few days because we have to coordinate an article update as well (otherwise the getting started article would get out of sync with its backing sample)
So in the interim I think your question really is, what should you change the broken line(s) to?
The code was this:
TaskStateMonitor taskStateMonitor = batchClient.Utilities.CreateTaskStateMonitor();
bool timedOut = await taskStateMonitor.WhenAllAsync(tasks, TaskState.Completed, timeout);
if (timedOut)
{
allTasksSuccessful = false;
await batchClient.JobOperations.TerminateJobAsync(jobId, failureMessage);
Console.WriteLine(failureMessage);
}
else
{
...
it should now be this in Azure.Batch 5.0.0:
TaskStateMonitor taskStateMonitor = batchClient.Utilities.CreateTaskStateMonitor();
try
{
await taskStateMonitor.WhenAll(tasks, TaskState.Completed, timeout);
}
catch (TimeoutException)
{
allTasksSuccessful = false;
await batchClient.JobOperations.TerminateJobAsync(jobId, failureMessage);
Console.WriteLine(failureMessage);
}
if (allTasksSuccessful)
{
...
As for your question 2, I believe that between Azure.Storage 6.2.0 and Azure.Storage 7.1.2 there was a breaking change which makes the two incompatible (see their release notes for more details but the key one is here):
- Blobs: Removed FileMode parameter for UploadFromFile* and AppendFromFile* APIs since there is only 1 valid option (FileMode.Open).
So I would suggest rolling back your Storage dll version to 6.2.0 unless there's a major need to use 7.1.2.
If you really do need 7.1.2 let us know and we can give some suggestions.
from azure-batch-samples.
Thanks very much.
The storage line affected is this:
await blobData.UploadFromFileAsync(filePath, FileMode.Open);
It can be fixed by changing this to:
await blobData.UploadFromFileAsync(filePath);
from azure-batch-samples.
Related Issues (20)
- "TypeError" exception when running sample1_helloword.py. HOT 1
- Cannot run CSharp/GettingStarted/01HelloWorld.csproj
- Java sample code fails to get batchUrl HOT 4
- C++ samples
- Access Linked Storage Account HOT 1
- add sample for Docker
- Azure batch -python running flask app in node and hitting it via flask
- How to upload applicationPackage to be installed on each node of the pool HOT 2
- 'BatchServiceClientConfiguration' object has no attribute 'signed_session'
- accountsettings null HOT 2
- Python Batch samples - please update to azure.storage.blob v12+ HOT 1
- CSharp/GettingStarted/02_PoolsAndResourceFiles throws NotFound for stdout.txt when run a 2nd time
- Hello world is insanely complex for a hello world
- How to use ILogger for AppInsights logs with azure batch
- Support for dotnet-sdk 3.1
- Loading mpi modules in Azure Batch with Ubuntu-hpc image
- Update samples to use VirtualMachineConfiguration
- BatchManagementClient example uses ADAL, which is out of support in December 2022 HOT 1
- OnAllTasksComplete.TerminateJob inconsistent
- Microsoft.Azure.Management.Batch - Deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-batch-samples.