-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fault tolerance] Make executor actor restartable and fetch data from blockManager in actor calls #249
Conversation
If we use a normal task, which calls the actor internally, the actor method still need to be resubmitted because it's a dependency. I'm not sure if using spark to call the executors will work, but I think sparkcontext would be needed to do so. |
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
make RayAppMaster an actor enable cache locations to have better data locality Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work!
@@ -138,6 +142,12 @@ private[spark] class ApplicationInfo( | |||
registeredExecutors | |||
} | |||
|
|||
def isRemovedExecutor(executorId: String): Boolean = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was used in previous implementation. I'll remove it
val memory = appInfo.desc.memoryPerExecutorMB | ||
val newExecutorId = s"${appInfo.getNextExecutorId()}" | ||
// ray actor will restart using the old ID | ||
val handlerOpt = Ray.getActor("raydp-executor-" + executorId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the executor failed twice and restart? In the second time, the executor Id is not the original Id and there is a problem to get the actor? Can you add a test for this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No matter how many time it has failed, it is restarted using the parameters given when first created. The name won't change, either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the first restart, I saw the executorId was modified in RayCoarseGrainedExecutorBackend? Where is the original Id stored and can be got?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is changed. The original id is not stored in executor. It is saved in a mapping in RayAppMaster restartedExecutors. Ray also stores it in task's lineage.
if (appInfo.remainingUnRegisteredExecutors > 0) { | ||
val cores = appInfo.desc.coresPerExecutor.getOrElse(1) | ||
val memory = appInfo.desc.memoryPerExecutorMB | ||
val newExecutorId = s"${appInfo.getNextExecutorId()}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move this line into else {}? Otherwise if we go to the if {} code path, we don't need this new executor Id but we still increase the Id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right
def getRDDPartition(rddId: Int, | ||
partitionId: Int, | ||
schemaStr: String, | ||
driverAgentUrl: String): Array[Byte] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we follow Spark's code style for the indent? Please also check other places in the code. see https://github.com/databricks/scala-style-guide#indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
from py4j.java_gateway import JavaGateway, GatewayParameters | ||
from py4j.java_gateway import java_import, JavaGateway, GatewayParameters | ||
from py4j.clientserver import ClientServer, JavaParameters, PythonParameters | ||
from pyspark.find_spark_home import _find_spark_home |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this is not used. Can you please remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
Signed-off-by: Zhi Lin <[email protected]>
No description provided.