tomicooler commented on a change in pull request #3342:
URL: https://github.com/apache/hadoop/pull/3342#discussion_r698373686
##########
File path:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/QueuePath.java
##########
@@ -116,8 +121,79 @@ public boolean hasParent() {
return parent != null;
}
+ /**
+ * Creates a new {@code QueuePath} from the current full path as parent, and
+ * the appended child queue path as leaf.
+ * @param childQueue path of leaf queue
+ * @return new queue path made of current full path and appended leaf path
+ */
+ public QueuePath append(String childQueue) {
+ return new QueuePath(getFullPath(), childQueue);
+ }
+
+ /**
+ * Returns an iterator of queue path parts, starting from the highest level
+ * (generally root).
+ * @return queue part iterator
+ */
+ @Override
+ public Iterator<String> iterator() {
+ return
Arrays.asList(getFullPath().split(QUEUE_REGEX_DELIMITER)).iterator();
Review comment:
Thanks for the clarification. The thread can be resolved.
--
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]