apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davidyan74 <...@git.apache.org>
Subject [GitHub] apex-core pull request #360: *review only* APEXCORE-495 supporting apps in c...
Date Fri, 22 Jul 2016 18:03:32 GMT
Github user davidyan74 commented on a diff in the pull request:

    https://github.com/apache/apex-core/pull/360#discussion_r71920123
  
    --- Diff: engine/src/main/java/com/datatorrent/stram/cli/ApexCli.java ---
    @@ -3715,6 +3718,50 @@ DTConfiguration getLaunchAppPackageProperties(AppPackage ap, ConfigPackage
cp, L
         return launchProperties;
       }
     
    +  private List<AppInfo> getAppsFromPackageAndConfig(AppPackage ap, ConfigPackage
cp, boolean onlyConfigApps)
    +  {
    +    if (cp == null) {
    +      return ap.getApplications();
    +    }
    +
    +    File src = new File(cp.tempDirectory(), "app");
    +    File dest = new File(ap.tempDirectory(), "app");
    +
    +    if (!src.exists()) {
    +      return ap.getApplications();
    +    }
    +
    +    if (onlyConfigApps) {
    +      try {
    +        FileUtils.cleanDirectory(dest);
    +      } catch (IOException e) {
    +        e.printStackTrace();
    +      }
    +    } else {
    +      for (File app: src.listFiles()) {
    +        FileUtils.deleteQuietly(new File(dest, app.getName()));
    +      }
    +    }
    +
    +    for (File app: src.listFiles()) {
    +      try {
    +        FileUtils.moveFileToDirectory(app, dest, true);
    +      } catch (IOException e) {
    +        LOG.error("Application from the config file {} failed while processing", app.getName());
    --- End diff --
    
    Should it be a warn since it's swallowing the exception and moving on?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message