Github user davidyan74 commented on a diff in the pull request:
https://github.com/apache/apex-core/pull/360#discussion_r71920323
--- Diff: engine/src/main/java/com/datatorrent/stram/client/AppPackage.java
---
@@ -371,23 +376,12 @@ private void processAppDirectory(File dir)
for (File entry : files) {
if (entry.getName().endsWith(".json")) {
appJsonFiles.add(entry.getName());
- try {
- AppFactory appFactory = new
StramAppLauncher.JsonFileAppFactory(entry);
- StramAppLauncher stramAppLauncher = new
StramAppLauncher(entry.getName(), config);
- stramAppLauncher.loadDependencies();
- AppInfo appInfo = new AppInfo(appFactory.getName(),
entry.getName(), "json");
- appInfo.displayName = appFactory.getDisplayName();
- try {
- appInfo.dag =
appFactory.createApp(stramAppLauncher.getLogicalPlanConfiguration());
- appInfo.dag.validate();
- } catch (Exception ex) {
- appInfo.error = ex.getMessage();
- appInfo.errorStackTrace = ExceptionUtils.getStackTrace(ex);
- }
+ AppInfo appInfo = jsonFileToAppInfo(entry,config);
+
+ if (appInfo != null) {
applications.add(appInfo);
- } catch (Exception ex) {
- LOG.error("Caught exceptions trying to process {}",
entry.getName(), ex);
--- End diff --
Ditto above
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---