From 4846ca7863e72e0469fc4b8e5d0ee401f779374b Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Mon, 24 Oct 2011 23:07:13 +0000 Subject: [PATCH] HDFS-2497 Fix TestBackupNode failure. Contributed by Suresh Srinivas. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1188436 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 5 ++++- .../protocolR23Compatible/NamenodeRegistrationWritable.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 5dc1dadf10..af5af3e648 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -147,7 +147,10 @@ Trunk (unreleased changes) getDefaultBlockSize() and getDefaultReplication() in WebHdfsFileSystem and cleared content type in ExceptionHandler. (szetszwo) - HDFS-2481 Unknown protocol: org.apache.hadoop.hdfs.protocol.ClientProtocol (sanjay) + HDFS-2481 Unknown protocol: org.apache.hadoop.hdfs.protocol.ClientProtocol. + (sanjay) + + HDFS-2497 Fix TestBackupNode failure. (suresh) Release 0.23.0 - Unreleased diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/NamenodeRegistrationWritable.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/NamenodeRegistrationWritable.java index 4ad1c31781..46fe720af7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/NamenodeRegistrationWritable.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/NamenodeRegistrationWritable.java @@ -82,13 +82,13 @@ public void readFields(DataInput in) throws IOException { rpcAddress = Text.readString(in); httpAddress = Text.readString(in); role = NamenodeRole.valueOf(Text.readString(in)); + storageInfo = new StorageInfoWritable(); storageInfo.readFields(in); } public static NamenodeRegistrationWritable convert(NamenodeRegistration reg) { return new NamenodeRegistrationWritable(reg.getAddress(), - reg.getHttpAddress(), reg.getRole(), - reg); + reg.getHttpAddress(), reg.getRole(), reg); } public NamenodeRegistration convert() {