Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/apache/falcon
Browse files Browse the repository at this point in the history
  • Loading branch information
PracheerAgarwal-zz committed Jan 31, 2017
2 parents 9c2f0a5 + ed2f3fb commit 9ff05df
Showing 1 changed file with 7 additions and 4 deletions.
Expand Up @@ -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;
Expand Down Expand Up @@ -160,10 +159,14 @@ private void canDeleteExtension(String extensionName) throws FalconException {
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());
}
}

Expand Down

0 comments on commit 9ff05df

Please sign in to comment.