Skip to content
Snippets Groups Projects
Commit 61073f83 authored by lianhuiwang's avatar lianhuiwang Committed by Andrew Or
Browse files

[SPARK-4994][network]Cleanup removed executors' ShuffleInfo in yarn shuffle service

when the application is completed, yarn's nodemanager can remove application's local-dirs.but all executors' metadata of completed application havenot be removed. now it lets yarn ShuffleService to have much more memory to store Executors' ShuffleInfo. so these metadata need to be removed.

Author: lianhuiwang <lianhuiwang09@gmail.com>

Closes #3828 from lianhuiwang/SPARK-4994 and squashes the following commits:

f3ba1d2 [lianhuiwang] Cleanup removed executors' ShuffleInfo
parent 2bda1c1d
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,9 @@ public class YarnShuffleService extends AuxiliaryService {
// The actual server that serves shuffle files
private TransportServer shuffleServer = null;
// Handles registering executors and opening shuffle blocks
private ExternalShuffleBlockHandler blockHandler;
public YarnShuffleService() {
super("spark_shuffle");
logger.info("Initializing YARN shuffle service for Spark");
......@@ -99,7 +102,8 @@ public class YarnShuffleService extends AuxiliaryService {
// If authentication is enabled, set up the shuffle server to use a
// special RPC handler that filters out unauthenticated fetch requests
boolean authEnabled = conf.getBoolean(SPARK_AUTHENTICATE_KEY, DEFAULT_SPARK_AUTHENTICATE);
RpcHandler rpcHandler = new ExternalShuffleBlockHandler(transportConf);
blockHandler = new ExternalShuffleBlockHandler(transportConf);
RpcHandler rpcHandler = blockHandler;
if (authEnabled) {
secretManager = new ShuffleSecretManager();
rpcHandler = new SaslRpcHandler(rpcHandler, secretManager);
......@@ -136,6 +140,7 @@ public class YarnShuffleService extends AuxiliaryService {
if (isAuthenticationEnabled()) {
secretManager.unregisterApp(appId);
}
blockHandler.applicationRemoved(appId, false /* clean up local dirs */);
} catch (Exception e) {
logger.error("Exception when stopping application {}", appId, e);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment