[REEF-2018] DataLakeFileSystem does not show adequate exception messages

When there are errors in uploading and downloading, the ADLS file system
constructs an error message using the error messages passed from the
adls client.

JIRA:
  [REEF-2018](https://issues.apache.org/jira/browse/REEF-2018)

Pull Request:
  This closes #1462
diff --git a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureDataLake/AzureDataLakeFileSystem.cs b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureDataLake/AzureDataLakeFileSystem.cs
index 39d1f04..74dd70e 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureDataLake/AzureDataLakeFileSystem.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureDataLake/AzureDataLakeFileSystem.cs
@@ -19,6 +19,7 @@
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using System.Text;
 using Microsoft.Azure.DataLake.Store;
 using Microsoft.Azure.DataLake.Store.FileTransfer;
 using Org.Apache.REEF.Tang.Annotations;
@@ -122,7 +123,13 @@
             }
             if (status.EntriesFailed.Count != 0)
             {
-                throw new IOException($"{status.EntriesFailed.Count} entries did not get transferred correctly");
+                var failedEntriesBuilder = new StringBuilder();
+                for (int i = 0; i < status.EntriesFailed.Count && i < 50; i++)
+                {
+                    var entry = status.EntriesFailed[i];
+                    failedEntriesBuilder.Append($"Entry {entry.EntryName} failed with error message {entry.Errors}. ");
+                }
+                throw new IOException($"{status.EntriesFailed.Count} entries failed to download. {failedEntriesBuilder.ToString()}");
             }
         }
 
@@ -135,7 +142,7 @@
             TransferStatus status;
             try
             {
-                status = status = _adlsClient.BulkUpload(localFileName, remoteFileUri.AbsolutePath);
+                status = _adlsClient.BulkUpload(localFileName, remoteFileUri.AbsolutePath);
             }
             catch (Exception ex)
             {
@@ -143,7 +150,13 @@
             }
             if (status.EntriesFailed.Count != 0)
             {
-                throw new IOException($"{status.EntriesFailed.Count} entries did not get transferred correctly");
+                var failedEntriesBuilder = new StringBuilder();
+                for (int i = 0; i < status.EntriesFailed.Count && i < 50; i++)
+                {
+                    var entry = status.EntriesFailed[i];
+                    failedEntriesBuilder.Append($"Entry {entry.EntryName} failed with error message {entry.Errors}. ");
+                }
+                throw new IOException($"{status.EntriesFailed.Count} entries failed to upload. {failedEntriesBuilder.ToString()}");
             }
         }