我使用FileSystemOperationsExtensions.Open返回Stream的方法,我可以從中讀取數據。 有時,當服務從流中讀取大文件(〜150-300 MB)服務得到以下情況除外:Azure Data Lake Store - 從文件讀取時出錯
System.IO.IOException: The read operation failed, see inner exception. ---> System.Net.WebException: The request was aborted: The request was canceled.
at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Http.HttpClientHandler.WebExceptionWrapperStream.Read(Byte[] buffer, Int32 offset, Int32 count)
"ClassName": "System.IO.IOException",
"Message": "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)\r\n
at System.Net.Http.HttpClientHandler.WebExceptionWrapperStream.Read(Byte[] buffer, Int32 offset, Int32 count)
而且它是隨機發生的。 另外,我創建了DataLakeStoreFileSystemManagementClient類的對象,其中有60分鐘的超時時間,但這些錯誤發生在它之前。 它可能需要3,10,20或任何分鐘。 當然,我可以重新讀取偏移量,但它需要額外的開發時間。 也許有另一種方法來避免這些例外。 有人可以幫我嗎?
回答了這個問題:http://stackoverflow.com/questions/43400730/azure-data- lake-store-existing-connection-was-force-by-the-remote-ho –