-
Notifications
You must be signed in to change notification settings - Fork 9.1k
YARN-11511. Improve TestRMWebServices test config and data. #5745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
b550082
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 874beee
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K b3fccd5
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 0e50850
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 0c8a746
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K e330bb4
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K c8fffa5
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K b5d8d8f
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 83320ee
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K c93b07d
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K c256b74
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K f8c72b3
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K e532dff
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K e8a213d
Merge branch 'trunk' into YARN-11511
K0K0V0K 7d39cdd
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 1111835
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K c565c5f
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 4831389
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 6eda3f1
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 9116f53
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 1fbf9f0
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 2491d41
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 5df6603
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 761975e
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 2aedd64
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 362cca5
fix conflict resolution
tomicooler cc69339
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K fbad0a9
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 3a81d0e
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K e3fa6eb
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 35b2436
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K bec7ab3
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K d2f3fb8
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K b04ead4
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K 278a117
YARN-11511 Improve TestRMWebServices test config and data
K0K0V0K File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
430 changes: 70 additions & 360 deletions
430
.../org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySched.java
Large diffs are not rendered by default.
Oops, something went wrong.
390 changes: 117 additions & 273 deletions
390
...adoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySchedDynamicConfig.java
Large diffs are not rendered by default.
Oops, something went wrong.
93 changes: 93 additions & 0 deletions
93
...yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySchedLegacyQueueCreation.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.hadoop.yarn.server.resourcemanager.webapp; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import javax.ws.rs.core.MediaType; | ||
|
||
import com.sun.jersey.api.client.ClientResponse; | ||
import org.junit.Test; | ||
|
||
import org.apache.hadoop.yarn.server.resourcemanager.MockRM; | ||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler; | ||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerQueueManager; | ||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.QueuePath; | ||
import org.apache.hadoop.yarn.webapp.JerseyTestBase; | ||
|
||
import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfigGeneratorForTest.createConfiguration; | ||
import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerTestUtilities.GB; | ||
import static org.apache.hadoop.yarn.server.resourcemanager.webapp.TestWebServiceUtil.assertJsonResponse; | ||
import static org.apache.hadoop.yarn.server.resourcemanager.webapp.TestWebServiceUtil.createMutableRM; | ||
import static org.apache.hadoop.yarn.server.resourcemanager.webapp.TestWebServiceUtil.createWebAppDescriptor; | ||
|
||
public class TestRMWebServicesCapacitySchedLegacyQueueCreation extends | ||
K0K0V0K marked this conversation as resolved.
Show resolved
Hide resolved
|
||
JerseyTestBase { | ||
|
||
public TestRMWebServicesCapacitySchedLegacyQueueCreation() { | ||
super(createWebAppDescriptor()); | ||
} | ||
|
||
@Test | ||
public void testSchedulerResponsePercentageModeLegacyAutoCreation() | ||
throws Exception { | ||
Map<String, String> conf = new HashMap<>(); | ||
conf.put("yarn.scheduler.capacity.root.queues", "default, managed"); | ||
conf.put("yarn.scheduler.capacity.root.default.capacity", "20"); | ||
conf.put("yarn.scheduler.capacity.root.managed.capacity", "80"); | ||
conf.put("yarn.scheduler.capacity.root.managed." + | ||
"auto-create-child-queue.enabled", "true"); | ||
try (MockRM rm = createMutableRM(createConfiguration(conf))) { | ||
assertJsonResponse(sendRequest(), | ||
"webapp/scheduler-response-PercentageModeLegacyAutoCreation.json"); | ||
} | ||
} | ||
|
||
@Test | ||
public void testSchedulerResponseAbsoluteModeLegacyAutoCreation() | ||
throws Exception { | ||
Map<String, String> conf = new HashMap<>(); | ||
conf.put("yarn.scheduler.capacity.root.queues", "default, managed"); | ||
conf.put("yarn.scheduler.capacity.root.default.capacity", "[memory=28672,vcores=28]"); | ||
conf.put("yarn.scheduler.capacity.root.managed.capacity", "[memory=4096,vcores=4]"); | ||
K0K0V0K marked this conversation as resolved.
Show resolved
Hide resolved
|
||
conf.put("yarn.scheduler.capacity.root.managed.leaf-queue-template.capacity", | ||
"[memory=2048,vcores=2]"); | ||
conf.put("yarn.scheduler.capacity.root.managed." + | ||
"auto-create-child-queue.enabled", "true"); | ||
conf.put("yarn.scheduler.capacity.root.managed.leaf-queue-template.acl_submit_applications", | ||
"user"); | ||
conf.put("yarn.scheduler.capacity.root.managed.leaf-queue-template.acl_administer_queue", | ||
"admin"); | ||
try (MockRM rm = createMutableRM(createConfiguration(conf))) { | ||
rm.registerNode("h1:1234", 32 * GB, 32); | ||
CapacityScheduler cs = (CapacityScheduler) rm.getResourceScheduler(); | ||
CapacitySchedulerQueueManager autoQueueHandler = cs.getCapacitySchedulerQueueManager(); | ||
autoQueueHandler.createQueue(new QueuePath("root.managed.queue1")); | ||
assertJsonResponse(sendRequest(), | ||
"webapp/scheduler-response-AbsoluteModeLegacyAutoCreation.json"); | ||
} | ||
} | ||
|
||
private ClientResponse sendRequest() { | ||
return resource().path("ws").path("v1").path("cluster") | ||
.path("scheduler").accept(MediaType.APPLICATION_JSON) | ||
.get(ClientResponse.class); | ||
} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.