Skip to content

[SPARK-6952] Handle long args when detecting PID reuse - #5535

Closed
punya wants to merge 1 commit into
apache:masterfrom
punya:feature/SPARK-6952
Closed

[SPARK-6952] Handle long args when detecting PID reuse#5535
punya wants to merge 1 commit into
apache:masterfrom
punya:feature/SPARK-6952

Conversation

@punya

Copy link
Copy Markdown
Contributor

sbin/spark-daemon.sh used

ps -p "$TARGET_PID" -o args=

to figure out whether the process running with the expected PID is actually a Spark
daemon. When running with a large classpath, the output of ps gets
truncated and the check fails spuriously.

This weakens the check to see if it's a java command (which is something
we do in other parts of the script) rather than looking for the specific
main class name. This means that SPARK-4832 might happen under a
slightly broader range of circumstances (a java program happened to
reuse the same PID), but it seems worthwhile compared to failing
consistently with a large classpath.

sbin/spark-daemon.sh used
ps -p "$TARGET_PID" -o args= to figure out
whether the process running with the expected PID is actually a Spark
daemon. When running with a large classpath, the output of ps gets
truncated and the check fails spuriously.
This weakens the check to see if it's a java command (which is something
we do in other parts of the script) rather than looking for the specific
main class name. This means that SPARK-4832 might happen under a
slightly broader range of circumstances (a java program happened to
reuse the same PID), but it seems worthwhile compared to failing
consistently with a large classpath.
@srowen

Copy link
Copy Markdown
Member

LGTM for the reasoning given here.

@SparkQA

Copy link
Copy Markdown

Test build #30383 has finished for PR 5535 at commit 7ea12d1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAttribute(nameParts: Seq[String])
    • trait CaseConversionExpression
    • final class UTF8String extends Ordered[UTF8String] with Serializable
    • case class Exchange(
    • case class SortMergeJoin(
  • This patch does not change any dependencies.

@punya

Copy link
Copy Markdown
ContributorAuthor

Fairly sure I didn't add any of those classes in 2 lines of shell script 😛

asfgit pushed a commit that referenced this pull request Apr 17, 2015
sbin/spark-daemon.sh used
ps -p "$TARGET_PID" -o args=
to figure out whether the process running with the expected PID is actually a Spark
daemon. When running with a large classpath, the output of ps gets
truncated and the check fails spuriously.
This weakens the check to see if it's a java command (which is something
we do in other parts of the script) rather than looking for the specific
main class name. This means that SPARK-4832 might happen under a
slightly broader range of circumstances (a java program happened to
reuse the same PID), but it seems worthwhile compared to failing
consistently with a large classpath.
Author: Punya Biswal <pbiswal@palantir.com>
Closes#5535 from punya/feature/SPARK-6952 and squashes the following commits:
7ea12d1 [Punya Biswal] Handle long args when detecting PID reuse
asfgit pushed a commit that referenced this pull request Apr 17, 2015
sbin/spark-daemon.sh used
ps -p "$TARGET_PID" -o args=
to figure out whether the process running with the expected PID is actually a Spark
daemon. When running with a large classpath, the output of ps gets
truncated and the check fails spuriously.
This weakens the check to see if it's a java command (which is something
we do in other parts of the script) rather than looking for the specific
main class name. This means that SPARK-4832 might happen under a
slightly broader range of circumstances (a java program happened to
reuse the same PID), but it seems worthwhile compared to failing
consistently with a large classpath.
Author: Punya Biswal <pbiswal@palantir.com>
Closes#5535 from punya/feature/SPARK-6952 and squashes the following commits:
7ea12d1 [Punya Biswal] Handle long args when detecting PID reuse
@punya
punya deleted the feature/SPARK-6952 branch April 22, 2015 01:55
punya pushed a commit to palantir/spark that referenced this pull request May 15, 2015
sbin/spark-daemon.sh used
ps -p "$TARGET_PID" -o args=
to figure out whether the process running with the expected PID is actually a Spark
daemon. When running with a large classpath, the output of ps gets
truncated and the check fails spuriously.
This weakens the check to see if it's a java command (which is something
we do in other parts of the script) rather than looking for the specific
main class name. This means that SPARK-4832 might happen under a
slightly broader range of circumstances (a java program happened to
reuse the same PID), but it seems worthwhile compared to failing
consistently with a large classpath.
Author: Punya Biswal <pbiswal@palantir.com>
Closesapache#5535 from punya/feature/SPARK-6952 and squashes the following commits:
7ea12d1 [Punya Biswal] Handle long args when detecting PID reuse
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@punya@srowen@SparkQA