[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5645: YARN-8898. Fix FederationInterceptor#allocate to set application priority in allocateResponse.

2023-05-12 Thread via GitHub


slfan1989 commented on code in PR #5645:
URL: https://github.com/apache/hadoop/pull/5645#discussion_r1192123405


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/uam/TestUnmanagedApplicationManager.java:
##
@@ -542,4 +545,43 @@ public void testSeparateThreadWithoutBlockServiceStop() 
throws Exception {
 100, 2000);
 Assert.assertEquals(0, unmanagedAppMasterMap.size());
   }
+
+  @Test
+  public void testApplicationAttributes()
+  throws IOException, YarnException, InterruptedException, 
TimeoutException {
+long now = Time.now();
+ApplicationId applicationId = ApplicationId.newInstance(now, 10);
+
+Set tags = new HashSet<>();
+tags.add("1");
+tags.add("2");
+
+ApplicationSubmissionContext context =

Review Comment:
   I will modify this part of the code.



-- 
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-unsubscr...@hadoop.apache.org

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


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



[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5645: YARN-8898. Fix FederationInterceptor#allocate to set application priority in allocateResponse.

2023-05-12 Thread via GitHub


slfan1989 commented on code in PR #5645:
URL: https://github.com/apache/hadoop/pull/5645#discussion_r1192122850


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/TestableFederationInterceptor.java:
##
@@ -214,10 +215,10 @@ public TestableUnmanagedAMPoolManager(ExecutorService 
threadpool) {
 public UnmanagedApplicationManager createUAM(Configuration conf,
 ApplicationId appId, String queueName, String submitter,
 String appNameSuffix, boolean keepContainersAcrossApplicationAttempts,
-String rmId) {
+String rmId, ApplicationSubmissionContext 
originalAppSubmissionContext) {

Review Comment:
   I agree with your suggestion, I will modify the code.



-- 
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-unsubscr...@hadoop.apache.org

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


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



[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5645: YARN-8898. Fix FederationInterceptor#allocate to set application priority in allocateResponse.

2023-05-12 Thread via GitHub


slfan1989 commented on code in PR #5645:
URL: https://github.com/apache/hadoop/pull/5645#discussion_r1192108204


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/FederationInterceptor.java:
##
@@ -53,21 +53,7 @@
 import 
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse;
 import 
org.apache.hadoop.yarn.api.protocolrecords.impl.pb.RegisterApplicationMasterRequestPBImpl;
 import 
org.apache.hadoop.yarn.api.protocolrecords.impl.pb.RegisterApplicationMasterResponsePBImpl;
-import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
-import org.apache.hadoop.yarn.api.records.ApplicationId;
-import org.apache.hadoop.yarn.api.records.Container;
-import org.apache.hadoop.yarn.api.records.ContainerId;
-import org.apache.hadoop.yarn.api.records.ContainerReport;
-import org.apache.hadoop.yarn.api.records.ContainerStatus;
-import org.apache.hadoop.yarn.api.records.NMToken;
-import org.apache.hadoop.yarn.api.records.PreemptionContract;
-import org.apache.hadoop.yarn.api.records.PreemptionMessage;
-import org.apache.hadoop.yarn.api.records.Resource;
-import org.apache.hadoop.yarn.api.records.ResourceBlacklistRequest;
-import org.apache.hadoop.yarn.api.records.ResourceRequest;
-import org.apache.hadoop.yarn.api.records.StrictPreemptionContract;
-import org.apache.hadoop.yarn.api.records.UpdateContainerRequest;
-import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
+import org.apache.hadoop.yarn.api.records.*;

Review Comment:
   I will modify the code.



-- 
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-unsubscr...@hadoop.apache.org

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


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



[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5645: YARN-8898. Fix FederationInterceptor#allocate to set application priority in allocateResponse.

2023-05-11 Thread via GitHub


slfan1989 commented on code in PR #5645:
URL: https://github.com/apache/hadoop/pull/5645#discussion_r1191852103


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/uam/UnmanagedAMPoolManager.java:
##
@@ -188,14 +189,15 @@ public String createAndRegisterNewUAM(
   public Token launchUAM(String uamId, Configuration conf,
   ApplicationId appId, String queueName, String submitter,

Review Comment:
   Thank you for your help in reviewing the code! I will first fix the java doc 
involved in this pr, and then I will submit a separate pr to fix all the java 
docs related to yarn federation (different modules may require 1-2 pr).



-- 
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-unsubscr...@hadoop.apache.org

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


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