hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lo...@apache.org
Subject svn commit: r746891 - in /hadoop/core/trunk: CHANGES.txt src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java
Date Mon, 23 Feb 2009 05:44:05 GMT
Author: lohit
Date: Mon Feb 23 05:44:04 2009
New Revision: 746891

URL: http://svn.apache.org/viewvc?rev=746891&view=rev
Log:
HADOOP-5292. Fix NPE in KFS::getBlockLocations. (Sriram Rao via lohit)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=746891&r1=746890&r2=746891&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Feb 23 05:44:04 2009
@@ -203,6 +203,8 @@
     HADOOP-5227. Fix distcp so -update and -delete can be meaningfully
     combined. (Tsz Wo (Nicholas), SZE via cdouglas)
 
+    HADOOP-5292. Fix NPE in KFS::getBlockLocations. (Sriram Rao via lohit)
+
 Release 0.20.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java?rev=746891&r1=746890&r2=746891&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/kfs/KosmosFileSystem.java Mon Feb 23 05:44:04
2009
@@ -291,6 +291,9 @@
       }
       String srep = makeAbsolute(file.getPath()).toUri().getPath();
       String[][] hints = kfsImpl.getDataLocation(srep, start, len);
+      if (hints == null) {
+        return null;
+      }
       BlockLocation[] result = new BlockLocation[hints.length];
       long blockSize = getDefaultBlockSize();
       long length = len;



Mime
View raw message