Selaa lähdekoodia

HDFS-11571. Typo in DataStorage exception message (Contributed by Anna Budai via Daniel Templeton)

(cherry picked from commit 15e3873dc3d46016344887570e5d4aa8d20ca264)
Daniel Templeton 8 vuotta sitten
vanhempi
commit
e00ad6fca5

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java

@@ -554,7 +554,7 @@ public class DataStorage extends Storage {
   void recoverTransitionRead(DataNode datanode, NamespaceInfo nsInfo,
       Collection<StorageLocation> dataDirs, StartupOption startOpt) throws IOException {
     if (addStorageLocations(datanode, nsInfo, dataDirs, startOpt).isEmpty()) {
-      throw new IOException("All specified directories are failed to load.");
+      throw new IOException("All specified directories have failed to load.");
     }
   }
 

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataStorage.java

@@ -201,7 +201,7 @@ public class TestDataStorage {
       fail("An IOException should throw: all StorageLocations are NON_EXISTENT");
     } catch (IOException e) {
       GenericTestUtils.assertExceptionContains(
-          "All specified directories are failed to load.", e);
+          "All specified directories have failed to load.", e);
     }
     assertEquals(0, storage.getNumStorageDirs());
   }