Author: cmccabe
Date: Wed Sep  4 18:23:51 2013
New Revision: 1520090

URL: http://svn.apache.org/r1520090
Log:
commit correct version of HDFS-5121

Modified:
    
hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BatchedRemoteIterator.java

Modified: 
hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BatchedRemoteIterator.java
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BatchedRemoteIterator.java?rev=1520090&r1=1520089&r2=1520090&view=diff
==============================================================================
--- 
hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BatchedRemoteIterator.java
 (original)
+++ 
hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BatchedRemoteIterator.java
 Wed Sep  4 18:23:51 2013
@@ -29,7 +29,7 @@ public abstract class BatchedRemoteItera
     public E get(int i);
     public int size();
   }
-  
+
   public static class BatchedListEntries<E> implements BatchedEntries<E> {
     private final List<E> entries;
 
@@ -39,7 +39,6 @@ public abstract class BatchedRemoteItera
 
     public E get(int i) {
       return entries.get(i);
-      
     }
 
     public int size() {
@@ -47,13 +46,13 @@ public abstract class BatchedRemoteItera
     }
   }
 
-  private K nextKey;
+  private K prevKey;
   private final int maxRepliesPerRequest;
   private BatchedEntries<E> entries;
   private int idx;
 
-  public BatchedRemoteIterator(K nextKey, int maxRepliesPerRequest) {
-    this.nextKey = nextKey;
+  public BatchedRemoteIterator(K prevKey, int maxRepliesPerRequest) {
+    this.prevKey = prevKey;
     this.maxRepliesPerRequest = maxRepliesPerRequest;
     this.entries = null;
     this.idx = -1;
@@ -66,13 +65,13 @@ public abstract class BatchedRemoteItera
    * @param maxRepliesPerRequest   The maximum number of replies to allow.
    * @return                       A list of replies.
    */
-  public abstract BatchedEntries<E> makeRequest(K nextKey, int 
maxRepliesPerRequest)
-      throws IOException;
+  public abstract BatchedEntries<E> makeRequest(K prevKey,
+      int maxRepliesPerRequest) throws IOException;
 
   private void makeRequest() throws IOException {
     idx = 0;
     entries = null;
-    entries = makeRequest(nextKey, maxRepliesPerRequest);
+    entries = makeRequest(prevKey, maxRepliesPerRequest);
     if (entries.size() > maxRepliesPerRequest) {
       throw new IOException("invalid number of replies returned: got " +
           entries.size() + ", expected " + maxRepliesPerRequest +
@@ -106,7 +105,7 @@ public abstract class BatchedRemoteItera
   /**
    * Return the next list key associated with an element.
    */
-  public abstract K elementToNextKey(E element);
+  public abstract K elementToPrevKey(E element);
 
   @Override
   public E next() throws IOException {
@@ -115,7 +114,7 @@ public abstract class BatchedRemoteItera
       throw new NoSuchElementException();
     }
     E entry = entries.get(idx++);
-    nextKey = elementToNextKey(entry);
+    prevKey = elementToPrevKey(entry);
     return entry;
   }
 }


Reply via email to