在学习azure的时候,里面有个批量处理的例子,但在本人的机子上运行,一直运行到running的时候,中间就在wait报错,不知道是什么原因,搞了几天没搞定,求帮助。
// This code requires the Nuget package Microsoft.AspNet.WebApi.Client to be installed. // Instructions for doing this in Visual Studio: // Tools -> Nuget Package Manager -> Package Manager Console // Install-Package Microsoft.AspNet.WebApi.Client // // Also, add a reference to Microsoft.WindowsAzure.Storage.dll for reading from and writing to the Azure blob storage using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Net.Http; using System.Net.Http.Formatting; using System.Net.Http.Headers; using System.Runtime.Serialization; using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Blob; namespace CallBatchExecutionService { public class AzureBlobDataReference { // Storage connection string used for regular blobs. It has the following format: // DefaultEndpointsProtocol=https;AccountName=ACCOUNT_NAME;AccountKey=ACCOUNT_KEY // It"s not used for shared access signature blobs. public string ConnectionString { get; set; } // Relative uri for the blob, used for regular blobs as well as shared access // signature blobs. public string RelativeLocation { get; set; } // Base url, only used for shared access signature blobs. public string BaseLocation { get; set; } // Shared access signature, only used for shared access signature blobs. public string SasBlobToken { get; set; } } public enum BatchScoreStatusCode { NotStarted, Running, Failed, Cancelled, Finished } public class BatchScoreStatus { // Status code for the batch scoring job public BatchScoreStatusCode StatusCode { get; set; } // Locations for the potential multiple batch scoring outputs public IDictionary<string, AzureBlobDataReference> Results { get; set; } // Error details, if any public string Details { get; set; } } public class BatchExecutionRequest { public IDictionary<string, AzureBlobDataReference> Inputs { get; set; } public IDictionary<string, string> GlobalParameters { get; set; } // Locations for the potential multiple batch scoring outputs public IDictionary<string, AzureBlobDataReference> Outputs { get; set; } } }
解决方案
200
估计没多少人专门去研究Azure,毕竟在国内都无法使用的