Github user knusbaum commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2187#discussion_r125767551
  
    --- Diff: storm-core/src/clj/org/apache/storm/daemon/logviewer.clj ---
    @@ -502,6 +503,20 @@
           (-> (resp/response "Page not found")
               (resp/status 404)))))
     
    +(defnk set-log-file-permissions [fname root-dir]
    +       (let [file (.getCanonicalFile (File. root-dir fname))
    +             run-as-user (*STORM-CONF* SUPERVISOR-RUN-WORKER-AS-USER)
    +             parent (.getParent (File. root-dir fname))
    +             md-file (if (nil? parent) nil 
(get-metadata-file-for-wroker-logdir parent))
    +             topo-owner (if (nil? md-file) nil 
(get-topo-owner-from-metadata-file (.getCanonicalPath md-file)))]
    +         (if (and run-as-user
    --- End diff --
    
    Nit: since there is no 'else' branch, replacing `if` with `when` will allow 
you to remove the `do`.


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

Reply via email to