You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2021/07/14 19:53:23 UTC

[GitHub] [hadoop] prasad-acit commented on a change in pull request #3197: HDFS-16125: fix the iterator for PartitionedGSet

prasad-acit commented on a change in pull request #3197:
URL: https://github.com/apache/hadoop/pull/3197#discussion_r669908410



##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/PartitionedGSet.java
##########
@@ -297,11 +306,9 @@ public boolean hasNext() {
     }
 
     @Override
-    public E next() {
-      while(!partitionIterator.hasNext()) {
-        K curKey = keyIterator.next();
-        partitionIterator = getPartition(curKey).iterator();
-      }
+    public E next() throws NoSuchElementException {

Review comment:
       This is runtime exception, not required to specify in the method signature.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org