falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pall...@apache.org
Subject falcon git commit: FALCON-2264 Error response returns object instead of response-message
Date Tue, 31 Jan 2017 05:21:33 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 21f0b6978 -> ed2f3fb86


FALCON-2264 Error response returns object instead of response-message

Author: Pracheer Agarwal <pracheer.agarwal@inmobi.com>
Author: Pracheer Agarwal <pracheeragarwal@gmail.com>
Author: Pracheer Agarwal <pr@im2216-x0.corp.inmobi.com>

Reviewers: @sandeepSamudrala, @pallavi-rao

Closes #349 from PracheerAgarwal/FALCON-2264 and squashes the following commits:

31e611b [Pracheer Agarwal] FALCON-2264 Error response returns object instead of response-message
164abcb [Pracheer Agarwal] FALCON-2264 Error response returns object instead of response-message
9c2f0a5 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon
9cd8c17 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon
778c579 [Pracheer Agarwal] Merge branch 'master' of https://github.com/PracheerAgarwal/falcon
e39808d [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon
a932633 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon
fda3b28 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon
a93d71a [Pracheer Agarwal] Merge branch 'master' of https://github.com/PracheerAgarwal/falcon
e3728d5 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon
066c8e2 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon
b20f044 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon
7f572a1 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon
46042fd [Pracheer Agarwal] Merge branch 'master' of https://github.com/PracheerAgarwal/falcon
daa3ffc [Pracheer Agarwal] FALCON-2225 extension owner added for trusted extensions
622cae4 [Pracheer Agarwal] FALCON-2225 extension owner added for trusted extensions


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

Branch: refs/heads/master
Commit: ed2f3fb861bfd5138fd6b9b8f4b5a8314d9ade4f
Parents: 21f0b69
Author: Pracheer Agarwal <pracheer.agarwal@inmobi.com>
Authored: Tue Jan 31 10:51:18 2017 +0530
Committer: Pallavi Rao <pallavi.rao@inmobi.com>
Committed: Tue Jan 31 10:51:18 2017 +0530

----------------------------------------------------------------------
 .../apache/falcon/resource/AbstractExtensionManager.java | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/ed2f3fb8/prism/src/main/java/org/apache/falcon/resource/AbstractExtensionManager.java
----------------------------------------------------------------------
diff --git a/prism/src/main/java/org/apache/falcon/resource/AbstractExtensionManager.java
b/prism/src/main/java/org/apache/falcon/resource/AbstractExtensionManager.java
index e1b62ad..7ab5b2a 100644
--- a/prism/src/main/java/org/apache/falcon/resource/AbstractExtensionManager.java
+++ b/prism/src/main/java/org/apache/falcon/resource/AbstractExtensionManager.java
@@ -17,7 +17,6 @@
  */
 package org.apache.falcon.resource;
 
-import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.falcon.FalconException;
 import org.apache.falcon.FalconWebException;
@@ -160,10 +159,14 @@ public class AbstractExtensionManager extends AbstractSchedulableEntityManager
{
         ExtensionMetaStore metaStore = ExtensionStore.getMetaStore();
         List<ExtensionJobsBean> extensionJobs = metaStore.getJobsForAnExtension(extensionName);
         if (!extensionJobs.isEmpty()) {
-            LOG.error("Extension:{} cannot be unregistered as {} are instances of the extension",
extensionName,
-                    ArrayUtils.toString(extensionJobs));
+            StringBuilder jobs = new StringBuilder();
+            for(ExtensionJobsBean extensionJobsBean : extensionJobs) {
+                jobs.append("\n" + extensionJobsBean.getJobName());
+            }
+            LOG.error("Extension:" + extensionName + " cannot be unregistered as following
instances are dependent on "
+                    + "the extension:" + jobs.toString());
             throw new FalconException("Extension:" + extensionName + " cannot be unregistered
as following instances"
-                    + " are dependent on the extension" + ArrayUtils.toString(extensionJobs));
+                    + " are dependent on the extension:" + jobs.toString());
         }
     }
 


Mime
View raw message