GitHub user HyukjinKwon opened a pull request:

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

    [SPARK-22377][BUILD] Use /usr/sbin/lsof if lsof does not exists in 
release-build.sh

    ## What changes were proposed in this pull request?
    
    This PR proposes to use `/usr/sbin/lsof` if `lsof` is missing in the path 
to fix nightly snapshot jenkins jobs. Please refer 
https://github.com/apache/spark/pull/19359#issuecomment-340139557:
    
    > Looks like some of the snapshot builds are having lsof issues:
    > 
    > 
https://amplab.cs.berkeley.edu/jenkins/view/Spark%20Packaging/job/spark-branch-2.1-maven-snapshots/182/console
    >
    
>https://amplab.cs.berkeley.edu/jenkins/view/Spark%20Packaging/job/spark-branch-2.2-maven-snapshots/134/console
    >
    >spark-build/dev/create-release/release-build.sh: line 344: lsof: command 
not found
    >usage: kill [ -s signal | -p ] [ -a ] pid ...
    >kill -l [ signal ]
    
    Up to my knowledge,  the full path of `lsof` is required for non-root user 
in few OSs.
    
    ## How was this patch tested?
    
    Manually tested as below:
    
    ```bash
    #!/usr/bin/env bash
    
    LSOF=lsof
    if ! hash $LSOF 2>/dev/null; then
      echo "a"
      LSOF=/usr/sbin/lsof
    fi
    
    $LSOF -P | grep "a"
    ```

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

    $ git pull https://github.com/HyukjinKwon/spark SPARK-22377

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

    https://github.com/apache/spark/pull/19695.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 #19695
    
----
commit c8202372c9f18bf666450f87a2ea02e47b5d4174
Author: hyukjinkwon <[email protected]>
Date:   2017-11-08T11:47:54Z

    Use /usr/sbin/lsof if lsof does not exists in release-build.sh

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to