Skip to content

[SPARK-7831][Mesos] Added flag to shutdown driver when mesos dispatch… - #10701

Closed
nraychaudhuri wants to merge 2 commits into
apache:masterfrom
nraychaudhuri:SPARK-7831
Closed

[SPARK-7831][Mesos] Added flag to shutdown driver when mesos dispatch…#10701
nraychaudhuri wants to merge 2 commits into
apache:masterfrom
nraychaudhuri:SPARK-7831

Conversation

@nraychaudhuri

Copy link
Copy Markdown
Contributor

Fix for SPARK-7831

@nraychaudhuri

Copy link
Copy Markdown
ContributorAuthor

@dragos@tnachen@skyluc Could you please take a look at this one?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of killing without failover, we could also start it without failover.

In the start method, to use:

valdriver= createSchedulerDriver(
master,
MesosClusterScheduler.this,
Utils.getCurrentUserName(),
appName,
conf,
Some(frameworkUrl),
Some(driverFailOver), // <-- with or without checkpoint dataSome(if (driverFailOver) Double.MaxValueelse0.0), // <-- timeout for failover recovery
fwId)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find @skyluc

I will make the change

@tnachen

Copy link
Copy Markdown
Contributor

jenkins please test

@tnachen

Copy link
Copy Markdown
Contributor

Besides what @skyluc and my comments I think this patch LGTM. Have you tested this btw?

@nraychaudhuri

Copy link
Copy Markdown
ContributorAuthor

Yes. I have tested this and it seems to work. I will make the necessary changes

@dragos

Copy link
Copy Markdown
Contributor

ok to test

@dragos

Copy link
Copy Markdown
Contributor

I confirm that the framework deregisters from Mesos. However, I don't see the old behavior anymore, where the framework stays even after stopping it. The new flag seems to have no effect.

$ sbin/start-mesos-dispatcher.sh --master mesos://lausanne1.local:5050
starting org.apache.spark.deploy.mesos.MesosClusterDispatcher, logging to /Users/dragos/workspace/Spark/dev/spark/logs/spark-dragos-org.apache.spark.deploy.mesos.MesosClusterDispatcher-1-sagitarius.local.out
$ sbin/stop-mesos-dispatcher.sh stopping org.apache.spark.deploy.mesos.MesosClusterDispatcher

The framework is gone.

@SparkQA

Copy link
Copy Markdown

Test build #50096 has finished for PR 10701 at commit 9002258.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tnachen

Copy link
Copy Markdown
Contributor

@dragos you mean the framework no longer shows up in the UI? the console output doesn't seem to suggest it's gone.

@dragos

Copy link
Copy Markdown
Contributor

On 14 feb. 2016, at 10:01, Timothy Chen notifications@github.com wrote:

@dragos you mean the framework no longer shows up in the UI? the console output doesn't seem to suggest it's gone.

Yes, that's what I mean.


Reply to this email directly or view it on GitHub.

@tnachen

Copy link
Copy Markdown
Contributor

I've tested this myself and is indeed now doing the correct behavior when not adding the flag in. I'll need to dig more, @nraychaudhuri have you tried this as well?

@tnachen

Copy link
Copy Markdown
Contributor

I just found out that this is actually a bug in Mesos, where we cannot store a duration that's larger than int64_t. I filed a Mesos jira for this (https://issues.apache.org/jira/browse/MESOS-4862).
As a workaround, please don't use Double.MAX_VALUE but use Integer.MAX_VALUE instead which is what I did before, I forgot about hitting this in the past. We should also leave a comment to make sure we don't change this until it's fixed.

@andrewor14

Copy link
Copy Markdown
Contributor

OK, let's not add a flag if it's a bug in Mesos. In the mean time before they fix it downstream we can use the workaround @tnachen suggested.

@dragos

Copy link
Copy Markdown
Contributor

Sounds good. Who can close this PR?

@andrewor14

Copy link
Copy Markdown
Contributor

@nraychaudhuri can you close this PR?

@tnachen

Copy link
Copy Markdown
Contributor

@andrewor14@nraychaudhuri@dragos Sorry I'm not suggesting we close this PR, we still need the flag since we want to be able to either failover automatically or not. We only need to revert the particular line of change where the PR changed the timeout to DOUBLE.MAX_VALUE

@srowen

Copy link
Copy Markdown
Member

@nraychaudhuri can you update or close this PR then?

@tnachen

Copy link
Copy Markdown
Contributor

Seems like @nraychaudhuri is busy, I'll take this PR and update it myself. We definitely need this to be merged as it's quite useful for testing.

vanzin pushed a commit to vanzin/spark that referenced this pull request Aug 4, 2016
Closing the following PRs due to requests or unresponsive users.
Closesapache#13923Closesapache#14462Closesapache#13123Closesapache#14423 (requested by srowen)
Closesapache#14424 (requested by srowen)
Closesapache#14101 (requested by jkbradley)
Closesapache#10676 (requested by srowen)
Closesapache#10943 (requested by yhuai)
Closesapache#9936Closesapache#10701
@asfgitasfgit closed this in 53e766cAug 4, 2016
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.

7 participants

@nraychaudhuri@tnachen@dragos@SparkQA@andrewor14@srowen@skyluc