You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ac...@apache.org on 2008/10/17 00:54:55 UTC
svn commit: r705391 - in /hadoop/core/trunk: CHANGES.txt
src/mapred/org/apache/hadoop/mapred/TaskTracker.java
Author: acmurthy
Date: Thu Oct 16 15:54:55 2008
New Revision: 705391
URL: http://svn.apache.org/viewvc?rev=705391&view=rev
Log:
HADOOP-3155. Ensure that there is only one thread fetching TaskCompletionEvents on TaskTracker re-init. Contributed by Dhruba Borthakur.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=705391&r1=705390&r2=705391&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Oct 16 15:54:55 2008
@@ -943,6 +943,10 @@
HADOOP-4418. Updates documentation in forrest for Mapred, streaming and pipes.
(Amareshwari Sriramadasu via ddas)
+ HADOOP-3155. Ensure that there is only one thread fetching
+ TaskCompletionEvents on TaskTracker re-init. (Dhruba Borthakur via
+ acmurthy)
+
Release 0.18.2 - Unreleased
BUG FIXES
Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java?rev=705391&r1=705390&r2=705391&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java Thu Oct 16 15:54:55 2008
@@ -118,7 +118,7 @@
public static final Log ClientTraceLog =
LogFactory.getLog(TaskTracker.class.getName() + ".clienttrace");
- private boolean running = true;
+ volatile boolean running = true;
private LocalDirAllocator localDirAllocator;
String taskTrackerName;
@@ -553,7 +553,7 @@
public void run() {
LOG.info("Starting thread: " + this.getName());
- while (true) {
+ while (running) {
try {
List <FetchStatus> fList = null;
synchronized (runningJobs) {
@@ -584,6 +584,9 @@
" events threw for " + f.jobId + " threw: " +
StringUtils.stringifyException(e));
}
+ if (!running) {
+ break;
+ }
}
synchronized (waitingOn) {
try {
@@ -867,6 +870,15 @@
// shutdown RPC connections
RPC.stopProxy(jobClient);
+
+ // wait for the fetcher thread to exit
+ for (boolean done = false; !done; ) {
+ try {
+ this.mapEventsFetcher.join();
+ done = true;
+ } catch (InterruptedException e) {
+ }
+ }
}
/**