[ 
https://issues.apache.org/jira/browse/STORM-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14066415#comment-14066415
 ] 

ASF GitHub Bot commented on STORM-373:
--------------------------------------

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

    https://github.com/apache/incubator-storm/pull/164#discussion_r15115148
  
    --- Diff: storm-core/test/clj/backtype/storm/supervisor_test.clj ---
    @@ -352,3 +352,98 @@
       ;; TODO just do reassign, and check that cleans up worker states after 
killing but doesn't get rid of downloaded code
       )
     
    +(defn found? 
    +  [sub-str input-str]
    +  (if (string? input-str)
    +    (.contains input-str sub-str)
    +    (some? #(.substring % sub-str) input-str)))
    +
    +(defn not-found? 
    +  [sub-str input-str]
    +  (complement (found? sub-str input-str)))
    +
    +(deftest test-substitute-childopts-happy-path
    +  (testing "worker-launcher replaces ids in childopts"
    +    (let [ worker-id "w-01"
    +           storm-id "s-01"
    +           port 9999
    +           childopts 
"-Xloggc:/home/y/lib/storm/current/logs/gc.worker-%ID%-%STORM-ID%-%WORKER-ID%-%WORKER-PORT%.log"
    +           ]
    +      (def childopts-with-ids (supervisor/substitute-childopts childopts 
worker-id storm-id port))
    +      (is (not-found? "%WORKER-ID%" childopts-with-ids))
    --- End diff --
    
    Let's just test for the expected string here.  The way it is now, we are 
not testing that substitutions are happening in the right places, and that the 
string is otherwise unchanged besides the substitutions.  Likewise with the 
tests below.


> Provide Additional String substitutions for *.worker.childopts 
> ---------------------------------------------------------------
>
>                 Key: STORM-373
>                 URL: https://issues.apache.org/jira/browse/STORM-373
>             Project: Apache Storm (Incubating)
>          Issue Type: Improvement
>    Affects Versions: 0.9.2-incubating
>            Reporter: Kishor Patil
>              Labels: master
>
> As a storm application developer, I would like to name my GC log uniquely, so
> that the log is not blown away each time the worker restarts.
> Add %WORKER-ID% (worker-id) %STORM-ID% (storm-id) to the substitution 
> whenlaunching the worker JVM.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to