[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-09 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-07 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r73823481
  
--- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
@@ -396,6 +425,10 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
 mesosDriver = newDriver
   }
 
+  override def stopExecutors(): Unit = {
--- End diff --

Yea I messed up in my comment here.  It's fine as is.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-07 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r73823297
  
--- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
@@ -341,6 +344,32 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
 assert(!dockerInfo.getForcePullImage)
   }
 
+  test("Do not call parent methods like removeExecutor() after backend is 
stopped") {
--- End diff --

remove "parent methods like".  We're only checking `removeExecutor()` in 
this 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-07 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r73823241
  
--- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
@@ -341,6 +344,32 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
 assert(!dockerInfo.getForcePullImage)
   }
 
+  test("Do not call parent methods like removeExecutor() after backend is 
stopped") {
+setBackend()
+
+// launches a task on a valid offer
+val offers = List((backend.executorMemory(sc), 1))
+offerResources(offers)
+verifyTaskLaunched(driver, "o1")
+
+// launches a thread simulating status update
+val statusUpdateThread = new Thread {
+  override def run(): Unit = {
+while (!stopCalled) {
+  Thread.sleep(100)
+}
+
+val status = createTaskStatus("0", "s1", TaskState.TASK_FINISHED)
+backend.statusUpdate(driver, status)
+  }
+}.start
+
+backend.stop
+// Any method of the backend involving sending messages to the driver 
endpoint should not
+// be called after the backend is stopped.
+verify(driverEndpoint, 
never()).askWithRetry(isA(classOf[RemoveExecutor]))(any[ClassTag[_]])
--- End diff --

ah, good point.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-07 Thread sun-rui
Github user sun-rui commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r73823225
  
--- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
@@ -396,6 +425,10 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
 mesosDriver = newDriver
   }
 
+  override def stopExecutors(): Unit = {
--- End diff --

the flag stopCalled in the backend can't be accessed because it is private. 
Here by overriding stopExecutors() we can set a flag when stop is called.
Another solution is to change the flag stopCalled in the backend to be 
public for test purpose.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-07 Thread sun-rui
Github user sun-rui commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r73823074
  
--- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
@@ -341,6 +344,32 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
 assert(!dockerInfo.getForcePullImage)
   }
 
+  test("Do not call parent methods like removeExecutor() after backend is 
stopped") {
+setBackend()
+
+// launches a task on a valid offer
+val offers = List((backend.executorMemory(sc), 1))
+offerResources(offers)
+verifyTaskLaunched(driver, "o1")
+
+// launches a thread simulating status update
+val statusUpdateThread = new Thread {
+  override def run(): Unit = {
+while (!stopCalled) {
+  Thread.sleep(100)
+}
+
+val status = createTaskStatus("0", "s1", TaskState.TASK_FINISHED)
+backend.statusUpdate(driver, status)
+  }
+}.start
+
+backend.stop
--- End diff --

ok. 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-07 Thread sun-rui
Github user sun-rui commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r73823040
  
--- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
@@ -341,6 +344,32 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
 assert(!dockerInfo.getForcePullImage)
   }
 
+  test("Do not call parent methods like removeExecutor() after backend is 
stopped") {
+setBackend()
+
+// launches a task on a valid offer
+val offers = List((backend.executorMemory(sc), 1))
+offerResources(offers)
+verifyTaskLaunched(driver, "o1")
+
+// launches a thread simulating status update
+val statusUpdateThread = new Thread {
+  override def run(): Unit = {
+while (!stopCalled) {
+  Thread.sleep(100)
+}
+
+val status = createTaskStatus("0", "s1", TaskState.TASK_FINISHED)
+backend.statusUpdate(driver, status)
+  }
+}.start
+
+backend.stop
+// Any method of the backend involving sending messages to the driver 
endpoint should not
+// be called after the backend is stopped.
+verify(driverEndpoint, 
never()).askWithRetry(isA(classOf[RemoveExecutor]))(any[ClassTag[_]])
--- End diff --

I tried to do this. but found that driverEndpoint is mocked. Since the 
exception is thrown from within RemoveExecutor, I think this has the same 
purpose.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-07 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r73822922
  
--- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
@@ -341,6 +344,32 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
 assert(!dockerInfo.getForcePullImage)
   }
 
+  test("Do not call parent methods like removeExecutor() after backend is 
stopped") {
+setBackend()
+
+// launches a task on a valid offer
+val offers = List((backend.executorMemory(sc), 1))
+offerResources(offers)
+verifyTaskLaunched(driver, "o1")
+
+// launches a thread simulating status update
+val statusUpdateThread = new Thread {
+  override def run(): Unit = {
+while (!stopCalled) {
+  Thread.sleep(100)
+}
+
+val status = createTaskStatus("0", "s1", TaskState.TASK_FINISHED)
+backend.statusUpdate(driver, status)
+  }
+}.start
+
+backend.stop
+// Any method of the backend involving sending messages to the driver 
endpoint should not
+// be called after the backend is stopped.
+verify(driverEndpoint, 
never()).askWithRetry(isA(classOf[RemoveExecutor]))(any[ClassTag[_]])
--- End diff --

This isn't really what we care to test.  What we care to test is that no 
exception is thrown in `statusUpdate`.  Can you check that instead?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-07 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r73822562
  
--- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
@@ -341,6 +344,32 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
 assert(!dockerInfo.getForcePullImage)
   }
 
+  test("Do not call parent methods like removeExecutor() after backend is 
stopped") {
+setBackend()
+
+// launches a task on a valid offer
+val offers = List((backend.executorMemory(sc), 1))
+offerResources(offers)
+verifyTaskLaunched(driver, "o1")
+
+// launches a thread simulating status update
+val statusUpdateThread = new Thread {
+  override def run(): Unit = {
+while (!stopCalled) {
+  Thread.sleep(100)
+}
+
+val status = createTaskStatus("0", "s1", TaskState.TASK_FINISHED)
+backend.statusUpdate(driver, status)
+  }
+}.start
+
+backend.stop
--- End diff --

include parens for methods with side effects


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-08-07 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r73822546
  
--- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
@@ -396,6 +425,10 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
 mesosDriver = newDriver
   }
 
+  override def stopExecutors(): Unit = {
+stopCalled = true
--- End diff --

`stopCalled` is already set to `true` in `backend.stop()`, right?  Why 
override this and set it 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-26 Thread sun-rui
Github user sun-rui commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r72368797
  
--- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
@@ -552,7 +552,12 @@ private[spark] class 
MesosCoarseGrainedSchedulerBackend(
   taskId: String,
   reason: String): Unit = {
 stateLock.synchronized {
-  removeExecutor(taskId, SlaveLost(reason))
+  // Do not call removeExecutor() after this scheduler backend was 
stopped because
--- End diff --

what about submitting another JIRA issue on better handling of state 
management after stop() is called for CoarseGrainedSchedulerBackend? 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-26 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r72308905
  
--- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
@@ -552,7 +552,12 @@ private[spark] class 
MesosCoarseGrainedSchedulerBackend(
   taskId: String,
   reason: String): Unit = {
 stateLock.synchronized {
-  removeExecutor(taskId, SlaveLost(reason))
+  // Do not call removeExecutor() after this scheduler backend was 
stopped because
--- End diff --

I'm fine with this going in as-is just to the get the problem solved, but I 
do still think that classes should try to ensure that their public methods are 
callable w/o state consideration, so I would have rather we fixed this in the 
parent.  Let's try to maintain that going forward.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-25 Thread sun-rui
Github user sun-rui commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r72176972
  
--- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
@@ -552,7 +552,12 @@ private[spark] class 
MesosCoarseGrainedSchedulerBackend(
   taskId: String,
   reason: String): Unit = {
 stateLock.synchronized {
-  removeExecutor(taskId, SlaveLost(reason))
+  // Do not call removeExecutor() after this scheduler backend was 
stopped because
--- End diff --

@mgummelt, what's your opinion?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-23 Thread sun-rui
Github user sun-rui commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r71982037
  
--- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
@@ -552,7 +552,12 @@ private[spark] class 
MesosCoarseGrainedSchedulerBackend(
   taskId: String,
   reason: String): Unit = {
 stateLock.synchronized {
-  removeExecutor(taskId, SlaveLost(reason))
+  // Do not call removeExecutor() after this scheduler backend was 
stopped because
--- End diff --

Not only removeExecutor(), but also other methods, like reviveOffers(), 
killTask(), ..., should not be called after stopped. If you prefer adding 
comment in the parent class, then it seems it is more complete to add comment 
to all methods that may encounter such case. However, I don't think it is 
necessary to do so, as exceptions will be thrown in such case notifying the 
caller it is not valid to do such calls, just as why this issue was found.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-19 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r71391603
  
--- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
@@ -552,7 +552,12 @@ private[spark] class 
MesosCoarseGrainedSchedulerBackend(
   taskId: String,
   reason: String): Unit = {
 stateLock.synchronized {
-  removeExecutor(taskId, SlaveLost(reason))
+  // Do not call removeExecutor() after this scheduler backend was 
stopped because
--- End diff --

The comment needs to be on the super class's `removeExecutor` method.  All 
clients need to be aware of when they're allowed to call it.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-19 Thread sun-rui
Github user sun-rui commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r71284361
  
--- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
@@ -552,7 +552,9 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
   taskId: String,
   reason: String): Unit = {
 stateLock.synchronized {
-  removeExecutor(taskId, SlaveLost(reason))
+  if (!stopCalled) {
--- End diff --

comment added.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-18 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r71189077
  
--- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
@@ -552,7 +552,9 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
   taskId: String,
   reason: String): Unit = {
 stateLock.synchronized {
-  removeExecutor(taskId, SlaveLost(reason))
+  if (!stopCalled) {
--- End diff --

OK you've convinced me.  But please add a clarifying comment to 
super.removeExecutor() specifying that it should not becalled after 
super.stop() is called.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-17 Thread sun-rui
Github user sun-rui commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r71095619
  
--- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
@@ -552,7 +552,9 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
   taskId: String,
   reason: String): Unit = {
 stateLock.synchronized {
-  removeExecutor(taskId, SlaveLost(reason))
+  if (!stopCalled) {
--- End diff --

If we add the guard in the parent class, namely 
CoarseGrainedSchedulerBackend, what's the appropriate behavior of the guard? 
Silently ignore all message requests after stop() is called and log warnings, 
or throw an exception? If latter, then the call to removeExecutor has to be 
wrapped with a try.
Since the call to removeExecutor() is done in 
MesosCoarseGrainedSchedulerBackend, I think current fix is simpler and 
reasonable.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-15 Thread mgummelt
Github user mgummelt commented on a diff in the pull request:

https://github.com/apache/spark/pull/14175#discussion_r71045050
  
--- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
@@ -552,7 +552,9 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
   taskId: String,
   reason: String): Unit = {
 stateLock.synchronized {
-  removeExecutor(taskId, SlaveLost(reason))
+  if (!stopCalled) {
--- End diff --

I don't think we should be adding the guard here.  It's the parent class 
that's incorrectly making a request to the `driverEndpoint` despite the 
`driverEndpoint` being shut down.  So it's the parent class that should add the 
guard.  


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14175: [SPARK-16522][MESOS] Spark application throws exc...

2016-07-13 Thread sun-rui
GitHub user sun-rui opened a pull request:

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

[SPARK-16522][MESOS] Spark application throws exception on exit.

## What changes were proposed in this pull request?
Spark applications running on Mesos throw exception upon exit. For details, 
refer to https://issues.apache.org/jira/browse/SPARK-16522.

I am not sure if there is any better fix, so wait for review comments.


## How was this patch tested?
Manual test. Observed that the exception is gone upon application exit.




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

$ git pull https://github.com/sun-rui/spark SPARK-16522

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

https://github.com/apache/spark/pull/14175.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 #14175


commit 6fe96e5879fd97aa630839e670e3d8b17de785be
Author: Sun Rui 
Date:   2016-07-13T07:43:38Z

[SPARK-16522][MESOS] Spark application throws exception on exit.




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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