You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by tsudukim <gi...@git.apache.org> on 2014/10/14 13:18:04 UTC

[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

GitHub user tsudukim opened a pull request:

    https://github.com/apache/spark/pull/2797

    [SPARK-3943] Some scripts bin\*.cmd pollutes environment variables in Windows

    Modified not to pollute environment variables.
    Just moved the main logic into `XXX2.cmd` from `XXX.cmd`, and call `XXX2.cmd` with cmd command in `XXX.cmd`.
    `pyspark.cmd` and `spark-class.cmd` are already using the same way, but `spark-shell.cmd`, `spark-submit.cmd` and `/python/docs/make.bat` are not.

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

    $ git pull https://github.com/tsudukim/spark feature/SPARK-3943

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

    https://github.com/apache/spark/pull/2797.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 #2797
    
----
commit b397a7df5004bab26afd6f9650551dc8ed6af5f1
Author: Masayoshi TSUZUKI <ts...@oss.nttdata.co.jp>
Date:   2014-10-14T11:02:23Z

    [SPARK-3943] Some scripts bin\*.cmd pollutes environment variables in Windows
    
    Modified not to pollute environment variables.

----


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/2797#issuecomment-59027525
  
    Can one of the admins verify this patch?


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/2797#issuecomment-59117718
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21737/consoleFull) for   PR 2797 at commit [`b397a7d`](https://github.com/apache/spark/commit/b397a7df5004bab26afd6f9650551dc8ed6af5f1).
     * This patch merges cleanly.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

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

    https://github.com/apache/spark/pull/2797#discussion_r18870526
  
    --- Diff: bin/spark-shell2.cmd ---
    @@ -0,0 +1,22 @@
    +@echo off
    +
    +rem
    +rem Licensed to the Apache Software Foundation (ASF) under one or more
    +rem contributor license agreements.  See the NOTICE file distributed with
    +rem this work for additional information regarding copyright ownership.
    +rem The ASF licenses this file to You under the Apache License, Version 2.0
    +rem (the "License"); you may not use this file except in compliance with
    +rem the License.  You may obtain a copy of the License at
    +rem
    +rem    http://www.apache.org/licenses/LICENSE-2.0
    +rem
    +rem Unless required by applicable law or agreed to in writing, software
    +rem distributed under the License is distributed on an "AS IS" BASIS,
    +rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +rem See the License for the specific language governing permissions and
    +rem limitations under the License.
    +rem
    +
    +set SPARK_HOME=%~dp0..
    +
    +cmd /V /E /C %SPARK_HOME%\bin\spark-submit.cmd --class org.apache.spark.repl.Main %* spark-shell
    --- End diff --
    
    Yes it is.
    
    Although this script now has only one environment variable `SPARK_HOME`, it might be more complicated in future just like bin/spark-shell (linux version), then it might export other environment variables.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

Posted by tsudukim <gi...@git.apache.org>.
Github user tsudukim commented on the pull request:

    https://github.com/apache/spark/pull/2797#issuecomment-59027470
  
    Please merge this *AFTER* #2796 is merged, because /python/docs/make2.bat will be ignored by .gitignore in /python by mistake.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/2797#issuecomment-59129200
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21737/
    Test PASSed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/2797#issuecomment-59117628
  
    I haven't done a close review to make sure this doesn't break anything yet, but the general idea looks good to me. Just so I understand correctly, is the purpose of this to ensure we don't accidentally read environment variables from previous applications that have now exited? Were you observing any strange behavior, or is this just a safeguard for the future?


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/2797#issuecomment-59129194
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21737/consoleFull) for   PR 2797 at commit [`b397a7d`](https://github.com/apache/spark/commit/b397a7df5004bab26afd6f9650551dc8ed6af5f1).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

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

    https://github.com/apache/spark/pull/2797


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/2797#issuecomment-59117164
  
    ok to test


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

Posted by tsudukim <gi...@git.apache.org>.
Github user tsudukim commented on the pull request:

    https://github.com/apache/spark/pull/2797#issuecomment-59146580
  
    @andrewor14 thank you for following this PR.
    Yes that's I mean.
    I'm not observing any problems, this is just a safeguard. Polluting environment might affect noy only spark scripts but also non-spark batch scripts and applications.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/2797#issuecomment-59147116
  
    I see. This LGTM actually. I just did a closer look at the scripts, and it appears that we already do the same for older ones (`pyspark.cmd`, `spark-class.cmd` etc.). I'm merging this into master.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-3943] Some scripts bin\*.cmd pollutes e...

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

    https://github.com/apache/spark/pull/2797#discussion_r18859059
  
    --- Diff: bin/spark-shell2.cmd ---
    @@ -0,0 +1,22 @@
    +@echo off
    +
    +rem
    +rem Licensed to the Apache Software Foundation (ASF) under one or more
    +rem contributor license agreements.  See the NOTICE file distributed with
    +rem this work for additional information regarding copyright ownership.
    +rem The ASF licenses this file to You under the Apache License, Version 2.0
    +rem (the "License"); you may not use this file except in compliance with
    +rem the License.  You may obtain a copy of the License at
    +rem
    +rem    http://www.apache.org/licenses/LICENSE-2.0
    +rem
    +rem Unless required by applicable law or agreed to in writing, software
    +rem distributed under the License is distributed on an "AS IS" BASIS,
    +rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +rem See the License for the specific language governing permissions and
    +rem limitations under the License.
    +rem
    +
    +set SPARK_HOME=%~dp0..
    +
    +cmd /V /E /C %SPARK_HOME%\bin\spark-submit.cmd --class org.apache.spark.repl.Main %* spark-shell
    --- End diff --
    
    Is the purpose of this file such that exporting `SPARK_HOME` here doesn't keep it in the system environment even after the application exits?


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org