MAPREDUCE-6621. Memory Leak in JobClient#submitJobInternal(). Contributed by Xuan Gong

(cherry picked from commit 43e669b22d9ac0b81ab8cc397c5d6d92bac986c6)

Conflicts:

	hadoop-mapreduce-project/CHANGES.txt
This commit is contained in:
Jason Lowe 2016-02-02 19:33:32 +00:00
parent cd93382a59
commit fc01ec866a
2 changed files with 11 additions and 0 deletions

View File

@ -33,6 +33,9 @@ Release 2.6.4 - UNRELEASED
MAPREDUCE-6618. YarnClientProtocolProvider leaking the YarnClient thread.
(Xuan Gong via jlowe)
MAPREDUCE-6621. Memory Leak in JobClient#submitJobInternal() (Xuan Gong
via jlowe)
Release 2.6.3 - 2015-12-17
INCOMPATIBLE CHANGES

View File

@ -563,10 +563,18 @@ public Job run() throws IOException, ClassNotFoundException,
return job;
}
});
Cluster prev = cluster;
// update our Cluster instance with the one created by Job for submission
// (we can't pass our Cluster instance to Job, since Job wraps the config
// instance, and the two configs would then diverge)
cluster = job.getCluster();
// It is important to close the previous cluster instance
// to cleanup resources.
if (prev != null) {
prev.close();
}
return new NetworkedJob(job);
} catch (InterruptedException ie) {
throw new IOException("interrupted", ie);