From e8a9a69a2756f998f08c7b8452b84fd309921443 Mon Sep 17 00:00:00 2001 From: Vinayakumar B Date: Wed, 3 Feb 2016 10:33:33 +0530 Subject: [PATCH] HDFS-9739. DatanodeStorage.isValidStorageId() is broken (Contributed by Mingliang Liu) (cherry picked from commit d6b1acb940180befeb4c855d0e4a339dbc035e7d) --- .../apache/hadoop/hdfs/server/protocol/DatanodeStorage.java | 1 + hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ 2 files changed, 4 insertions(+) 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 770c41b33ab..de4ff252dc0 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 class DatanodeStorage { 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 2a14a29e01a..11a3191aeb3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1786,6 +1786,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