falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [1/5] git commit: FALCON-429 Falcon CLI entity list command throws NPE stack trace in case of no entities. Contributed by Satish Mittal
Date Tue, 06 May 2014 18:52:53 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master c4035db22 -> ad2701d2b


FALCON-429 Falcon CLI entity list command throws NPE stack trace in case of no entities. Contributed
by Satish Mittal


Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/b08eacb4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/b08eacb4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/b08eacb4

Branch: refs/heads/master
Commit: b08eacb4a240bf25200762cce0caef2809279a5c
Parents: c4035db
Author: Venkatesh Seetharam <venkatesh@apache.org>
Authored: Tue May 6 11:18:36 2014 -0700
Committer: Venkatesh Seetharam <venkatesh@apache.org>
Committed: Tue May 6 11:18:36 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                               | 3 +++
 client/src/main/java/org/apache/falcon/cli/FalconCLI.java | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b08eacb4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b0b9dd9..6b20f60 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -134,6 +134,9 @@ Release Version: 0.5-incubating
     FALCON-123 Improve build speeds in falcon. (Srikanth Sundarrajan via Shwetha GS)
 
   BUG FIXES
+    FALCON-429 Falcon CLI entity list command throws NPE stack trace in case
+    of no entities (Satish Mittal via Venkatesh Seetharam)
+
     FALCON-427 Update default falcon endpoint URL in runtime.properties for
     prism setup to work out of box (Satish Mittal via Venkatesh Seetharam)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b08eacb4/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/cli/FalconCLI.java b/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
index 5da6dfc..2fb0729 100644
--- a/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
+++ b/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
@@ -28,6 +28,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.falcon.client.FalconCLIException;
 import org.apache.falcon.client.FalconClient;
 import org.apache.falcon.entity.v0.SchemaHelper;
+import org.apache.falcon.resource.EntityList;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -347,7 +348,8 @@ public class FalconCLI {
             result = client.getDependency(entityType, entityName).toString();
         } else if (optionsList.contains(LIST_OPT)) {
             validateColo(optionsList);
-            result = client.getEntityList(entityType).toString();
+            EntityList entityList = client.getEntityList(entityType);
+            result = entityList != null ? entityList.toString() : "No entity of type (" +
entityType + ") found.";
         } else if (optionsList.contains(HELP_CMD)) {
             OUT.get().println("Falcon Help");
         } else {


Mime
View raw message