incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tra...@apache.org
Subject svn commit: r1411936 - in /incubator/hcatalog/trunk: CHANGES.txt hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/HCatBaseLoader.java
Date Tue, 20 Nov 2012 23:56:19 GMT
Author: travis
Date: Tue Nov 20 23:56:17 2012
New Revision: 1411936

URL: http://svn.apache.org/viewvc?rev=1411936&view=rev
Log:
HCATALOG-530 HCatBaseLoader.getSizeInBytes NPE when partition path is missing

Modified:
    incubator/hcatalog/trunk/CHANGES.txt
    incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/HCatBaseLoader.java

Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1411936&r1=1411935&r2=1411936&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Tue Nov 20 23:56:17 2012
@@ -44,6 +44,8 @@ Trunk (unreleased changes)
   HCAT-427 Document storage-based authorization (lefty via gates)
 
   IMPROVEMENTS
+  HCAT-530 HCatBaseLoader.getSizeInBytes NPE when partition path is missing (traviscrawford)
+
   HCAT-518 Refactor hcatalog-core as subproject (traviscrawford and toffer)
 
   HCAT-548 Move topic creation in NotificationListener to a separate method (amalakar via
avandana)

Modified: incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/HCatBaseLoader.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/HCatBaseLoader.java?rev=1411936&r1=1411935&r2=1411936&view=diff
==============================================================================
--- incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/HCatBaseLoader.java
(original)
+++ incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/HCatBaseLoader.java
Tue Nov 20 23:56:17 2012
@@ -135,8 +135,11 @@ abstract class HCatBaseLoader extends Lo
                 if (p.getFileSystem(conf).isFile(p)) {
                     sizeInBytes += p.getFileSystem(conf).getFileStatus(p).getLen();
                 } else {
-                    for (FileStatus child : p.getFileSystem(conf).listStatus(p)) {
-                        sizeInBytes += child.getLen();
+                    FileStatus[] fileStatuses = p.getFileSystem(conf).listStatus(p);
+                    if (fileStatuses != null) {
+                        for (FileStatus child : fileStatuses) {
+                            sizeInBytes += child.getLen();
+                        }
                     }
                 }
             } catch (IOException e) {



Mime
View raw message