You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by tg...@apache.org on 2012/07/24 21:28:43 UTC
svn commit: r1365241 - in
/hadoop/common/branches/branch-2/hadoop-mapreduce-project: CHANGES.txt
hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java
Author: tgraves
Date: Tue Jul 24 19:28:43 2012
New Revision: 1365241
URL: http://svn.apache.org/viewvc?rev=1365241&view=rev
Log:
merge -r 1365239:1365240 from trunk. FIXES: MAPREDUCE-4467
Modified:
hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java
Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt?rev=1365241&r1=1365240&r2=1365241&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt Tue Jul 24 19:28:43 2012
@@ -625,6 +625,9 @@ Release 0.23.3 - UNRELEASED
maximum-am-resource-percent configurable on a per queue basis (tgraves via
bobby)
+ MAPREDUCE-4467. IndexCache failures due to missing synchronization
+ (Kihwal Lee via tgraves)
+
Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES
Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java?rev=1365241&r1=1365240&r2=1365241&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java (original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java Tue Jul 24 19:28:43 2012
@@ -67,13 +67,13 @@ class IndexCache {
if (info == null) {
info = readIndexFileToCache(fileName, mapId, expectedIndexOwner);
} else {
- while (isUnderConstruction(info)) {
- try {
- // In case the entry is ready after the above check but
- // before the following wait, we do timed wait.
- info.wait(200);
- } catch (InterruptedException e) {
- throw new IOException("Interrupted waiting for construction", e);
+ synchronized(info) {
+ while (isUnderConstruction(info)) {
+ try {
+ info.wait();
+ } catch (InterruptedException e) {
+ throw new IOException("Interrupted waiting for construction", e);
+ }
}
}
LOG.debug("IndexCache HIT: MapId " + mapId + " found");
@@ -101,13 +101,13 @@ class IndexCache {
IndexInformation info;
IndexInformation newInd = new IndexInformation();
if ((info = cache.putIfAbsent(mapId, newInd)) != null) {
- while (isUnderConstruction(info)) {
- try {
- // In case the entry is ready after the above check but
- // before the following wait, we do timed wait.
- info.wait(200);
- } catch (InterruptedException e) {
- throw new IOException("Interrupted waiting for construction", e);
+ synchronized(info) {
+ while (isUnderConstruction(info)) {
+ try {
+ info.wait();
+ } catch (InterruptedException e) {
+ throw new IOException("Interrupted waiting for construction", e);
+ }
}
}
LOG.debug("IndexCache HIT: MapId " + mapId + " found");