You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by srdo <gi...@git.apache.org> on 2017/06/17 16:43:23 UTC

[GitHub] storm pull request #2165: STORM-2558: Port storm.sh to Powershell and remove...

GitHub user srdo opened a pull request:

    https://github.com/apache/storm/pull/2165

    STORM-2558: Port storm.sh to Powershell and remove outdated batch scr…

    …ipts
    
    See https://issues.apache.org/jira/browse/STORM-2558
    
    I'm wondering if it is feasible to port most of the bash script to Python so we have less nonportable code to maintain.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/srdo/storm STORM-2558

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/2165.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2165
    
----
commit 577866960d518c2220806807aa38435967490533
Author: Stig Rohde Døssing <st...@gmail.com>
Date:   2017-06-17T16:40:08Z

    STORM-2558: Port storm.sh to Powershell and remove outdated batch scripts

----


---
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.
---

[GitHub] storm pull request #2165: STORM-2558: Port storm.sh to Powershell and remove...

Posted by srdo <gi...@git.apache.org>.
Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2165#discussion_r124854650
  
    --- Diff: bin/storm.py ---
    @@ -94,7 +94,7 @@ def init_storm_env():
     CONFFILE = ""
     JAR_JVM_OPTS = shlex.split(os.getenv('STORM_JAR_JVM_OPTS', ''))
     JAVA_HOME = os.getenv('JAVA_HOME', None)
    -JAVA_CMD = 'java' if not JAVA_HOME else os.path.join(JAVA_HOME, 'bin', 'java')
    +JAVA_CMD = 'java' if not JAVA_HOME else os.path.join(JAVA_HOME, 'bin', 'java' if not is_windows() else "java.exe")
    --- End diff --
    
    I've put the code into a new function. I'm a little uncertain what you're asking in the rest of the comment. The java binary on Windows is called java.exe, so `<JAVA_HOME>/bin/java vs <JAVA_HOME>\bin\java.exe` is correct. The previous implementation should do that?


---
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.
---

[GitHub] storm pull request #2165: STORM-2558: Port storm.sh to Powershell and remove...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2165#discussion_r124716042
  
    --- Diff: bin/storm.py ---
    @@ -94,7 +94,7 @@ def init_storm_env():
     CONFFILE = ""
     JAR_JVM_OPTS = shlex.split(os.getenv('STORM_JAR_JVM_OPTS', ''))
     JAVA_HOME = os.getenv('JAVA_HOME', None)
    -JAVA_CMD = 'java' if not JAVA_HOME else os.path.join(JAVA_HOME, 'bin', 'java')
    +JAVA_CMD = 'java' if not JAVA_HOME else os.path.join(JAVA_HOME, 'bin', 'java' if not is_windows() else "java.exe")
    --- End diff --
    
    This one-liner becomes a bit complicated now. Could we expand this to multiple lines? 
    And isn't the difference between non-windows and windows be 'java' or 'java.exe'? I mean `java vs java.exe` or `<JAVA_HOME>/bin/java vs <JAVA_HOME>\bin\java.exe` might be correct whereas this line doesn't do the thing. Please let me know if I'm missing here.


---
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.
---

[GitHub] storm pull request #2165: STORM-2558: Port storm.sh to Powershell and remove...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/2165


---
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.
---

[GitHub] storm issue #2165: STORM-2558: Port storm.sh to Powershell and remove outdat...

Posted by srdo <gi...@git.apache.org>.
Github user srdo commented on the issue:

    https://github.com/apache/storm/pull/2165
  
    Thanks for trying it out :)


---
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.
---

[GitHub] storm issue #2165: STORM-2558: Port storm.sh to Powershell and remove outdat...

Posted by srdo <gi...@git.apache.org>.
Github user srdo commented on the issue:

    https://github.com/apache/storm/pull/2165
  
    @HeartSaVioR I think powershell runs on Linux now https://github.com/PowerShell/PowerShell
    
    I'm hoping this can be reviewed without knowing much about Powershell, since the script is a line for line translation of the bash script. I'd be happy to post to the mailing list to find reviewers, if you think it would help?


---
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.
---

[GitHub] storm issue #2165: STORM-2558: Port storm.sh to Powershell and remove outdat...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/2165
  
    @srdo 
    Thanks for the quick fix. +1
    Could you squash the commits into one? Thanks in advance!



---
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.
---

[GitHub] storm pull request #2165: STORM-2558: Port storm.sh to Powershell and remove...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2165#discussion_r124976039
  
    --- Diff: bin/storm.py ---
    @@ -66,6 +66,12 @@ def init_storm_env():
         for option in options:
             value = config.get('environment', option)
             os.environ[option] = value
    +        
    +def get_java_cmd():
    --- End diff --
    
    Ah didn't know about the magic of Windows. That was why it worked anyway and I just wondered why it works. Thanks for letting me know. :)


---
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.
---

[GitHub] storm pull request #2165: STORM-2558: Port storm.sh to Powershell and remove...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2165#discussion_r124966747
  
    --- Diff: bin/storm.py ---
    @@ -66,6 +66,12 @@ def init_storm_env():
         for option in options:
             value = config.get('environment', option)
             os.environ[option] = value
    +        
    +def get_java_cmd():
    --- End diff --
    
    Yes I think this is correct and keeping this to one-liner fails to do this.


---
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.
---

[GitHub] storm issue #2165: STORM-2558: Port storm.sh to Powershell and remove outdat...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/2165
  
    Sadly I guess no one knows power shell script, and also most of committers/PMCs don't even have Windows PC (including me, for dev. machine).
    Would you want to bump this with dev@ to find reviewers?


---
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.
---

[GitHub] storm pull request #2165: STORM-2558: Port storm.sh to Powershell and remove...

Posted by srdo <gi...@git.apache.org>.
Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2165#discussion_r124969263
  
    --- Diff: bin/storm.py ---
    @@ -66,6 +66,12 @@ def init_storm_env():
         for option in options:
             value = config.get('environment', option)
             os.environ[option] = value
    +        
    +def get_java_cmd():
    --- End diff --
    
    The one liner should have done the same thing, except when JAVA_HOME wasn't set. But in that case it's okay to just call "java", since you don't have to postfix with ".exe" for binaries on the PATH in Windows. I agree that this is better though :)


---
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.
---

[GitHub] storm pull request #2165: STORM-2558: Port storm.sh to Powershell and remove...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2165#discussion_r124966657
  
    --- Diff: bin/storm.py ---
    @@ -94,7 +94,7 @@ def init_storm_env():
     CONFFILE = ""
     JAR_JVM_OPTS = shlex.split(os.getenv('STORM_JAR_JVM_OPTS', ''))
     JAVA_HOME = os.getenv('JAVA_HOME', None)
    -JAVA_CMD = 'java' if not JAVA_HOME else os.path.join(JAVA_HOME, 'bin', 'java')
    +JAVA_CMD = 'java' if not JAVA_HOME else os.path.join(JAVA_HOME, 'bin', 'java' if not is_windows() else "java.exe")
    --- End diff --
    
    @srdo 
    I meant to say we should set JAVA_CMD to `java.exe` for windows if JAVA_HOME is not provided. The line sets JAVA_CMD to `java` if JAVA_HOME is not provided regardless of OS.
    Yes I think previous implementation itself is wrong.


---
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.
---

[GitHub] storm issue #2165: STORM-2558: Port storm.sh to Powershell and remove outdat...

Posted by harshach <gi...@git.apache.org>.
Github user harshach commented on the issue:

    https://github.com/apache/storm/pull/2165
  
    +1. Tried on windows 10 looks good to me.


---
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.
---

[GitHub] storm issue #2165: STORM-2558: Port storm.sh to Powershell and remove outdat...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/2165
  
    Oops I left a review comment so please treat this as revoking +1.


---
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.
---

[GitHub] storm issue #2165: STORM-2558: Port storm.sh to Powershell and remove outdat...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/2165
  
    OK then I would also +1 given that the patch is confirmed to be manually tested.


---
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.
---