Author: szetszwo
Date: Mon Mar 10 23:40:21 2014
New Revision: 1576130

URL: http://svn.apache.org/r1576130
Log:
svn merge -c 1576128 from branch-2 for HDFS-5535.

Modified:
    hadoop/common/branches/branch-2.4/hadoop-common-project/   (props changed)
    hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/   
(props changed)
    
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/CHANGES.txt
   (props changed)
    hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/  
 (props changed)
    
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/docs/
   (props changed)
    
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/
   (props changed)
    
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java
    
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/test/core/
   (props changed)

Propchange: hadoop/common/branches/branch-2.4/hadoop-common-project/
------------------------------------------------------------------------------
  Merged /hadoop/common/trunk/hadoop-common-project:r1574259
  Merged /hadoop/common/branches/branch-2/hadoop-common-project:r1576128

Propchange: 
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/
------------------------------------------------------------------------------
  Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common:r1574259
  Merged 
/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common:r1576128

Propchange: 
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/CHANGES.txt
------------------------------------------------------------------------------
  Merged 
/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt:r1576128
  Merged 
/hadoop/common/branches/HDFS-5535/hadoop-common-project/hadoop-common/CHANGES.txt:r1550130-1574256
  Merged 
/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt:r1574259

Propchange: 
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/
------------------------------------------------------------------------------
  Merged 
/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src:r1576128
  Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src:r1574259

Propchange: 
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/docs/
------------------------------------------------------------------------------
  Merged 
/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/docs:r1574259
  Merged 
/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/docs:r1576128
  Merged 
/hadoop/common/branches/HDFS-5535/hadoop-common-project/hadoop-common/src/main/docs:r1550130-1574256

Propchange: 
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/
------------------------------------------------------------------------------
  Merged 
/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java:r1574259
  Merged 
/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java:r1576128
  Merged 
/hadoop/common/branches/HDFS-5535/hadoop-common-project/hadoop-common/src/main/java:r1550130-1574256

Modified: 
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java?rev=1576130&r1=1576129&r2=1576130&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java
 (original)
+++ 
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java
 Mon Mar 10 23:40:21 2014
@@ -244,13 +244,14 @@ public class LightWeightGSet<K, E extend
     out.println("\n]");
   }
 
-  private class SetIterator implements Iterator<E> {
+  public class SetIterator implements Iterator<E> {
     /** The starting modification for fail-fast. */
     private int iterModification = modification;
     /** The current index of the entry array. */
     private int index = -1;
     private LinkedElement cur = null;
     private LinkedElement next = nextNonemptyEntry();
+    private boolean trackModification = true;
 
     /** Find the next nonempty entry starting at (index + 1). */
     private LinkedElement nextNonemptyEntry() {
@@ -259,7 +260,7 @@ public class LightWeightGSet<K, E extend
     }
 
     private void ensureNext() {
-      if (modification != iterModification) {
+      if (trackModification && modification != iterModification) {
         throw new ConcurrentModificationException("modification=" + 
modification
             + " != iterModification = " + iterModification);
       }
@@ -304,6 +305,10 @@ public class LightWeightGSet<K, E extend
       iterModification++;
       cur = null;
     }
+
+    public void setTrackModification(boolean trackModification) {
+      this.trackModification = trackModification;
+    }
   }
   
   /**

Propchange: 
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/test/core/
------------------------------------------------------------------------------
  Merged 
/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/core:r1576128
  Merged 
/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/core:r1574259
  Merged 
/hadoop/common/branches/HDFS-5535/hadoop-common-project/hadoop-common/src/test/core:r1550130-1574256


Reply via email to