szetszwo commented on code in PR #8125:
URL: https://github.com/apache/ozone/pull/8125#discussion_r2017488500


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerManager.java:
##########
@@ -72,6 +74,44 @@ default List<ContainerInfo> getContainers() {
    */
   List<ContainerInfo> getContainers(ContainerID startID, int count);
 
+  /**
+   * Returns the containers iterator with startID.
+   *
+   * @param startID start containerID, >=0,
+   * start searching at the head if 0.
+   *
+   * @return an iterator of container.
+   */
+  Iterator<ContainerInfo> getContainerInfoIterator(ContainerID startID);
+
+  /**
+   * Returns the containers iterator with startID and filters the values in 
iterator.
+   *
+   * @param startID start containerID, >=0,
+   * start searching at the head if 0.
+   * @param filter predicate value
+   *
+   * @return an iterator of container.
+   */
+  Iterator<ContainerInfo> getContainerInfoIterator(ContainerID startID, 
Predicate<ContainerInfo> filter);
+
+  /**
+   * Returns the containers iterator in a certain state with startID.
+   *
+   * @param state LifeCycleState of the container.
+   * @param startID start containerID, >=0,
+   * start searching at the head if 0.
+   *
+   * @return an iterator of container.
+   */
+  Iterator<ContainerInfo> getContainerInfoIterator(LifeCycleState state, 
ContainerID startID);
+
+  /**
+   * Return the container iterator.
+   * @return
+   */
+  Iterator<ContainerInfo> getContainerInfoIterator();

Review Comment:
   This is unused. Please remove it.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerStateManager.java:
##########
@@ -112,6 +114,30 @@ public interface ContainerStateManager {
    */
   List<ContainerInfo> getContainerInfos(ContainerID start, int count);
 
+  /**
+   * Get {@link ContainerInfo}s for the given state.
+   *
+   * @param start the start {@link ContainerID} (inclusive)
+   * @return an iterator of {@link ContainerInfo};
+   */
+  Iterator<ContainerInfo> getContainerInfoIterator(ContainerID start, 
Predicate<ContainerInfo> predicate);
+
+  /**
+   * Get {@link ContainerInfo}s for the given state.
+   *
+   * @param start the start {@link ContainerID} (inclusive)
+   * @return an iterator of {@link ContainerInfo};
+   */
+  Iterator<ContainerInfo> getContainerInfoIterator(ContainerID start);

Review Comment:
   This is unused.  Please remove it.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerManager.java:
##########
@@ -72,6 +74,44 @@ default List<ContainerInfo> getContainers() {
    */
   List<ContainerInfo> getContainers(ContainerID startID, int count);
 
+  /**
+   * Returns the containers iterator with startID.
+   *
+   * @param startID start containerID, >=0,
+   * start searching at the head if 0.
+   *
+   * @return an iterator of container.
+   */
+  Iterator<ContainerInfo> getContainerInfoIterator(ContainerID startID);

Review Comment:
   This is unused. Please remove it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to