From 1d96e3601312d771270567482cb0a051be786a21 Mon Sep 17 00:00:00 2001 From: Colin McCabe Date: Fri, 18 Oct 2013 20:20:20 +0000 Subject: [PATCH] HDFS-5388. Loading fsimage fails to find cache pools during namenode startup (Chris Nauroth via Colin Patrick McCabe) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-4949@1533616 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-4949.txt | 3 +++ .../org/apache/hadoop/hdfs/server/namenode/CacheManager.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-4949.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-4949.txt index b654ac448d..19825479b6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-4949.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-4949.txt @@ -101,3 +101,6 @@ HDFS-4949 (Unreleased) -replication parameter. (cnauroth) HDFS-5383. fix broken caching unit tests. (Andrew Wang) + + HDFS-5388. Loading fsimage fails to find cache pools during namenode + startup. (Chris Nauroth via Colin Patrick McCabe) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CacheManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CacheManager.java index 9661ae2155..da5b2f539a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CacheManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CacheManager.java @@ -742,7 +742,7 @@ private void loadEntries(DataInput in) throws IOException { String poolName = Text.readString(in); // Get pool reference by looking it up in the map CachePool pool = cachePools.get(poolName); - if (pool != null) { + if (pool == null) { throw new IOException("Entry refers to pool " + poolName + ", which does not exist."); }