diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeStorage.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeStorage.java index 770c41b33a..de4ff252dc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeStorage.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeStorage.java @@ -93,6 +93,7 @@ public static boolean isValidStorageId(final String storageID) { try { // Attempt to parse the UUID. if (storageID != null && storageID.indexOf(STORAGE_ID_PREFIX) == 0) { + UUID.fromString(storageID.substring(STORAGE_ID_PREFIX.length())); return true; } } catch (IllegalArgumentException ignored) { diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 61b95444be..4eabce534e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2690,6 +2690,9 @@ Release 2.8.0 - UNRELEASED HDFS-9718. HAUtil#getConfForOtherNodes should unset independent generic keys before initialize (DENG FEI via vinayakumarb) + HDFS-9739. DatanodeStorage.isValidStorageId() is broken + (Mingliang Liu via vinayakumarb) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES