target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testDecommissionWithExcludeHosts() throws Exception { Configuration conf = new Configuration(); conf.set(YarnConfiguration.RM_NODES_EXCLUDE_FILE_PATH, hostFile .getAbsolutePath()); writeToHostsFile(""); final DrainDispatcher dispatcher = new DrainDispatcher(); rm = new MockRM(conf) { @Override protect...
@SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.getNodeId(); if (!this.nodesListManager.isValidNode(nodeId.getHost())) { String me...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
@Test public void testAddNewIncludePathToConfiguration() throws Exception { Configuration conf = new Configuration(); rm = new MockRM(conf); rm.start(); MockNM nm1 = rm.registerNode("host1:1234", 5120); MockNM nm2 = rm.registerNode("host2:5678", 10240); ClusterMetrics metrics = ClusterMetrics.getMetrics(); assert(metri...
@SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.getNodeId(); if (!this.nodesListManager.isValidNode(nodeId.getHost())) { String me...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
@Test public void testAddNewExcludePathToConfiguration() throws Exception { Configuration conf = new Configuration(); rm = new MockRM(conf); rm.start(); MockNM nm1 = rm.registerNode("host1:1234", 5120); MockNM nm2 = rm.registerNode("host2:5678", 10240); ClusterMetrics metrics = ClusterMetrics.getMetrics(); assert(metri...
@SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.getNodeId(); if (!this.nodesListManager.isValidNode(nodeId.getHost())) { String me...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
@Test public void testNodeRegistrationSuccess() throws Exception { writeToHostsFile("host2"); Configuration conf = new Configuration(); conf.set(YarnConfiguration.RM_NODES_INCLUDE_FILE_PATH, hostFile .getAbsolutePath()); rm = new MockRM(conf); rm.start(); ResourceTrackerService resourceTrackerService = rm.getResourceTr...
@SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); int cmPort = nodeId.getPort(); int httpPort = request.getHttpPort(); Resource capa...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
@Test public void testNodeRegistrationVersionLessThanRM() throws Exception { writeToHostsFile("host2"); Configuration conf = new Configuration(); conf.set(YarnConfiguration.RM_NODES_INCLUDE_FILE_PATH, hostFile .getAbsolutePath()); conf.set(YarnConfiguration.RM_NODEMANAGER_MINIMUM_VERSION,"EqualToRM" ); rm = new MockRM(...
@SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); int cmPort = nodeId.getPort(); int httpPort = request.getHttpPort(); Resource capa...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
@Test public void testNodeRegistrationFailure() throws Exception { writeToHostsFile("host1"); Configuration conf = new Configuration(); conf.set(YarnConfiguration.RM_NODES_INCLUDE_FILE_PATH, hostFile .getAbsolutePath()); rm = new MockRM(conf); rm.start(); ResourceTrackerService resourceTrackerService = rm.getResourceTr...
@SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); int cmPort = nodeId.getPort(); int httpPort = request.getHttpPort(); Resource capa...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
@Test public void testNodeRegistrationWithMinimumAllocations() throws Exception { Configuration conf = new Configuration(); conf.set(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, "2048"); conf.set(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_VCORES, "4"); conf.set(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALL...
@SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); int cmPort = nodeId.getPort(); int httpPort = request.getHttpPort(); Resource capa...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); in...
@Test public void testReboot() throws Exception { Configuration conf = new Configuration(); rm = new MockRM(conf); rm.start(); MockNM nm1 = rm.registerNode("host1:1234", 5120); MockNM nm2 = rm.registerNode("host2:1234", 2048); int initialMetricCount = ClusterMetrics.getMetrics().getNumRebootedNMs(); NodeHeartbeatRespon...
@SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.getNodeId(); if (!this.nodesListManager.isValidNode(nodeId.getHost())) { String me...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
@Test public void testUnhealthyNodeStatus() throws Exception { Configuration conf = new Configuration(); conf.set(YarnConfiguration.RM_NODES_EXCLUDE_FILE_PATH, hostFile .getAbsolutePath()); rm = new MockRM(conf); rm.start(); MockNM nm1 = rm.registerNode("host1:1234", 5120); Assert.assertEquals(0, ClusterMetrics.getMetr...
@SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.getNodeId(); if (!this.nodesListManager.isValidNode(nodeId.getHost())) { String me...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
@SuppressWarnings("unchecked") @Test public void testHandleContainerStatusInvalidCompletions() throws Exception { rm = new MockRM(new YarnConfiguration()); rm.start(); EventHandler handler = spy(rm.getRMContext().getDispatcher().getEventHandler()); RMApp app = rm.submitApp(1024, true); NMContainerStatus report = NMCont...
@SuppressWarnings("unchecked") @VisibleForTesting void handleNMContainerStatus(NMContainerStatus containerStatus, NodeId nodeId) { ApplicationAttemptId appAttemptId = containerStatus.getContainerId().getApplicationAttemptId(); RMApp rmApp = rmContext.getRMApps().get(appAttemptId.getApplicationId()); if (rmApp == null) ...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @VisibleForTesting void handleNMContainerStatus(NMContainerStatus containerStatus, NodeId nodeId) { ApplicationAttemptId appAttemptId = containerStatus.getContainerId().getApplicationAttemptId(); RMApp rmApp =...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @VisibleForTesting void handleNMContainerStatus(NMContainerStatus containerStatus, NodeId nodeId) { ApplicationAttemptId appAttemptId = containerStatus.getContainerId().getApplicationAttemptId(); RMApp rmApp =...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @VisibleForTesting void handleNMContainerStatus(NMContainerStatus containerStatus, NodeId nodeId) { ApplicationAttemptId appAttemptId = containerStatus.getContainerId().getApplicationAttemptId(); RMApp rmApp =...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @VisibleForTesting void handleNMContainerStatus(NMContainerStatus containerStatus, NodeId nodeId) { ApplicationAttemptId appAttemptId = containerStatus.getContainerId().getApplicationAttemptId(); RMApp rmApp =...
@Test public void testReconnectNode() throws Exception { final DrainDispatcher dispatcher = new DrainDispatcher(); rm = new MockRM() { @Override protected EventHandler<SchedulerEvent> createSchedulerEventDispatcher() { return new SchedulerEventDispatcher(this.scheduler) { @Override public void handle(SchedulerEvent eve...
@SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.getNodeId(); if (!this.nodesListManager.isValidNode(nodeId.getHost())) { String me...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
ResourceTrackerService extends AbstractService implements ResourceTracker { @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); NodeId nodeId = remoteNodeStatus.ge...
@Test(timeout=5000) public void testGetQueueResource() throws Exception { Resource clusterResource = Resource.newInstance(9999, 1, 1); mgr.addToCluserNodeLabels(toSet("red", "blue", "yellow")); mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId("host1"), toSet("red"))); mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId("h...
public Resource getQueueResource(String queueName, Set<String> queueLabels, Resource clusterResource) { try { readLock.lock(); if (queueLabels.contains(ANY)) { return clusterResource; } Queue q = queueCollections.get(queueName); if (null == q) { return Resources.none(); } return q.resource; } finally { readLock.unlock(...
RMNodeLabelsManager extends CommonNodeLabelsManager { public Resource getQueueResource(String queueName, Set<String> queueLabels, Resource clusterResource) { try { readLock.lock(); if (queueLabels.contains(ANY)) { return clusterResource; } Queue q = queueCollections.get(queueName); if (null == q) { return Resources.non...
RMNodeLabelsManager extends CommonNodeLabelsManager { public Resource getQueueResource(String queueName, Set<String> queueLabels, Resource clusterResource) { try { readLock.lock(); if (queueLabels.contains(ANY)) { return clusterResource; } Queue q = queueCollections.get(queueName); if (null == q) { return Resources.non...
RMNodeLabelsManager extends CommonNodeLabelsManager { public Resource getQueueResource(String queueName, Set<String> queueLabels, Resource clusterResource) { try { readLock.lock(); if (queueLabels.contains(ANY)) { return clusterResource; } Queue q = queueCollections.get(queueName); if (null == q) { return Resources.non...
RMNodeLabelsManager extends CommonNodeLabelsManager { public Resource getQueueResource(String queueName, Set<String> queueLabels, Resource clusterResource) { try { readLock.lock(); if (queueLabels.contains(ANY)) { return clusterResource; } Queue q = queueCollections.get(queueName); if (null == q) { return Resources.non...
@Test(timeout = 5000) public void testPullRMNodeLabelsInfo() throws IOException { mgr.addToCluserNodeLabels(toSet("x", "y", "z")); mgr.activateNode(NodeId.newInstance("n1", 1), Resource.newInstance(10, 0, 0)); mgr.activateNode(NodeId.newInstance("n2", 1), Resource.newInstance(10, 0, 0)); mgr.activateNode(NodeId.newInst...
public List<NodeLabel> pullRMNodeLabelsInfo() { try { readLock.lock(); List<NodeLabel> infos = new ArrayList<NodeLabel>(); for (Entry<String, NodeLabel> entry : labelCollections.entrySet()) { NodeLabel label = entry.getValue(); infos.add(label.getCopy()); } Collections.sort(infos); return infos; } finally { readLock.un...
RMNodeLabelsManager extends CommonNodeLabelsManager { public List<NodeLabel> pullRMNodeLabelsInfo() { try { readLock.lock(); List<NodeLabel> infos = new ArrayList<NodeLabel>(); for (Entry<String, NodeLabel> entry : labelCollections.entrySet()) { NodeLabel label = entry.getValue(); infos.add(label.getCopy()); } Collecti...
RMNodeLabelsManager extends CommonNodeLabelsManager { public List<NodeLabel> pullRMNodeLabelsInfo() { try { readLock.lock(); List<NodeLabel> infos = new ArrayList<NodeLabel>(); for (Entry<String, NodeLabel> entry : labelCollections.entrySet()) { NodeLabel label = entry.getValue(); infos.add(label.getCopy()); } Collecti...
RMNodeLabelsManager extends CommonNodeLabelsManager { public List<NodeLabel> pullRMNodeLabelsInfo() { try { readLock.lock(); List<NodeLabel> infos = new ArrayList<NodeLabel>(); for (Entry<String, NodeLabel> entry : labelCollections.entrySet()) { NodeLabel label = entry.getValue(); infos.add(label.getCopy()); } Collecti...
RMNodeLabelsManager extends CommonNodeLabelsManager { public List<NodeLabel> pullRMNodeLabelsInfo() { try { readLock.lock(); List<NodeLabel> infos = new ArrayList<NodeLabel>(); for (Entry<String, NodeLabel> entry : labelCollections.entrySet()) { NodeLabel label = entry.getValue(); infos.add(label.getCopy()); } Collecti...
@Test public void testGetApplicationReport() throws Exception { YarnScheduler yarnScheduler = mock(YarnScheduler.class); RMContext rmContext = mock(RMContext.class); mockRMContext(yarnScheduler, rmContext); ApplicationId appId1 = getApplicationId(1); ApplicationACLsManager mockAclsManager = mock(ApplicationACLsManager....
@Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException { ApplicationId applicationId = request.getApplicationId(); UserGroupInformation callerUGI; try { callerUGI = UserGroupInformation.getCurrentUser(); } catch (IOException ie) { LOG.info("Error ge...
ClientRMService extends AbstractService implements ApplicationClientProtocol { @Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException { ApplicationId applicationId = request.getApplicationId(); UserGroupInformation callerUGI; try { callerUGI = U...
ClientRMService extends AbstractService implements ApplicationClientProtocol { @Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException { ApplicationId applicationId = request.getApplicationId(); UserGroupInformation callerUGI; try { callerUGI = U...
ClientRMService extends AbstractService implements ApplicationClientProtocol { @Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException { ApplicationId applicationId = request.getApplicationId(); UserGroupInformation callerUGI; try { callerUGI = U...
ClientRMService extends AbstractService implements ApplicationClientProtocol { @Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException { ApplicationId applicationId = request.getApplicationId(); UserGroupInformation callerUGI; try { callerUGI = U...
@Test public void testSubmitReservationExceedsGangSize() { ReservationSubmissionRequest request = createSimpleReservationSubmissionRequest(1, 1, 1, 5, 4); Resource resource = Resource.newInstance(512, 1, 1); when(plan.getTotalCapacity()).thenReturn(resource); Plan plan = null; try { plan = rrValidator.validateReservati...
public Plan validateReservationSubmissionRequest( ReservationSystem reservationSystem, ReservationSubmissionRequest request, ReservationId reservationId) throws YarnException { String queueName = request.getQueue(); if (queueName == null || queueName.isEmpty()) { String errMsg = "The queue to submit is not specified." ...
ReservationInputValidator { public Plan validateReservationSubmissionRequest( ReservationSystem reservationSystem, ReservationSubmissionRequest request, ReservationId reservationId) throws YarnException { String queueName = request.getQueue(); if (queueName == null || queueName.isEmpty()) { String errMsg = "The queue t...
ReservationInputValidator { public Plan validateReservationSubmissionRequest( ReservationSystem reservationSystem, ReservationSubmissionRequest request, ReservationId reservationId) throws YarnException { String queueName = request.getQueue(); if (queueName == null || queueName.isEmpty()) { String errMsg = "The queue t...
ReservationInputValidator { public Plan validateReservationSubmissionRequest( ReservationSystem reservationSystem, ReservationSubmissionRequest request, ReservationId reservationId) throws YarnException { String queueName = request.getQueue(); if (queueName == null || queueName.isEmpty()) { String errMsg = "The queue t...
ReservationInputValidator { public Plan validateReservationSubmissionRequest( ReservationSystem reservationSystem, ReservationSubmissionRequest request, ReservationId reservationId) throws YarnException { String queueName = request.getQueue(); if (queueName == null || queueName.isEmpty()) { String errMsg = "The queue t...
@Test public void testUpdateReservationExceedsGangSize() { ReservationUpdateRequest request = createSimpleReservationUpdateRequest(1, 1, 1, 5, 4); Resource resource = Resource.newInstance(512, 1, 1); when(plan.getTotalCapacity()).thenReturn(resource); Plan plan = null; try { plan = rrValidator.validateReservationUpdate...
public Plan validateReservationUpdateRequest( ReservationSystem reservationSystem, ReservationUpdateRequest request) throws YarnException { ReservationId reservationId = request.getReservationId(); Plan plan = validateReservation(reservationSystem, reservationId, AuditConstants.UPDATE_RESERVATION_REQUEST); validateRese...
ReservationInputValidator { public Plan validateReservationUpdateRequest( ReservationSystem reservationSystem, ReservationUpdateRequest request) throws YarnException { ReservationId reservationId = request.getReservationId(); Plan plan = validateReservation(reservationSystem, reservationId, AuditConstants.UPDATE_RESERV...
ReservationInputValidator { public Plan validateReservationUpdateRequest( ReservationSystem reservationSystem, ReservationUpdateRequest request) throws YarnException { ReservationId reservationId = request.getReservationId(); Plan plan = validateReservation(reservationSystem, reservationId, AuditConstants.UPDATE_RESERV...
ReservationInputValidator { public Plan validateReservationUpdateRequest( ReservationSystem reservationSystem, ReservationUpdateRequest request) throws YarnException { ReservationId reservationId = request.getReservationId(); Plan plan = validateReservation(reservationSystem, reservationId, AuditConstants.UPDATE_RESERV...
ReservationInputValidator { public Plan validateReservationUpdateRequest( ReservationSystem reservationSystem, ReservationUpdateRequest request) throws YarnException { ReservationId reservationId = request.getReservationId(); Plan plan = validateReservation(reservationSystem, reservationId, AuditConstants.UPDATE_RESERV...
@SuppressWarnings("javadoc") @Test public void testSimple() throws PlanningException { prepareBasicPlan(); ReservationDefinition rr = new ReservationDefinitionPBImpl(); rr.setArrival(5 * step); rr.setDeadline(20 * step); ReservationRequest r = ReservationRequest.newInstance( Resource.newInstance(2048, 2, 2), 10, 5, 10 ...
@Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
@Test public void testOrder() throws PlanningException { prepareBasicPlan(); int[] f = { 100, 100 }; assertTrue(plan.toString(), plan.addReservation(new InMemoryReservationAllocation( ReservationSystemTestUtil.getNewReservationId(), null, "u1", "dedicated", 30 * step, 30 * step + f.length * step, ReservationSystemTestU...
@Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
@Test public void testOrderNoGapImpossible() throws PlanningException { prepareBasicPlan(); int[] f = { 100, 100 }; assertTrue(plan.toString(), plan.addReservation(new InMemoryReservationAllocation( ReservationSystemTestUtil.getNewReservationId(), null, "u1", "dedicated", 30 * step, 30 * step + f.length * step, Reserva...
@Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
@Test public void testOrderNoGap() throws PlanningException { prepareBasicPlan(); ReservationDefinition rr = new ReservationDefinitionPBImpl(); rr.setArrival(0 * step); rr.setDeadline(60 * step); ReservationRequests reqs = new ReservationRequestsPBImpl(); reqs.setInterpreter(ReservationRequestInterpreter.R_ORDER_NO_GAP...
@Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
@Test public void testSingleSliding() throws PlanningException { prepareBasicPlan(); ReservationDefinition rr = new ReservationDefinitionPBImpl(); rr.setArrival(100 * step); rr.setDeadline(120 * step); ReservationRequests reqs = new ReservationRequestsPBImpl(); reqs.setInterpreter(ReservationRequestInterpreter.R_ALL); ...
@Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
@Test public void testAny() throws PlanningException { prepareBasicPlan(); ReservationDefinition rr = new ReservationDefinitionPBImpl(); rr.setArrival(100 * step); rr.setDeadline(120 * step); ReservationRequests reqs = new ReservationRequestsPBImpl(); reqs.setInterpreter(ReservationRequestInterpreter.R_ANY); Reservatio...
@Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
@Test public void testAnyImpossible() throws PlanningException { prepareBasicPlan(); ReservationDefinition rr = new ReservationDefinitionPBImpl(); rr.setArrival(100L); rr.setDeadline(120L); ReservationRequests reqs = new ReservationRequestsPBImpl(); reqs.setInterpreter(ReservationRequestInterpreter.R_ANY); ReservationR...
@Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
@Test public void testAll() throws PlanningException { prepareBasicPlan(); ReservationDefinition rr = new ReservationDefinitionPBImpl(); rr.setArrival(100 * step); rr.setDeadline(120 * step); ReservationRequests reqs = new ReservationRequestsPBImpl(); reqs.setInterpreter(ReservationRequestInterpreter.R_ALL); Reservatio...
@Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
@Test public void testAllImpossible() throws PlanningException { prepareBasicPlan(); ReservationDefinition rr = new ReservationDefinitionPBImpl(); rr.setArrival(100L); rr.setDeadline(120L); ReservationRequests reqs = new ReservationRequestsPBImpl(); reqs.setInterpreter(ReservationRequestInterpreter.R_ALL); ReservationR...
@Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } }
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
GreedyReservationAgent implements ReservationAgent { @Override public boolean createReservation(ReservationId reservationId, String user, Plan plan, ReservationDefinition contract) throws PlanningException { return computeAllocation(reservationId, user, plan, contract, null); } @Override boolean createReservation(Rese...
@Test public void testAddReservation() { Plan plan = new InMemoryPlan(queueMetrics, policy, agent, totalCapacity, 1L, resCalc, minAlloc, maxAlloc, planName, replanner, true); ReservationId reservationID = ReservationSystemTestUtil.getNewReservationId(); int[] alloc = { 10, 10, 10, 10, 10, 10 }; int start = 100; Map<Res...
@Override public boolean addReservation(ReservationAllocation reservation) throws PlanningException { InMemoryReservationAllocation inMemReservation = (InMemoryReservationAllocation) reservation; if (inMemReservation.getUser() == null) { String errMsg = "The specified Reservation with ID " + inMemReservation.getReserva...
InMemoryPlan implements Plan { @Override public boolean addReservation(ReservationAllocation reservation) throws PlanningException { InMemoryReservationAllocation inMemReservation = (InMemoryReservationAllocation) reservation; if (inMemReservation.getUser() == null) { String errMsg = "The specified Reservation with ID ...
InMemoryPlan implements Plan { @Override public boolean addReservation(ReservationAllocation reservation) throws PlanningException { InMemoryReservationAllocation inMemReservation = (InMemoryReservationAllocation) reservation; if (inMemReservation.getUser() == null) { String errMsg = "The specified Reservation with ID ...
InMemoryPlan implements Plan { @Override public boolean addReservation(ReservationAllocation reservation) throws PlanningException { InMemoryReservationAllocation inMemReservation = (InMemoryReservationAllocation) reservation; if (inMemReservation.getUser() == null) { String errMsg = "The specified Reservation with ID ...
InMemoryPlan implements Plan { @Override public boolean addReservation(ReservationAllocation reservation) throws PlanningException { InMemoryReservationAllocation inMemReservation = (InMemoryReservationAllocation) reservation; if (inMemReservation.getUser() == null) { String errMsg = "The specified Reservation with ID ...
@Test public void testUpdateReservation() { Plan plan = new InMemoryPlan(queueMetrics, policy, agent, totalCapacity, 1L, resCalc, minAlloc, maxAlloc, planName, replanner, true); ReservationId reservationID = ReservationSystemTestUtil.getNewReservationId(); int[] alloc = { 10, 10, 10, 10, 10, 10 }; int start = 100; Map<...
@Override public boolean updateReservation(ReservationAllocation reservation) throws PlanningException { writeLock.lock(); boolean result = false; try { ReservationId resId = reservation.getReservationId(); ReservationAllocation currReservation = getReservationById(resId); if (currReservation == null) { String errMsg =...
InMemoryPlan implements Plan { @Override public boolean updateReservation(ReservationAllocation reservation) throws PlanningException { writeLock.lock(); boolean result = false; try { ReservationId resId = reservation.getReservationId(); ReservationAllocation currReservation = getReservationById(resId); if (currReserva...
InMemoryPlan implements Plan { @Override public boolean updateReservation(ReservationAllocation reservation) throws PlanningException { writeLock.lock(); boolean result = false; try { ReservationId resId = reservation.getReservationId(); ReservationAllocation currReservation = getReservationById(resId); if (currReserva...
InMemoryPlan implements Plan { @Override public boolean updateReservation(ReservationAllocation reservation) throws PlanningException { writeLock.lock(); boolean result = false; try { ReservationId resId = reservation.getReservationId(); ReservationAllocation currReservation = getReservationById(resId); if (currReserva...
InMemoryPlan implements Plan { @Override public boolean updateReservation(ReservationAllocation reservation) throws PlanningException { writeLock.lock(); boolean result = false; try { ReservationId resId = reservation.getReservationId(); ReservationAllocation currReservation = getReservationById(resId); if (currReserva...
@Test public void testDeleteReservation() { Plan plan = new InMemoryPlan(queueMetrics, policy, agent, totalCapacity, 1L, resCalc, minAlloc, maxAlloc, planName, replanner, true); ReservationId reservationID = ReservationSystemTestUtil.getNewReservationId(); int[] alloc = { 10, 10, 10, 10, 10, 10 }; int start = 100; Map<...
@Override public boolean deleteReservation(ReservationId reservationID) { writeLock.lock(); try { ReservationAllocation reservation = getReservationById(reservationID); if (reservation == null) { String errMsg = "The specified Reservation with ID " + reservationID + " does not exist in the plan"; LOG.error(errMsg); thr...
InMemoryPlan implements Plan { @Override public boolean deleteReservation(ReservationId reservationID) { writeLock.lock(); try { ReservationAllocation reservation = getReservationById(reservationID); if (reservation == null) { String errMsg = "The specified Reservation with ID " + reservationID + " does not exist in th...
InMemoryPlan implements Plan { @Override public boolean deleteReservation(ReservationId reservationID) { writeLock.lock(); try { ReservationAllocation reservation = getReservationById(reservationID); if (reservation == null) { String errMsg = "The specified Reservation with ID " + reservationID + " does not exist in th...
InMemoryPlan implements Plan { @Override public boolean deleteReservation(ReservationId reservationID) { writeLock.lock(); try { ReservationAllocation reservation = getReservationById(reservationID); if (reservation == null) { String errMsg = "The specified Reservation with ID " + reservationID + " does not exist in th...
InMemoryPlan implements Plan { @Override public boolean deleteReservation(ReservationId reservationID) { writeLock.lock(); try { ReservationAllocation reservation = getReservationById(reservationID); if (reservation == null) { String errMsg = "The specified Reservation with ID " + reservationID + " does not exist in th...
@Test public void testArchiveCompletedReservations() { Plan plan = new InMemoryPlan(queueMetrics, policy, agent, totalCapacity, 1L, resCalc, minAlloc, maxAlloc, planName, replanner, true); ReservationId reservationID1 = ReservationSystemTestUtil.getNewReservationId(); int[] alloc1 = { 10, 10, 10, 10, 10, 10 }; int star...
@Override public void archiveCompletedReservations(long tick) { LOG.debug("Running archival at time: {}", tick); List<InMemoryReservationAllocation> expiredReservations = new ArrayList<InMemoryReservationAllocation>(); readLock.lock(); try { long archivalTime = tick - policy.getValidWindow(); ReservationInterval search...
InMemoryPlan implements Plan { @Override public void archiveCompletedReservations(long tick) { LOG.debug("Running archival at time: {}", tick); List<InMemoryReservationAllocation> expiredReservations = new ArrayList<InMemoryReservationAllocation>(); readLock.lock(); try { long archivalTime = tick - policy.getValidWindo...
InMemoryPlan implements Plan { @Override public void archiveCompletedReservations(long tick) { LOG.debug("Running archival at time: {}", tick); List<InMemoryReservationAllocation> expiredReservations = new ArrayList<InMemoryReservationAllocation>(); readLock.lock(); try { long archivalTime = tick - policy.getValidWindo...
InMemoryPlan implements Plan { @Override public void archiveCompletedReservations(long tick) { LOG.debug("Running archival at time: {}", tick); List<InMemoryReservationAllocation> expiredReservations = new ArrayList<InMemoryReservationAllocation>(); readLock.lock(); try { long archivalTime = tick - policy.getValidWindo...
InMemoryPlan implements Plan { @Override public void archiveCompletedReservations(long tick) { LOG.debug("Running archival at time: {}", tick); List<InMemoryReservationAllocation> expiredReservations = new ArrayList<InMemoryReservationAllocation>(); readLock.lock(); try { long archivalTime = tick - policy.getValidWindo...
@Test public void testUpdateMaxAllocationUsesTotal() throws IOException { final int configuredMaxVCores = 20; final int configuredMaxMemory = 10 * 1024; Resource configuredMaximumResource = Resource.newInstance (configuredMaxMemory, configuredMaxVCores, configuredMaxVCores); configureScheduler(); YarnConfiguration conf...
protected void updateMaximumAllocation(SchedulerNode node, boolean add) { Resource totalResource = node.getTotalResource(); maxAllocWriteLock.lock(); try { if (add) { int nodeMemory = totalResource.getMemory(); if (nodeMemory > maxNodeMemory) { maxNodeMemory = nodeMemory; maximumAllocation.setMemory(Math.min( configure...
AbstractYarnScheduler extends AbstractService implements ResourceScheduler { protected void updateMaximumAllocation(SchedulerNode node, boolean add) { Resource totalResource = node.getTotalResource(); maxAllocWriteLock.lock(); try { if (add) { int nodeMemory = totalResource.getMemory(); if (nodeMemory > maxNodeMemory) ...
AbstractYarnScheduler extends AbstractService implements ResourceScheduler { protected void updateMaximumAllocation(SchedulerNode node, boolean add) { Resource totalResource = node.getTotalResource(); maxAllocWriteLock.lock(); try { if (add) { int nodeMemory = totalResource.getMemory(); if (nodeMemory > maxNodeMemory) ...
AbstractYarnScheduler extends AbstractService implements ResourceScheduler { protected void updateMaximumAllocation(SchedulerNode node, boolean add) { Resource totalResource = node.getTotalResource(); maxAllocWriteLock.lock(); try { if (add) { int nodeMemory = totalResource.getMemory(); if (nodeMemory > maxNodeMemory) ...
AbstractYarnScheduler extends AbstractService implements ResourceScheduler { protected void updateMaximumAllocation(SchedulerNode node, boolean add) { Resource totalResource = node.getTotalResource(); maxAllocWriteLock.lock(); try { if (add) { int nodeMemory = totalResource.getMemory(); if (nodeMemory > maxNodeMemory) ...
@Test public void testMaxAllocationAfterUpdateNodeResource() throws IOException { final int configuredMaxVCores = 20; final int configuredMaxMemory = 10 * 1024; Resource configuredMaximumResource = Resource.newInstance (configuredMaxMemory, configuredMaxVCores, configuredMaxVCores); configureScheduler(); YarnConfigurat...
public synchronized void updateNodeResource(RMNode nm, ResourceOption resourceOption) { SchedulerNode node = getSchedulerNode(nm.getNodeID()); Resource newResource = resourceOption.getResource(); Resource oldResource = node.getTotalResource(); if(!oldResource.equals(newResource)) { rmContext.getNodeLabelManager().updat...
AbstractYarnScheduler extends AbstractService implements ResourceScheduler { public synchronized void updateNodeResource(RMNode nm, ResourceOption resourceOption) { SchedulerNode node = getSchedulerNode(nm.getNodeID()); Resource newResource = resourceOption.getResource(); Resource oldResource = node.getTotalResource();...
AbstractYarnScheduler extends AbstractService implements ResourceScheduler { public synchronized void updateNodeResource(RMNode nm, ResourceOption resourceOption) { SchedulerNode node = getSchedulerNode(nm.getNodeID()); Resource newResource = resourceOption.getResource(); Resource oldResource = node.getTotalResource();...
AbstractYarnScheduler extends AbstractService implements ResourceScheduler { public synchronized void updateNodeResource(RMNode nm, ResourceOption resourceOption) { SchedulerNode node = getSchedulerNode(nm.getNodeID()); Resource newResource = resourceOption.getResource(); Resource oldResource = node.getTotalResource();...
AbstractYarnScheduler extends AbstractService implements ResourceScheduler { public synchronized void updateNodeResource(RMNode nm, ResourceOption resourceOption) { SchedulerNode node = getSchedulerNode(nm.getNodeID()); Resource newResource = resourceOption.getResource(); Resource oldResource = node.getTotalResource();...
@Test(timeout=5000) public void testFifoSchedulerCapacityWhenNoNMs() { FifoScheduler scheduler = new FifoScheduler(); QueueInfo queueInfo = scheduler.getQueueInfo(null, false, false); Assert.assertEquals(0.0f, queueInfo.getCurrentCapacity(), 0.0f); }
@Override public QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive) { return DEFAULT_QUEUE.getQueueInfo(false, false); }
FifoScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements Configurable { @Override public QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive) { return DEFAULT_QUEUE.getQueueInfo(false, false); } }
FifoScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements Configurable { @Override public QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive) { return DEFAULT_QUEUE.getQueueInfo(false, false); } FifoScheduler(); }
FifoScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements Configurable { @Override public QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive) { return DEFAULT_QUEUE.getQueueInfo(false, false); } FifoScheduler(); @Override void serviceInit(Con...
FifoScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements Configurable { @Override public QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive) { return DEFAULT_QUEUE.getQueueInfo(false, false); } FifoScheduler(); @Override void serviceInit(Con...
@Test public void testGetAppsInQueue() throws Exception { Application application_0 = new Application("user_0", resourceManager); application_0.submit(); Application application_1 = new Application("user_0", resourceManager); application_1.submit(); ResourceScheduler scheduler = resourceManager.getResourceScheduler(); ...
@Override public synchronized List<ApplicationAttemptId> getAppsInQueue(String queueName) { if (queueName.equals(DEFAULT_QUEUE.getQueueName())) { List<ApplicationAttemptId> attempts = new ArrayList<ApplicationAttemptId>(applications.size()); for (SchedulerApplication<FiCaSchedulerApp> app : applications.values()) { att...
FifoScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements Configurable { @Override public synchronized List<ApplicationAttemptId> getAppsInQueue(String queueName) { if (queueName.equals(DEFAULT_QUEUE.getQueueName())) { List<ApplicationAttemptId> attempts = new ArrayList<Applica...
FifoScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements Configurable { @Override public synchronized List<ApplicationAttemptId> getAppsInQueue(String queueName) { if (queueName.equals(DEFAULT_QUEUE.getQueueName())) { List<ApplicationAttemptId> attempts = new ArrayList<Applica...
FifoScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements Configurable { @Override public synchronized List<ApplicationAttemptId> getAppsInQueue(String queueName) { if (queueName.equals(DEFAULT_QUEUE.getQueueName())) { List<ApplicationAttemptId> attempts = new ArrayList<Applica...
FifoScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements Configurable { @Override public synchronized List<ApplicationAttemptId> getAppsInQueue(String queueName) { if (queueName.equals(DEFAULT_QUEUE.getQueueName())) { List<ApplicationAttemptId> attempts = new ArrayList<Applica...
@Test public void testMove() { final String user = "user1"; Queue parentQueue = createQueue("parent", null); Queue oldQueue = createQueue("old", parentQueue); Queue newQueue = createQueue("new", parentQueue); QueueMetrics parentMetrics = parentQueue.getMetrics(); QueueMetrics oldMetrics = oldQueue.getMetrics(); QueueMe...
public synchronized void move(Queue newQueue) { QueueMetrics oldMetrics = queue.getMetrics(); QueueMetrics newMetrics = newQueue.getMetrics(); String user = getUser(); for (RMContainer liveContainer : liveContainers.values()) { Resource resource = liveContainer.getContainer().getResource(); oldMetrics.releaseResources(...
SchedulerApplicationAttempt { public synchronized void move(Queue newQueue) { QueueMetrics oldMetrics = queue.getMetrics(); QueueMetrics newMetrics = newQueue.getMetrics(); String user = getUser(); for (RMContainer liveContainer : liveContainers.values()) { Resource resource = liveContainer.getContainer().getResource()...
SchedulerApplicationAttempt { public synchronized void move(Queue newQueue) { QueueMetrics oldMetrics = queue.getMetrics(); QueueMetrics newMetrics = newQueue.getMetrics(); String user = getUser(); for (RMContainer liveContainer : liveContainers.values()) { Resource resource = liveContainer.getContainer().getResource()...
SchedulerApplicationAttempt { public synchronized void move(Queue newQueue) { QueueMetrics oldMetrics = queue.getMetrics(); QueueMetrics newMetrics = newQueue.getMetrics(); String user = getUser(); for (RMContainer liveContainer : liveContainers.values()) { Resource resource = liveContainer.getContainer().getResource()...
SchedulerApplicationAttempt { public synchronized void move(Queue newQueue) { QueueMetrics oldMetrics = queue.getMetrics(); QueueMetrics newMetrics = newQueue.getMetrics(); String user = getUser(); for (RMContainer liveContainer : liveContainers.values()) { Resource resource = liveContainer.getContainer().getResource()...
@Test (timeout = 30000) public void testNormalizeRequest() { ResourceCalculator resourceCalculator = new DefaultResourceCalculator(); final int minMemory = 1024; final int maxMemory = 8192; Resource minResource = Resources.createResource(minMemory, 0, 0); Resource maxResource = Resources.createResource(maxMemory, 0, 0)...
public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumResource); ask.set...
SchedulerUtils { public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumR...
SchedulerUtils { public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumR...
SchedulerUtils { public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumR...
SchedulerUtils { public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumR...
@Test (timeout = 30000) public void testNormalizeRequestWithDominantResourceCalculator() { ResourceCalculator resourceCalculator = new DominantResourceCalculator(); Resource minResource = Resources.createResource(1024, 1, 0); Resource maxResource = Resources.createResource(10240, 10, 10); Resource clusterResource = Res...
public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumResource); ask.set...
SchedulerUtils { public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumR...
SchedulerUtils { public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumR...
SchedulerUtils { public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumR...
SchedulerUtils { public static void normalizeRequest( ResourceRequest ask, ResourceCalculator resourceCalculator, Resource clusterResource, Resource minimumResource, Resource maximumResource) { Resource normalized = Resources.normalize( resourceCalculator, ask.getCapability(), minimumResource, maximumResource, minimumR...
@Test (timeout = 30000) public void testValidateResourceRequestWithErrorLabelsPermission() throws IOException { YarnScheduler scheduler = mock(YarnScheduler.class); Set<String> queueAccessibleNodeLabels = Sets.newHashSet(); QueueInfo queueInfo = mock(QueueInfo.class); when(queueInfo.getQueueName()).thenReturn("queue");...
public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueueInfo(queueName, ...
SchedulerUtils { public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueu...
SchedulerUtils { public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueu...
SchedulerUtils { public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueu...
SchedulerUtils { public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueu...
@Test (timeout = 30000) public void testValidateResourceRequest() { YarnScheduler mockScheduler = mock(YarnScheduler.class); Resource maxResource = Resources.createResource( YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_MB, YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES, YarnConfiguration....
private static void validateResourceRequest(ResourceRequest resReq, Resource maximumResource, QueueInfo queueInfo, RMContext rmContext) throws InvalidResourceRequestException { if (resReq.getCapability().getMemory() < 0 || resReq.getCapability().getMemory() > maximumResource.getMemory()) { throw new InvalidResourceRequ...
SchedulerUtils { private static void validateResourceRequest(ResourceRequest resReq, Resource maximumResource, QueueInfo queueInfo, RMContext rmContext) throws InvalidResourceRequestException { if (resReq.getCapability().getMemory() < 0 || resReq.getCapability().getMemory() > maximumResource.getMemory()) { throw new In...
SchedulerUtils { private static void validateResourceRequest(ResourceRequest resReq, Resource maximumResource, QueueInfo queueInfo, RMContext rmContext) throws InvalidResourceRequestException { if (resReq.getCapability().getMemory() < 0 || resReq.getCapability().getMemory() > maximumResource.getMemory()) { throw new In...
SchedulerUtils { private static void validateResourceRequest(ResourceRequest resReq, Resource maximumResource, QueueInfo queueInfo, RMContext rmContext) throws InvalidResourceRequestException { if (resReq.getCapability().getMemory() < 0 || resReq.getCapability().getMemory() > maximumResource.getMemory()) { throw new In...
SchedulerUtils { private static void validateResourceRequest(ResourceRequest resReq, Resource maximumResource, QueueInfo queueInfo, RMContext rmContext) throws InvalidResourceRequestException { if (resReq.getCapability().getMemory() < 0 || resReq.getCapability().getMemory() > maximumResource.getMemory()) { throw new In...
@Test (timeout = 30000) public void testNormalizeNodeLabelExpression() throws IOException { YarnScheduler scheduler = mock(YarnScheduler.class); Set<String> queueAccessibleNodeLabels = Sets.newHashSet(); QueueInfo queueInfo = mock(QueueInfo.class); when(queueInfo.getQueueName()).thenReturn("queue"); when(queueInfo.getA...
public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueueInfo(queueName, ...
SchedulerUtils { public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueu...
SchedulerUtils { public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueu...
SchedulerUtils { public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueu...
SchedulerUtils { public static void normalizeAndValidateRequest(ResourceRequest resReq, Resource maximumResource, String queueName, YarnScheduler scheduler, boolean isRecovery, RMContext rmContext, QueueInfo queueInfo) throws InvalidResourceRequestException { if (queueInfo == null) { try { queueInfo = scheduler.getQueu...
@Test (timeout = 30000) public void testConfValidation() throws Exception { scheduler = new FairScheduler(); Configuration conf = new YarnConfiguration(); conf.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, 2048); conf.setInt(YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB, 1024); try { scheduler.ser...
@Override public void serviceInit(Configuration conf) throws Exception { initScheduler(conf); super.serviceInit(conf); }
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public void serviceInit(Configuration conf) throws Exception { initScheduler(conf); super.serviceInit(conf); } }
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public void serviceInit(Configuration conf) throws Exception { initScheduler(conf); super.serviceInit(conf); } FairScheduler(); }
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public void serviceInit(Configuration conf) throws Exception { initScheduler(conf); super.serviceInit(conf); } FairScheduler(); FairSchedulerConfiguration getConf(); QueueManager getQueueManager(); synchronized RMContainerTokenSe...
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public void serviceInit(Configuration conf) throws Exception { initScheduler(conf); super.serviceInit(conf); } FairScheduler(); FairSchedulerConfiguration getConf(); QueueManager getQueueManager(); synchronized RMContainerTokenSe...
@Test public void testAssignToQueue() throws Exception { conf.set(FairSchedulerConfiguration.USER_AS_DEFAULT_QUEUE, "true"); scheduler.init(conf); scheduler.start(); scheduler.reinitialize(conf, resourceManager.getRMContext()); RMApp rmApp1 = new MockRMApp(0, 0, RMAppState.NEW); RMApp rmApp2 = new MockRMApp(1, 1, RMApp...
@VisibleForTesting FSLeafQueue assignToQueue(RMApp rmApp, String queueName, String user) { FSLeafQueue queue = null; String appRejectMsg = null; try { QueuePlacementPolicy placementPolicy = allocConf.getPlacementPolicy(); queueName = placementPolicy.assignAppToQueue(queueName, user); if (queueName == null) { appRejectM...
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @VisibleForTesting FSLeafQueue assignToQueue(RMApp rmApp, String queueName, String user) { FSLeafQueue queue = null; String appRejectMsg = null; try { QueuePlacementPolicy placementPolicy = allocConf.getPlacementPolicy(); queueName = place...
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @VisibleForTesting FSLeafQueue assignToQueue(RMApp rmApp, String queueName, String user) { FSLeafQueue queue = null; String appRejectMsg = null; try { QueuePlacementPolicy placementPolicy = allocConf.getPlacementPolicy(); queueName = place...
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @VisibleForTesting FSLeafQueue assignToQueue(RMApp rmApp, String queueName, String user) { FSLeafQueue queue = null; String appRejectMsg = null; try { QueuePlacementPolicy placementPolicy = allocConf.getPlacementPolicy(); queueName = place...
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @VisibleForTesting FSLeafQueue assignToQueue(RMApp rmApp, String queueName, String user) { FSLeafQueue queue = null; String appRejectMsg = null; try { QueuePlacementPolicy placementPolicy = allocConf.getPlacementPolicy(); queueName = place...
@Test public void testDefaultRuleInitializesProperlyWhenPolicyNotConfigured() throws IOException { conf.set(FairSchedulerConfiguration.ALLOCATION_FILE, ALLOC_FILE); conf.setBoolean(FairSchedulerConfiguration.ALLOW_UNDECLARED_POOLS, false); PrintWriter out = new PrintWriter(new FileWriter(ALLOC_FILE)); out.println("<?xm...
@Override public void reinitialize(Configuration conf, RMContext rmContext) throws IOException { try { allocsLoader.reloadAllocations(); } catch (Exception e) { LOG.error("Failed to reload allocations file", e); } }
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public void reinitialize(Configuration conf, RMContext rmContext) throws IOException { try { allocsLoader.reloadAllocations(); } catch (Exception e) { LOG.error("Failed to reload allocations file", e); } } }
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public void reinitialize(Configuration conf, RMContext rmContext) throws IOException { try { allocsLoader.reloadAllocations(); } catch (Exception e) { LOG.error("Failed to reload allocations file", e); } } FairScheduler(); }
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public void reinitialize(Configuration conf, RMContext rmContext) throws IOException { try { allocsLoader.reloadAllocations(); } catch (Exception e) { LOG.error("Failed to reload allocations file", e); } } FairScheduler(); FairSc...
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public void reinitialize(Configuration conf, RMContext rmContext) throws IOException { try { allocsLoader.reloadAllocations(); } catch (Exception e) { LOG.error("Failed to reload allocations file", e); } } FairScheduler(); FairSc...
@Test public void testGetAppsInQueue() throws Exception { scheduler.init(conf); scheduler.start(); scheduler.reinitialize(conf, resourceManager.getRMContext()); ApplicationAttemptId appAttId1 = createSchedulingRequest(1024, 1, 1, "queue1.subqueue1", "user1"); ApplicationAttemptId appAttId2 = createSchedulingRequest(102...
@Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { FSQueue queue = queueMgr.getQueue(queueName); if (queue == null) { return null; } List<ApplicationAttemptId> apps = new ArrayList<ApplicationAttemptId>(); queue.collectSchedulerApplications(apps); return apps; }
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { FSQueue queue = queueMgr.getQueue(queueName); if (queue == null) { return null; } List<ApplicationAttemptId> apps = new ArrayList<ApplicationAttemptId>(); queue...
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { FSQueue queue = queueMgr.getQueue(queueName); if (queue == null) { return null; } List<ApplicationAttemptId> apps = new ArrayList<ApplicationAttemptId>(); queue...
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { FSQueue queue = queueMgr.getQueue(queueName); if (queue == null) { return null; } List<ApplicationAttemptId> apps = new ArrayList<ApplicationAttemptId>(); queue...
FairScheduler extends AbstractYarnScheduler<FSAppAttempt, FSSchedulerNode> { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { FSQueue queue = queueMgr.getQueue(queueName); if (queue == null) { return null; } List<ApplicationAttemptId> apps = new ArrayList<ApplicationAttemptId>(); queue...
@Test (timeout = 5000) public void test() throws Exception { conf.set(FairSchedulerConfiguration.ALLOCATION_FILE, ALLOC_FILE); PrintWriter out = new PrintWriter(new FileWriter(ALLOC_FILE)); out.println("<?xml version=\"1.0\"?>"); out.println("<allocations>"); out.println("<queue name=\"queueA\">"); out.println("<minRes...
@VisibleForTesting boolean isStarvedForMinShare() { return isStarved(getMinShare()); }
FSLeafQueue extends FSQueue { @VisibleForTesting boolean isStarvedForMinShare() { return isStarved(getMinShare()); } }
FSLeafQueue extends FSQueue { @VisibleForTesting boolean isStarvedForMinShare() { return isStarved(getMinShare()); } FSLeafQueue(String name, FairScheduler scheduler, FSParentQueue parent); }
FSLeafQueue extends FSQueue { @VisibleForTesting boolean isStarvedForMinShare() { return isStarved(getMinShare()); } FSLeafQueue(String name, FairScheduler scheduler, FSParentQueue parent); void addApp(FSAppAttempt app, boolean runnable); boolean removeApp(FSAppAttempt app); boolean removeNonRunnableApp(FSAppAtte...
FSLeafQueue extends FSQueue { @VisibleForTesting boolean isStarvedForMinShare() { return isStarved(getMinShare()); } FSLeafQueue(String name, FairScheduler scheduler, FSParentQueue parent); void addApp(FSAppAttempt app, boolean runnable); boolean removeApp(FSAppAttempt app); boolean removeNonRunnableApp(FSAppAtte...
@Test (timeout = 5000) public void testIsStarvedForFairShare() throws Exception { conf.set(FairSchedulerConfiguration.ALLOCATION_FILE, ALLOC_FILE); PrintWriter out = new PrintWriter(new FileWriter(ALLOC_FILE)); out.println("<?xml version=\"1.0\"?>"); out.println("<allocations>"); out.println("<queue name=\"queueA\">");...
@VisibleForTesting boolean isStarvedForFairShare() { return isStarved( Resources.multiply(getFairShare(), getFairSharePreemptionThreshold())); }
FSLeafQueue extends FSQueue { @VisibleForTesting boolean isStarvedForFairShare() { return isStarved( Resources.multiply(getFairShare(), getFairSharePreemptionThreshold())); } }
FSLeafQueue extends FSQueue { @VisibleForTesting boolean isStarvedForFairShare() { return isStarved( Resources.multiply(getFairShare(), getFairSharePreemptionThreshold())); } FSLeafQueue(String name, FairScheduler scheduler, FSParentQueue parent); }
FSLeafQueue extends FSQueue { @VisibleForTesting boolean isStarvedForFairShare() { return isStarved( Resources.multiply(getFairShare(), getFairSharePreemptionThreshold())); } FSLeafQueue(String name, FairScheduler scheduler, FSParentQueue parent); void addApp(FSAppAttempt app, boolean runnable); boolean removeApp...
FSLeafQueue extends FSQueue { @VisibleForTesting boolean isStarvedForFairShare() { return isStarved( Resources.multiply(getFairShare(), getFairSharePreemptionThreshold())); } FSLeafQueue(String name, FairScheduler scheduler, FSParentQueue parent); void addApp(FSAppAttempt app, boolean runnable); boolean removeApp...
@Test public void testParseResourceConfigValue() throws Exception { assertEquals(BuilderUtils.newResource(1024, 2, 4), parseResourceConfigValue("2 vcores, 1024 mb, 4 gcores")); assertEquals(BuilderUtils.newResource(1024, 2, 4), parseResourceConfigValue("1024 mb, 2 vcores, 4 gcores")); assertEquals(BuilderUtils.newResou...
public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); return BuilderUtils.newResource(memory, vcores, gcores...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
@Test(expected = AllocationConfigurationException.class) public void testNoUnits() throws Exception { parseResourceConfigValue("1024"); }
public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); return BuilderUtils.newResource(memory, vcores, gcores...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
@Test(expected = AllocationConfigurationException.class) public void testOnlyMemory() throws Exception { parseResourceConfigValue("1024mb"); }
public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); return BuilderUtils.newResource(memory, vcores, gcores...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
@Test(expected = AllocationConfigurationException.class) public void testOnlyCPU() throws Exception { parseResourceConfigValue("1024vcores"); }
public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); return BuilderUtils.newResource(memory, vcores, gcores...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
@Test(expected = AllocationConfigurationException.class) public void testOnlyGPU() throws Exception { parseResourceConfigValue("1024gcores"); }
public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); return BuilderUtils.newResource(memory, vcores, gcores...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
@Test(expected = AllocationConfigurationException.class) public void testGibberish() throws Exception { parseResourceConfigValue("1o24vc0res"); }
public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); return BuilderUtils.newResource(memory, vcores, gcores...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
FairSchedulerConfiguration extends Configuration { public static Resource parseResourceConfigValue(String val) throws AllocationConfigurationException { try { val = StringUtils.toLowerCase(val); int memory = findResource(val, "mb"); int vcores = findResource(val, "vcores"); int gcores = findResource(val, "gcores"); ret...
@Test public void testCollectAllMetrics() { String queueName = "single"; QueueMetrics.forQueue(ms, queueName, null, false, conf); MetricsSource queueSource = queueSource(ms, queueName); checkApps(queueSource, 0, 0, 0, 0, 0, 0, true); try { checkApps(queueSource, 0, 0, 0, 0, 0, 0, false); Assert.fail(); } catch (Asserti...
public synchronized static QueueMetrics forQueue(String queueName, Queue parent, boolean enableUserMetrics, Configuration conf) { return forQueue(DefaultMetricsSystem.instance(), queueName, parent, enableUserMetrics, conf); }
QueueMetrics implements MetricsSource { public synchronized static QueueMetrics forQueue(String queueName, Queue parent, boolean enableUserMetrics, Configuration conf) { return forQueue(DefaultMetricsSystem.instance(), queueName, parent, enableUserMetrics, conf); } }
QueueMetrics implements MetricsSource { public synchronized static QueueMetrics forQueue(String queueName, Queue parent, boolean enableUserMetrics, Configuration conf) { return forQueue(DefaultMetricsSystem.instance(), queueName, parent, enableUserMetrics, conf); } protected QueueMetrics(MetricsSystem ms, String queue...
QueueMetrics implements MetricsSource { public synchronized static QueueMetrics forQueue(String queueName, Queue parent, boolean enableUserMetrics, Configuration conf) { return forQueue(DefaultMetricsSystem.instance(), queueName, parent, enableUserMetrics, conf); } protected QueueMetrics(MetricsSystem ms, String queue...
QueueMetrics implements MetricsSource { public synchronized static QueueMetrics forQueue(String queueName, Queue parent, boolean enableUserMetrics, Configuration conf) { return forQueue(DefaultMetricsSystem.instance(), queueName, parent, enableUserMetrics, conf); } protected QueueMetrics(MetricsSystem ms, String queue...
@Test public void testCapacityScheduler() throws Exception { LOG.info("--- START: testCapacityScheduler ---"); String host_0 = "host_0"; org.apache.hadoop.yarn.server.resourcemanager.NodeManager nm_0 = registerNode(host_0, 1234, 2345, NetworkTopology.DEFAULT_RACK, Resources.createResource(4 * GB, 1)); String host_1 = "...
public CapacityScheduler() { super(CapacityScheduler.class.getName()); }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { public CapacityScheduler() { super(CapacityScheduler.class.getName()); } }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { public CapacityScheduler() { super(CapacityScheduler.class.getName()); } CapacityScheduler(); }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { public CapacityScheduler() { super(CapacityScheduler.class.getName()); } CapacityScheduler(); @Override void setConf(Configuration conf); @Overri...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { public CapacityScheduler() { super(CapacityScheduler.class.getName()); } CapacityScheduler(); @Override void setConf(Configuration conf); @Overri...
@Test(expected=IOException.class) public void testParseQueue() throws IOException { CapacityScheduler cs = new CapacityScheduler(); cs.setConf(new YarnConfiguration()); cs.setRMContext(resourceManager.getRMContext()); CapacitySchedulerConfiguration conf = new CapacitySchedulerConfiguration(); setupQueueConfiguration(co...
@Lock(CapacityScheduler.class) static CSQueue parseQueue( CapacitySchedulerContext csContext, CapacitySchedulerConfiguration conf, CSQueue parent, String queueName, Map<String, CSQueue> queues, Map<String, CSQueue> oldQueues, QueueHook hook) throws IOException { CSQueue queue; String fullQueueName = (parent == null) ? ...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Lock(CapacityScheduler.class) static CSQueue parseQueue( CapacitySchedulerContext csContext, CapacitySchedulerConfiguration conf, CSQueue parent...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Lock(CapacityScheduler.class) static CSQueue parseQueue( CapacitySchedulerContext csContext, CapacitySchedulerConfiguration conf, CSQueue parent...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Lock(CapacityScheduler.class) static CSQueue parseQueue( CapacitySchedulerContext csContext, CapacitySchedulerConfiguration conf, CSQueue parent...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Lock(CapacityScheduler.class) static CSQueue parseQueue( CapacitySchedulerContext csContext, CapacitySchedulerConfiguration conf, CSQueue parent...
@Test public void testResourceOverCommit() throws Exception { Configuration conf = new Configuration(); conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class, ResourceScheduler.class); MockRM rm = new MockRM(conf); rm.start(); MockNM nm1 = rm.registerNode("127.0.0.1:1234", 4 * GB); RMApp app1 = rm.submi...
static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random.nextInt(nodes.size()); for (FiCaSchedulerNode node : nodes) { if (current++ >= start) { cs.allocateContainersToNode(node); } } for (FiCaSchedulerNode node : nodes) { cs.alloc...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random...
@Test (timeout = 5000) public void testApplicationComparator() { CapacityScheduler cs = new CapacityScheduler(); Comparator<FiCaSchedulerApp> appComparator= cs.getApplicationComparator(); ApplicationId id1 = ApplicationId.newInstance(1, 1); ApplicationId id2 = ApplicationId.newInstance(1, 2); ApplicationId id3 = Applic...
@Override public Comparator<FiCaSchedulerApp> getApplicationComparator() { return applicationComparator; }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public Comparator<FiCaSchedulerApp> getApplicationComparator() { return applicationComparator; } }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public Comparator<FiCaSchedulerApp> getApplicationComparator() { return applicationComparator; } CapacityScheduler(); }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public Comparator<FiCaSchedulerApp> getApplicationComparator() { return applicationComparator; } CapacityScheduler(); @Override void se...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public Comparator<FiCaSchedulerApp> getApplicationComparator() { return applicationComparator; } CapacityScheduler(); @Override void se...
@Test public void testGetAppsInQueue() throws Exception { Application application_0 = new Application("user_0", "a1", resourceManager); application_0.submit(); Application application_1 = new Application("user_0", "a2", resourceManager); application_1.submit(); Application application_2 = new Application("user_0", "b2"...
@Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return null; } List<ApplicationAttemptId> apps = new ArrayList<ApplicationAttemptId>(); queue.collectSchedulerApplications(apps); return apps; }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
@Test public void testAddAndRemoveAppFromCapacityScheduler() throws Exception { CapacitySchedulerConfiguration conf = new CapacitySchedulerConfiguration(); setupQueueConfiguration(conf); conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class, ResourceScheduler.class); MockRM rm = new MockRM(conf); @Suppr...
public CSQueue getQueue(String queueName) { if (queueName == null) { return null; } return queues.get(queueName); }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { public CSQueue getQueue(String queueName) { if (queueName == null) { return null; } return queues.get(queueName); } }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { public CSQueue getQueue(String queueName) { if (queueName == null) { return null; } return queues.get(queueName); } CapacityScheduler(); }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { public CSQueue getQueue(String queueName) { if (queueName == null) { return null; } return queues.get(queueName); } CapacityScheduler(); @Overrid...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { public CSQueue getQueue(String queueName) { if (queueName == null) { return null; } return queues.get(queueName); } CapacityScheduler(); @Overrid...
@Test(timeout = 30000) public void testAllocateDoesNotBlockOnSchedulerLock() throws Exception { final YarnConfiguration conf = new YarnConfiguration(); conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class, ResourceScheduler.class); MyContainerManager containerManager = new MyContainerManager(); final M...
@Override @Lock(Lock.NoLock.class) public Allocation allocate(ApplicationAttemptId applicationAttemptId, List<ResourceRequest> ask, List<ContainerId> release, List<String> blacklistAdditions, List<String> blacklistRemovals) { FiCaSchedulerApp application = getApplicationAttempt(applicationAttemptId); if (application ==...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override @Lock(Lock.NoLock.class) public Allocation allocate(ApplicationAttemptId applicationAttemptId, List<ResourceRequest> ask, List<Containe...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override @Lock(Lock.NoLock.class) public Allocation allocate(ApplicationAttemptId applicationAttemptId, List<ResourceRequest> ask, List<Containe...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override @Lock(Lock.NoLock.class) public Allocation allocate(ApplicationAttemptId applicationAttemptId, List<ResourceRequest> ask, List<Containe...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override @Lock(Lock.NoLock.class) public Allocation allocate(ApplicationAttemptId applicationAttemptId, List<ResourceRequest> ask, List<Containe...
@Test(timeout = 120000) public void testPreemptionInfo() throws Exception { Configuration conf = new Configuration(); conf.setInt(YarnConfiguration.RM_AM_MAX_ATTEMPTS, 3); conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class, ResourceScheduler.class); int CONTAINER_MEMORY = 1024; MockRM rm1 = new MockR...
@Override public void killContainer(RMContainer cont) { if (LOG.isDebugEnabled()) { LOG.debug("KILL_CONTAINER: container" + cont.toString()); } recoverResourceRequestForContainer(cont); completedContainer(cont, SchedulerUtils.createPreemptedContainerStatus( cont.getContainerId(), SchedulerUtils.PREEMPTED_CONTAINER), RM...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public void killContainer(RMContainer cont) { if (LOG.isDebugEnabled()) { LOG.debug("KILL_CONTAINER: container" + cont.toString()); } r...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public void killContainer(RMContainer cont) { if (LOG.isDebugEnabled()) { LOG.debug("KILL_CONTAINER: container" + cont.toString()); } r...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public void killContainer(RMContainer cont) { if (LOG.isDebugEnabled()) { LOG.debug("KILL_CONTAINER: container" + cont.toString()); } r...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public void killContainer(RMContainer cont) { if (LOG.isDebugEnabled()) { LOG.debug("KILL_CONTAINER: container" + cont.toString()); } r...
@Test public void testMoveAllAppsInvalidDestination() throws Exception { MockRM rm = setUpMove(); AbstractYarnScheduler scheduler = (AbstractYarnScheduler) rm.getResourceScheduler(); RMApp app = rm.submitApp(GB, "test-move-1", "user_0", null, "a1"); ApplicationAttemptId appAttemptId = rm.getApplicationReport(app.getApp...
@Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return null; } List<ApplicationAttemptId> apps = new ArrayList<ApplicationAttemptId>(); queue.collectSchedulerApplications(apps); return apps; }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
@Test public void testMoveAllAppsInvalidSource() throws Exception { MockRM rm = setUpMove(); AbstractYarnScheduler scheduler = (AbstractYarnScheduler) rm.getResourceScheduler(); RMApp app = rm.submitApp(GB, "test-move-1", "user_0", null, "a1"); ApplicationAttemptId appAttemptId = rm.getApplicationReport(app.getApplicat...
@Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return null; } List<ApplicationAttemptId> apps = new ArrayList<ApplicationAttemptId>(); queue.collectSchedulerApplications(apps); return apps; }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
@Test public void testKillAllAppsInvalidSource() throws Exception { MockRM rm = setUpMove(); AbstractYarnScheduler scheduler = (AbstractYarnScheduler) rm.getResourceScheduler(); RMApp app = rm.submitApp(GB, "test-move-1", "user_0", null, "a1"); ApplicationAttemptId appAttemptId = rm.getApplicationReport(app.getApplicat...
@Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return null; } List<ApplicationAttemptId> apps = new ArrayList<ApplicationAttemptId>(); queue.collectSchedulerApplications(apps); return apps; }
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { @Override public List<ApplicationAttemptId> getAppsInQueue(String queueName) { CSQueue queue = queues.get(queueName); if (queue == null) { return...
@Test(timeout = 30000) public void testAppReservationWithDominantResourceCalculator() throws Exception { CapacitySchedulerConfiguration csconf = new CapacitySchedulerConfiguration(); csconf.setResourceComparator(DominantResourceCalculator.class); YarnConfiguration conf = new YarnConfiguration(csconf); conf.setClass(Yar...
static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random.nextInt(nodes.size()); for (FiCaSchedulerNode node : nodes) { if (current++ >= start) { cs.allocateContainersToNode(node); } } for (FiCaSchedulerNode node : nodes) { cs.alloc...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random...
CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, Configurable { static void schedule(CapacityScheduler cs) { int current = 0; Collection<FiCaSchedulerNode> nodes = cs.getAllNodes().values(); int start = random...
@Test public void testUserQueueAcl() throws Exception { LeafQueue d = stubLeafQueue((LeafQueue) queues.get(D)); final String user_d = "user_d"; final ApplicationAttemptId appAttemptId_0 = TestUtils .getMockApplicationAttemptId(0, 1); FiCaSchedulerApp app_0 = new FiCaSchedulerApp(appAttemptId_0, user_d, d, null, spyRMCo...
@Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitApplicationAttempt(application, userName...
LeafQueue extends AbstractCSQueue { @Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitAppl...
LeafQueue extends AbstractCSQueue { @Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitAppl...
LeafQueue extends AbstractCSQueue { @Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitAppl...
LeafQueue extends AbstractCSQueue { @Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitAppl...
@Test public void testAppAttemptMetrics() throws Exception { LeafQueue a = stubLeafQueue((LeafQueue) queues.get(B)); final String user_0 = "user_0"; final ApplicationAttemptId appAttemptId_0 = TestUtils .getMockApplicationAttemptId(0, 1); AppAddedSchedulerEvent addAppEvent = new AppAddedSchedulerEvent(appAttemptId_0.ge...
@Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitApplicationAttempt(application, userName...
LeafQueue extends AbstractCSQueue { @Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitAppl...
LeafQueue extends AbstractCSQueue { @Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitAppl...
LeafQueue extends AbstractCSQueue { @Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitAppl...
LeafQueue extends AbstractCSQueue { @Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } if (application.isPending()) { metrics.submitAppAttempt(userName); } getParent().submitAppl...
@Test public void testComputeUserLimitAndSetHeadroom(){ LeafQueue qb = stubLeafQueue((LeafQueue)queues.get(B)); qb.setMaxCapacity(1.0f); final String user_0 = "user_0"; final String user_1 = "user_1"; String host_0 = "127.0.0.1"; FiCaSchedulerNode node_0 = TestUtils.getMockNode(host_0, DEFAULT_RACK, 0, 8*GB); String ho...
@Lock({LeafQueue.class, FiCaSchedulerApp.class}) Resource computeUserLimitAndSetHeadroom(FiCaSchedulerApp application, Resource clusterResource, Resource required, Set<String> requestedLabels) { String user = application.getUser(); User queueUser = getUser(user); Resource userLimit = computeUserLimit(application, clust...
LeafQueue extends AbstractCSQueue { @Lock({LeafQueue.class, FiCaSchedulerApp.class}) Resource computeUserLimitAndSetHeadroom(FiCaSchedulerApp application, Resource clusterResource, Resource required, Set<String> requestedLabels) { String user = application.getUser(); User queueUser = getUser(user); Resource userLimit =...
LeafQueue extends AbstractCSQueue { @Lock({LeafQueue.class, FiCaSchedulerApp.class}) Resource computeUserLimitAndSetHeadroom(FiCaSchedulerApp application, Resource clusterResource, Resource required, Set<String> requestedLabels) { String user = application.getUser(); User queueUser = getUser(user); Resource userLimit =...
LeafQueue extends AbstractCSQueue { @Lock({LeafQueue.class, FiCaSchedulerApp.class}) Resource computeUserLimitAndSetHeadroom(FiCaSchedulerApp application, Resource clusterResource, Resource required, Set<String> requestedLabels) { String user = application.getUser(); User queueUser = getUser(user); Resource userLimit =...
LeafQueue extends AbstractCSQueue { @Lock({LeafQueue.class, FiCaSchedulerApp.class}) Resource computeUserLimitAndSetHeadroom(FiCaSchedulerApp application, Resource clusterResource, Resource required, Set<String> requestedLabels) { String user = application.getUser(); User queueUser = getUser(user); Resource userLimit =...
@Test public void testInheritedQueueAcls() throws IOException { UserGroupInformation user = UserGroupInformation.getCurrentUser(); LeafQueue a = stubLeafQueue((LeafQueue)queues.get(A)); LeafQueue b = stubLeafQueue((LeafQueue)queues.get(B)); ParentQueue c = (ParentQueue)queues.get(C); LeafQueue c1 = stubLeafQueue((LeafQ...
@Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo(UserGroupInformation user) { QueueUserACLInfo userAclInfo = recordFactory.newRecordInstance(QueueUserACLInfo.class); List<QueueACL> operations = new ArrayList<QueueACL>(); for (QueueACL operation : QueueACL.values()) { if (hasAccess(operation, use...
LeafQueue extends AbstractCSQueue { @Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo(UserGroupInformation user) { QueueUserACLInfo userAclInfo = recordFactory.newRecordInstance(QueueUserACLInfo.class); List<QueueACL> operations = new ArrayList<QueueACL>(); for (QueueACL operation : QueueACL.valu...
LeafQueue extends AbstractCSQueue { @Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo(UserGroupInformation user) { QueueUserACLInfo userAclInfo = recordFactory.newRecordInstance(QueueUserACLInfo.class); List<QueueACL> operations = new ArrayList<QueueACL>(); for (QueueACL operation : QueueACL.valu...
LeafQueue extends AbstractCSQueue { @Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo(UserGroupInformation user) { QueueUserACLInfo userAclInfo = recordFactory.newRecordInstance(QueueUserACLInfo.class); List<QueueACL> operations = new ArrayList<QueueACL>(); for (QueueACL operation : QueueACL.valu...
LeafQueue extends AbstractCSQueue { @Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo(UserGroupInformation user) { QueueUserACLInfo userAclInfo = recordFactory.newRecordInstance(QueueUserACLInfo.class); List<QueueACL> operations = new ArrayList<QueueACL>(); for (QueueACL operation : QueueACL.valu...
@Test public void testSingleLevelQueues() throws Exception { setupSingleLevelQueues(csConf); Map<String, CSQueue> queues = new HashMap<String, CSQueue>(); CSQueue root = CapacityScheduler.parseQueue(csContext, csConf, null, CapacitySchedulerConfiguration.ROOT, queues, queues, TestUtils.spyHook); final int memoryPerNode...
@Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels(); if (!SchedulerUtils.checkQueueAcce...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
@Test public void testMultiLevelQueues() throws Exception { setupMultiLevelQueues(csConf); Map<String, CSQueue> queues = new HashMap<String, CSQueue>(); CSQueue root = CapacityScheduler.parseQueue(csContext, csConf, null, CapacitySchedulerConfiguration.ROOT, queues, queues, TestUtils.spyHook); final int memoryPerNode =...
@Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels(); if (!SchedulerUtils.checkQueueAcce...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
@Test public void testOffSwitchScheduling() throws Exception { setupSingleLevelQueues(csConf); Map<String, CSQueue> queues = new HashMap<String, CSQueue>(); CSQueue root = CapacityScheduler.parseQueue(csContext, csConf, null, CapacitySchedulerConfiguration.ROOT, queues, queues, TestUtils.spyHook); final int memoryPerNo...
@Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels(); if (!SchedulerUtils.checkQueueAcce...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
@Test public void testOffSwitchSchedulingMultiLevelQueues() throws Exception { setupMultiLevelQueues(csConf); Map<String, CSQueue> queues = new HashMap<String, CSQueue>(); CSQueue root = CapacityScheduler.parseQueue(csContext, csConf, null, CapacitySchedulerConfiguration.ROOT, queues, queues, TestUtils.spyHook); final ...
@Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels(); if (!SchedulerUtils.checkQueueAcce...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
ParentQueue extends AbstractCSQueue { @Override public synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits) { CSAssignment assignment = new CSAssignment(Resources.createResource(0, 0, 0), NodeType.NODE_LOCAL); Set<String> nodeLabels = node.getLabels...
@Test public void testQueueAcl() throws Exception { setupMultiLevelQueues(csConf); csConf.setAcl(CapacitySchedulerConfiguration.ROOT, QueueACL.SUBMIT_APPLICATIONS, " "); csConf.setAcl(CapacitySchedulerConfiguration.ROOT, QueueACL.ADMINISTER_QUEUE, " "); final String Q_C = CapacitySchedulerConfiguration.ROOT + "." + C; ...
@Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo( UserGroupInformation user) { List<QueueUserACLInfo> userAcls = new ArrayList<QueueUserACLInfo>(); userAcls.add(getUserAclInfo(user)); for (CSQueue child : childQueues) { userAcls.addAll(child.getQueueUserAclInfo(user)); } return userAcls; }
ParentQueue extends AbstractCSQueue { @Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo( UserGroupInformation user) { List<QueueUserACLInfo> userAcls = new ArrayList<QueueUserACLInfo>(); userAcls.add(getUserAclInfo(user)); for (CSQueue child : childQueues) { userAcls.addAll(child.getQueueUserAclI...
ParentQueue extends AbstractCSQueue { @Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo( UserGroupInformation user) { List<QueueUserACLInfo> userAcls = new ArrayList<QueueUserACLInfo>(); userAcls.add(getUserAclInfo(user)); for (CSQueue child : childQueues) { userAcls.addAll(child.getQueueUserAclI...
ParentQueue extends AbstractCSQueue { @Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo( UserGroupInformation user) { List<QueueUserACLInfo> userAcls = new ArrayList<QueueUserACLInfo>(); userAcls.add(getUserAclInfo(user)); for (CSQueue child : childQueues) { userAcls.addAll(child.getQueueUserAclI...
ParentQueue extends AbstractCSQueue { @Override public synchronized List<QueueUserACLInfo> getQueueUserAclInfo( UserGroupInformation user) { List<QueueUserACLInfo> userAcls = new ArrayList<QueueUserACLInfo>(); userAcls.add(getUserAclInfo(user)); for (CSQueue child : childQueues) { userAcls.addAll(child.getQueueUserAclI...
@Test public void testGetApplicationReport() throws Exception { for (int i = 1; i <= 2; ++i) { final ApplicationId appId = ApplicationId.newInstance(0, i); ApplicationReport app; if (callerUGI == null) { app = historyManager.getApplication(appId); } else { app = callerUGI.doAs(new PrivilegedExceptionAction<ApplicationR...
@Override public ApplicationReport getApplication(ApplicationId appId) throws YarnException, IOException { return getApplication(appId, ApplicationReportField.ALL).appReport; }
ApplicationHistoryManagerOnTimelineStore extends AbstractService implements ApplicationHistoryManager { @Override public ApplicationReport getApplication(ApplicationId appId) throws YarnException, IOException { return getApplication(appId, ApplicationReportField.ALL).appReport; } }
ApplicationHistoryManagerOnTimelineStore extends AbstractService implements ApplicationHistoryManager { @Override public ApplicationReport getApplication(ApplicationId appId) throws YarnException, IOException { return getApplication(appId, ApplicationReportField.ALL).appReport; } ApplicationHistoryManagerOnTimeline...
ApplicationHistoryManagerOnTimelineStore extends AbstractService implements ApplicationHistoryManager { @Override public ApplicationReport getApplication(ApplicationId appId) throws YarnException, IOException { return getApplication(appId, ApplicationReportField.ALL).appReport; } ApplicationHistoryManagerOnTimeline...
ApplicationHistoryManagerOnTimelineStore extends AbstractService implements ApplicationHistoryManager { @Override public ApplicationReport getApplication(ApplicationId appId) throws YarnException, IOException { return getApplication(appId, ApplicationReportField.ALL).appReport; } ApplicationHistoryManagerOnTimeline...
@Test public void testGetContainerReport() throws Exception { final ContainerId containerId = ContainerId.newContainerId(ApplicationAttemptId.newInstance( ApplicationId.newInstance(0, 1), 1), 1); ContainerReport container; if (callerUGI == null) { container = historyManager.getContainer(containerId); } else { try { con...
@Override public ContainerReport getContainer(ContainerId containerId) throws YarnException, IOException { ApplicationReportExt app = getApplication( containerId.getApplicationAttemptId().getApplicationId(), ApplicationReportField.USER_AND_ACLS); checkAccess(app); TimelineEntity entity = timelineDataManager.getEntity( ...
ApplicationHistoryManagerOnTimelineStore extends AbstractService implements ApplicationHistoryManager { @Override public ContainerReport getContainer(ContainerId containerId) throws YarnException, IOException { ApplicationReportExt app = getApplication( containerId.getApplicationAttemptId().getApplicationId(), Appl...
ApplicationHistoryManagerOnTimelineStore extends AbstractService implements ApplicationHistoryManager { @Override public ContainerReport getContainer(ContainerId containerId) throws YarnException, IOException { ApplicationReportExt app = getApplication( containerId.getApplicationAttemptId().getApplicationId(), Appl...
ApplicationHistoryManagerOnTimelineStore extends AbstractService implements ApplicationHistoryManager { @Override public ContainerReport getContainer(ContainerId containerId) throws YarnException, IOException { ApplicationReportExt app = getApplication( containerId.getApplicationAttemptId().getApplicationId(), Appl...
ApplicationHistoryManagerOnTimelineStore extends AbstractService implements ApplicationHistoryManager { @Override public ContainerReport getContainer(ContainerId containerId) throws YarnException, IOException { ApplicationReportExt app = getApplication( containerId.getApplicationAttemptId().getApplicationId(), Appl...
@Test public void testApplicationReport() throws IOException, YarnException { ApplicationId appId = null; appId = ApplicationId.newInstance(0, 1); GetApplicationReportRequest request = GetApplicationReportRequest.newInstance(appId); GetApplicationReportResponse response = clientService.getApplicationReport(request); Ap...
@Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException, IOException { ApplicationId applicationId = request.getApplicationId(); try { GetApplicationReportResponse response = GetApplicationReportResponse.newInstance(history .getApplication(applicatio...
ApplicationHistoryClientService extends AbstractService implements ApplicationHistoryProtocol { @Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException, IOException { ApplicationId applicationId = request.getApplicationId(); try { GetApplicationR...
ApplicationHistoryClientService extends AbstractService implements ApplicationHistoryProtocol { @Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException, IOException { ApplicationId applicationId = request.getApplicationId(); try { GetApplicationR...
ApplicationHistoryClientService extends AbstractService implements ApplicationHistoryProtocol { @Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException, IOException { ApplicationId applicationId = request.getApplicationId(); try { GetApplicationR...
ApplicationHistoryClientService extends AbstractService implements ApplicationHistoryProtocol { @Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException, IOException { ApplicationId applicationId = request.getApplicationId(); try { GetApplicationR...
@Test (timeout = 30000) public void testEscapeString() throws Exception { assertEquals(NULL_STR, StringUtils.escapeString(NULL_STR)); assertEquals(EMPTY_STR, StringUtils.escapeString(EMPTY_STR)); assertEquals(STR_WO_SPECIAL_CHARS, StringUtils.escapeString(STR_WO_SPECIAL_CHARS)); assertEquals(ESCAPED_STR_WITH_COMMA, Str...
public static String escapeString(String str) { return escapeString(str, ESCAPE_CHAR, COMMA); }
StringUtils { public static String escapeString(String str) { return escapeString(str, ESCAPE_CHAR, COMMA); } }
StringUtils { public static String escapeString(String str) { return escapeString(str, ESCAPE_CHAR, COMMA); } }
StringUtils { public static String escapeString(String str) { return escapeString(str, ESCAPE_CHAR, COMMA); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(long number); static String format(final String format, final Object...
StringUtils { public static String escapeString(String str) { return escapeString(str, ESCAPE_CHAR, COMMA); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(long number); static String format(final String format, final Object...
@Test (timeout = 30000) public void testSplit() throws Exception { assertEquals(NULL_STR, StringUtils.split(NULL_STR)); String[] splits = StringUtils.split(EMPTY_STR); assertEquals(0, splits.length); splits = StringUtils.split(",,"); assertEquals(0, splits.length); splits = StringUtils.split(STR_WO_SPECIAL_CHARS); asse...
public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); }
StringUtils { public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); } }
StringUtils { public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); } }
StringUtils { public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(long number); static String format(final String format, final Object... objects)...
StringUtils { public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(long number); static String format(final String format, final Object... objects)...
@Test (timeout = 30000) public void testSimpleSplit() throws Exception { final String[] TO_TEST = { "a/b/c", "a/b/c " "", "/", " for (String testSubject : TO_TEST) { assertArrayEquals("Testing '" + testSubject + "'", testSubject.split("/"), StringUtils.split(testSubject, '/')); } }
public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); }
StringUtils { public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); } }
StringUtils { public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); } }
StringUtils { public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(long number); static String format(final String format, final Object... objects)...
StringUtils { public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(long number); static String format(final String format, final Object... objects)...
@Test (timeout = 30000) public void testUnescapeString() throws Exception { assertEquals(NULL_STR, StringUtils.unEscapeString(NULL_STR)); assertEquals(EMPTY_STR, StringUtils.unEscapeString(EMPTY_STR)); assertEquals(STR_WO_SPECIAL_CHARS, StringUtils.unEscapeString(STR_WO_SPECIAL_CHARS)); try { StringUtils.unEscapeString...
public static String unEscapeString(String str) { return unEscapeString(str, ESCAPE_CHAR, COMMA); }
StringUtils { public static String unEscapeString(String str) { return unEscapeString(str, ESCAPE_CHAR, COMMA); } }
StringUtils { public static String unEscapeString(String str) { return unEscapeString(str, ESCAPE_CHAR, COMMA); } }
StringUtils { public static String unEscapeString(String str) { return unEscapeString(str, ESCAPE_CHAR, COMMA); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(long number); static String format(final String format, final Ob...
StringUtils { public static String unEscapeString(String str) { return unEscapeString(str, ESCAPE_CHAR, COMMA); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(long number); static String format(final String format, final Ob...
@Test (timeout = 30000) public void testJoin() { List<String> s = new ArrayList<String>(); s.add("a"); s.add("b"); s.add("c"); assertEquals("", StringUtils.join(":", s.subList(0, 0))); assertEquals("a", StringUtils.join(":", s.subList(0, 1))); assertEquals("", StringUtils.join(':', s.subList(0, 0))); assertEquals("a", ...
public static String join(CharSequence separator, Iterable<?> strings) { Iterator<?> i = strings.iterator(); if (!i.hasNext()) { return ""; } StringBuilder sb = new StringBuilder(i.next().toString()); while (i.hasNext()) { sb.append(separator); sb.append(i.next().toString()); } return sb.toString(); }
StringUtils { public static String join(CharSequence separator, Iterable<?> strings) { Iterator<?> i = strings.iterator(); if (!i.hasNext()) { return ""; } StringBuilder sb = new StringBuilder(i.next().toString()); while (i.hasNext()) { sb.append(separator); sb.append(i.next().toString()); } return sb.toString(); } }
StringUtils { public static String join(CharSequence separator, Iterable<?> strings) { Iterator<?> i = strings.iterator(); if (!i.hasNext()) { return ""; } StringBuilder sb = new StringBuilder(i.next().toString()); while (i.hasNext()) { sb.append(separator); sb.append(i.next().toString()); } return sb.toString(); } }
StringUtils { public static String join(CharSequence separator, Iterable<?> strings) { Iterator<?> i = strings.iterator(); if (!i.hasNext()) { return ""; } StringBuilder sb = new StringBuilder(i.next().toString()); while (i.hasNext()) { sb.append(separator); sb.append(i.next().toString()); } return sb.toString(); } st...
StringUtils { public static String join(CharSequence separator, Iterable<?> strings) { Iterator<?> i = strings.iterator(); if (!i.hasNext()) { return ""; } StringBuilder sb = new StringBuilder(i.next().toString()); while (i.hasNext()) { sb.append(separator); sb.append(i.next().toString()); } return sb.toString(); } st...
@Test (timeout = 30000) public void testGetTrimmedStrings() throws Exception { String compactDirList = "/spindle1/hdfs,/spindle2/hdfs,/spindle3/hdfs"; String spacedDirList = "/spindle1/hdfs, /spindle2/hdfs, /spindle3/hdfs"; String pathologicalDirList1 = " /spindle1/hdfs , /spindle2/hdfs ,/spindle3/hdfs "; String pathol...
public static String[] getTrimmedStrings(String str){ if (null == str || str.trim().isEmpty()) { return emptyStringArray; } return str.trim().split("\\s*,\\s*"); }
StringUtils { public static String[] getTrimmedStrings(String str){ if (null == str || str.trim().isEmpty()) { return emptyStringArray; } return str.trim().split("\\s*,\\s*"); } }
StringUtils { public static String[] getTrimmedStrings(String str){ if (null == str || str.trim().isEmpty()) { return emptyStringArray; } return str.trim().split("\\s*,\\s*"); } }
StringUtils { public static String[] getTrimmedStrings(String str){ if (null == str || str.trim().isEmpty()) { return emptyStringArray; } return str.trim().split("\\s*,\\s*"); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(...
StringUtils { public static String[] getTrimmedStrings(String str){ if (null == str || str.trim().isEmpty()) { return emptyStringArray; } return str.trim().split("\\s*,\\s*"); } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(...
@Test (timeout = 30000) public void testCamelize() { assertEquals("Map", StringUtils.camelize("MAP")); assertEquals("JobSetup", StringUtils.camelize("JOB_SETUP")); assertEquals("SomeStuff", StringUtils.camelize("some_stuff")); assertEquals("Aa", StringUtils.camelize("aA")); assertEquals("Bb", StringUtils.camelize("bB")...
public static String camelize(String s) { StringBuilder sb = new StringBuilder(); String[] words = split(StringUtils.toLowerCase(s), ESCAPE_CHAR, '_'); for (String word : words) sb.append(org.apache.commons.lang.StringUtils.capitalize(word)); return sb.toString(); }
StringUtils { public static String camelize(String s) { StringBuilder sb = new StringBuilder(); String[] words = split(StringUtils.toLowerCase(s), ESCAPE_CHAR, '_'); for (String word : words) sb.append(org.apache.commons.lang.StringUtils.capitalize(word)); return sb.toString(); } }
StringUtils { public static String camelize(String s) { StringBuilder sb = new StringBuilder(); String[] words = split(StringUtils.toLowerCase(s), ESCAPE_CHAR, '_'); for (String word : words) sb.append(org.apache.commons.lang.StringUtils.capitalize(word)); return sb.toString(); } }
StringUtils { public static String camelize(String s) { StringBuilder sb = new StringBuilder(); String[] words = split(StringUtils.toLowerCase(s), ESCAPE_CHAR, '_'); for (String word : words) sb.append(org.apache.commons.lang.StringUtils.capitalize(word)); return sb.toString(); } static String stringifyException(Throw...
StringUtils { public static String camelize(String s) { StringBuilder sb = new StringBuilder(); String[] words = split(StringUtils.toLowerCase(s), ESCAPE_CHAR, '_'); for (String word : words) sb.append(org.apache.commons.lang.StringUtils.capitalize(word)); return sb.toString(); } static String stringifyException(Throw...
@Test (timeout = 30000) public void testStringToURI() { String[] str = new String[] { "file: try { StringUtils.stringToURI(str); fail("Ignoring URISyntaxException while creating URI from string file: } catch (IllegalArgumentException iae) { assertEquals("Failed to create uri for file: } }
public static URI[] stringToURI(String[] str){ if (str == null) return null; URI[] uris = new URI[str.length]; for (int i = 0; i < str.length;i++){ try{ uris[i] = new URI(str[i]); }catch(URISyntaxException ur){ throw new IllegalArgumentException( "Failed to create uri for " + str[i], ur); } } return uris; }
StringUtils { public static URI[] stringToURI(String[] str){ if (str == null) return null; URI[] uris = new URI[str.length]; for (int i = 0; i < str.length;i++){ try{ uris[i] = new URI(str[i]); }catch(URISyntaxException ur){ throw new IllegalArgumentException( "Failed to create uri for " + str[i], ur); } } return uris;...
StringUtils { public static URI[] stringToURI(String[] str){ if (str == null) return null; URI[] uris = new URI[str.length]; for (int i = 0; i < str.length;i++){ try{ uris[i] = new URI(str[i]); }catch(URISyntaxException ur){ throw new IllegalArgumentException( "Failed to create uri for " + str[i], ur); } } return uris;...
StringUtils { public static URI[] stringToURI(String[] str){ if (str == null) return null; URI[] uris = new URI[str.length]; for (int i = 0; i < str.length;i++){ try{ uris[i] = new URI(str[i]); }catch(URISyntaxException ur){ throw new IllegalArgumentException( "Failed to create uri for " + str[i], ur); } } return uris;...
StringUtils { public static URI[] stringToURI(String[] str){ if (str == null) return null; URI[] uris = new URI[str.length]; for (int i = 0; i < str.length;i++){ try{ uris[i] = new URI(str[i]); }catch(URISyntaxException ur){ throw new IllegalArgumentException( "Failed to create uri for " + str[i], ur); } } return uris;...
@Test (timeout = 30000) public void testSimpleHostName() { assertEquals("Should return hostname when FQDN is specified", "hadoop01", StringUtils.simpleHostname("hadoop01.domain.com")); assertEquals("Should return hostname when only hostname is specified", "hadoop01", StringUtils.simpleHostname("hadoop01")); assertEqual...
public static String simpleHostname(String fullHostname) { if (InetAddresses.isInetAddress(fullHostname)) { return fullHostname; } int offset = fullHostname.indexOf('.'); if (offset != -1) { return fullHostname.substring(0, offset); } return fullHostname; }
StringUtils { public static String simpleHostname(String fullHostname) { if (InetAddresses.isInetAddress(fullHostname)) { return fullHostname; } int offset = fullHostname.indexOf('.'); if (offset != -1) { return fullHostname.substring(0, offset); } return fullHostname; } }
StringUtils { public static String simpleHostname(String fullHostname) { if (InetAddresses.isInetAddress(fullHostname)) { return fullHostname; } int offset = fullHostname.indexOf('.'); if (offset != -1) { return fullHostname.substring(0, offset); } return fullHostname; } }
StringUtils { public static String simpleHostname(String fullHostname) { if (InetAddresses.isInetAddress(fullHostname)) { return fullHostname; } int offset = fullHostname.indexOf('.'); if (offset != -1) { return fullHostname.substring(0, offset); } return fullHostname; } static String stringifyException(Throwable e); ...
StringUtils { public static String simpleHostname(String fullHostname) { if (InetAddresses.isInetAddress(fullHostname)) { return fullHostname; } int offset = fullHostname.indexOf('.'); if (offset != -1) { return fullHostname.substring(0, offset); } return fullHostname; } static String stringifyException(Throwable e); ...
@Test (timeout = 5000) public void testReplaceTokensShellEnvVars() { Pattern pattern = StringUtils.SHELL_ENV_VAR_PATTERN; Map<String, String> replacements = new HashMap<String, String>(); replacements.put("FOO", "one"); replacements.put("BAZ", "two"); replacements.put("NUMBERS123", "one-two-three"); replacements.put("U...
public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replacement = ""; } mat...
StringUtils { public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replaceme...
StringUtils { public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replaceme...
StringUtils { public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replaceme...
StringUtils { public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replaceme...
@Test (timeout = 5000) public void testReplaceTokensWinEnvVars() { Pattern pattern = StringUtils.WIN_ENV_VAR_PATTERN; Map<String, String> replacements = new HashMap<String, String>(); replacements.put("foo", "zoo"); replacements.put("baz", "zaz"); assertEquals("zoo", StringUtils.replaceTokens("%foo%", pattern, replacem...
public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replacement = ""; } mat...
StringUtils { public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replaceme...
StringUtils { public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replaceme...
StringUtils { public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replaceme...
StringUtils { public static String replaceTokens(String template, Pattern pattern, Map<String, String> replacements) { StringBuffer sb = new StringBuffer(); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String replacement = replacements.get(matcher.group(1)); if (replacement == null) { replaceme...
@Test public void testGetUniqueNonEmptyTrimmedStrings (){ final String TO_SPLIT = ",foo, bar,baz,,blah,blah,bar,"; Collection<String> col = StringUtils.getTrimmedStringCollection(TO_SPLIT); assertEquals(4, col.size()); assertTrue(col.containsAll(Arrays.asList(new String[]{"foo","bar","baz","blah"}))); }
public static Collection<String> getTrimmedStringCollection(String str){ Set<String> set = new LinkedHashSet<String>( Arrays.asList(getTrimmedStrings(str))); set.remove(""); return set; }
StringUtils { public static Collection<String> getTrimmedStringCollection(String str){ Set<String> set = new LinkedHashSet<String>( Arrays.asList(getTrimmedStrings(str))); set.remove(""); return set; } }
StringUtils { public static Collection<String> getTrimmedStringCollection(String str){ Set<String> set = new LinkedHashSet<String>( Arrays.asList(getTrimmedStrings(str))); set.remove(""); return set; } }
StringUtils { public static Collection<String> getTrimmedStringCollection(String str){ Set<String> set = new LinkedHashSet<String>( Arrays.asList(getTrimmedStrings(str))); set.remove(""); return set; } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static ...
StringUtils { public static Collection<String> getTrimmedStringCollection(String str){ Set<String> set = new LinkedHashSet<String>( Arrays.asList(getTrimmedStrings(str))); set.remove(""); return set; } static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static ...
@Test public void processOptionsHeaderNoQuotas() { LinkedList<String> options = new LinkedList<String>(); options.add("-v"); options.add("dummy"); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; count.processOptions(options); String noQuotasHeader = " DIR_COUNT FILE_COUNT CONTENT_...
@Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTION_HUMAN); if (cf.getOpt(OP...
Count extends FsCommand { @Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTIO...
Count extends FsCommand { @Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTIO...
Count extends FsCommand { @Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTIO...
Count extends FsCommand { @Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTIO...
@Test public void processOptionsHeaderWithQuotas() { LinkedList<String> options = new LinkedList<String>(); options.add("-q"); options.add("-v"); options.add("dummy"); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; count.processOptions(options); String withQuotasHeader = " QUOTA ...
@Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTION_HUMAN); if (cf.getOpt(OP...
Count extends FsCommand { @Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTIO...
Count extends FsCommand { @Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTIO...
Count extends FsCommand { @Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTIO...
Count extends FsCommand { @Override protected void processOptions(LinkedList<String> args) { CommandFormat cf = new CommandFormat(1, Integer.MAX_VALUE, OPTION_QUOTA, OPTION_HUMAN, OPTION_HEADER); cf.parse(args); if (args.isEmpty()) { args.add("."); } showQuotas = cf.getOpt(OPTION_QUOTA); humanReadable = cf.getOpt(OPTIO...
@Test(expected = RuntimeException.class) public void should_not_register_pure_java_object() { world.registerWorld("JAVA"); }
public void registerWorld(Object world) { if (world instanceof GroovyObject) { worlds.add((GroovyObject) world); } else { throw new RuntimeException("Only GroovyObject supported"); } }
GroovyWorld extends GroovyObjectSupport { public void registerWorld(Object world) { if (world instanceof GroovyObject) { worlds.add((GroovyObject) world); } else { throw new RuntimeException("Only GroovyObject supported"); } } }
GroovyWorld extends GroovyObjectSupport { public void registerWorld(Object world) { if (world instanceof GroovyObject) { worlds.add((GroovyObject) world); } else { throw new RuntimeException("Only GroovyObject supported"); } } GroovyWorld(); }
GroovyWorld extends GroovyObjectSupport { public void registerWorld(Object world) { if (world instanceof GroovyObject) { worlds.add((GroovyObject) world); } else { throw new RuntimeException("Only GroovyObject supported"); } } GroovyWorld(); void registerWorld(Object world); Object getProperty(String property); void se...
GroovyWorld extends GroovyObjectSupport { public void registerWorld(Object world) { if (world instanceof GroovyObject) { worlds.add((GroovyObject) world); } else { throw new RuntimeException("Only GroovyObject supported"); } } GroovyWorld(); void registerWorld(Object world); Object getProperty(String property); void se...
@Test public void only_allows_arguments_string_integer_closure() { try { Hooks.Before("TAG", 10D, 100, new MethodClosure(this, "dummyClosureCall"), 0.0); fail("CucumberException was not thrown"); } catch (CucumberException e) { assertEquals("An argument of the type java.lang.Double found, Before only allows the argumen...
public static void Before(Object... args) { addHook(args, true, false); }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } static void World(Closure body); static void Before(Object... args); static void After(Object... args); static void AfterStep(Object... args); static void BeforeStep(Object... args); }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } static void World(Closure body); static void Before(Object... args); static void After(Object... args); static void AfterStep(Object... args); static void BeforeStep(Object... args); }
@Test public void only_allows_one_timeout_argument() { try { Hooks.Before(1L, 2L); fail("CucumberException was not thrown"); } catch (CucumberException e) { assertEquals("An argument of the type java.lang.Long found, Before only allows the argument types String - Tag, Integer - order, and Closure", e.getMessage()); } }
public static void Before(Object... args) { addHook(args, true, false); }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } static void World(Closure body); static void Before(Object... args); static void After(Object... args); static void AfterStep(Object... args); static void BeforeStep(Object... args); }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } static void World(Closure body); static void Before(Object... args); static void After(Object... args); static void AfterStep(Object... args); static void BeforeStep(Object... args); }
@Test public void only_allows_one_order_argument() { try { Hooks.Before(1, 2); fail("CucumberException was not thrown"); } catch (CucumberException e) { assertEquals("Two order (Integer) arguments found; 1, and; 2", e.getMessage()); } }
public static void Before(Object... args) { addHook(args, true, false); }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } static void World(Closure body); static void Before(Object... args); static void After(Object... args); static void AfterStep(Object... args); static void BeforeStep(Object... args); }
Hooks { public static void Before(Object... args) { addHook(args, true, false); } static void World(Closure body); static void Before(Object... args); static void After(Object... args); static void AfterStep(Object... args); static void BeforeStep(Object... args); }
@Test public void shouldReturnMainFileValue() { String result = config.getMainFile(); assertThat(result, is(MAIN_FILE_NAME)); }
public String getMainFile() { return getExpressionValue(mainFileExpression); }
XQueryRunConfig { public String getMainFile() { return getExpressionValue(mainFileExpression); } }
XQueryRunConfig { public String getMainFile() { return getExpressionValue(mainFileExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getMainFile() { return getExpressionValue(mainFileExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(...
XQueryRunConfig { public String getMainFile() { return getExpressionValue(mainFileExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(...
@Test public void shouldReturnHostValue() { String result = config.getHost(); assertThat(result, is(HOST)); }
public String getHost() { return getExpressionValue(hostExpression); }
XQueryRunConfig { public String getHost() { return getExpressionValue(hostExpression); } }
XQueryRunConfig { public String getHost() { return getExpressionValue(hostExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getHost() { return getExpressionValue(hostExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(); XQuer...
XQueryRunConfig { public String getHost() { return getExpressionValue(hostExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(); XQuer...
@Test public void shouldReturnPortValue() { String result = config.getPort(); assertThat(result, is(PORT)); }
public String getPort() { return getExpressionValue(portExpression); }
XQueryRunConfig { public String getPort() { return getExpressionValue(portExpression); } }
XQueryRunConfig { public String getPort() { return getExpressionValue(portExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getPort() { return getExpressionValue(portExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(); XQuer...
XQueryRunConfig { public String getPort() { return getExpressionValue(portExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(); XQuer...
@Test public void shouldReturnUsernameValue() { String result = config.getUsername(); assertThat(result, is(USERNAME)); }
public String getUsername() { return getExpressionValue(usernameExpression); }
XQueryRunConfig { public String getUsername() { return getExpressionValue(usernameExpression); } }
XQueryRunConfig { public String getUsername() { return getExpressionValue(usernameExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getUsername() { return getExpressionValue(usernameExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(...
XQueryRunConfig { public String getUsername() { return getExpressionValue(usernameExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(...
@Test public void shouldReturnPasswordValue() { String result = config.getPassword(); assertThat(result, is(PASSWORD)); }
public String getPassword() { return getExpressionValue(passwordExpression); }
XQueryRunConfig { public String getPassword() { return getExpressionValue(passwordExpression); } }
XQueryRunConfig { public String getPassword() { return getExpressionValue(passwordExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getPassword() { return getExpressionValue(passwordExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(...
XQueryRunConfig { public String getPassword() { return getExpressionValue(passwordExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(...
@Test public void shouldReturnConfigEnabledValue() { boolean result = config.isConfigFileEnabled(); assertThat(result, is(CONFIG_FILE_ENABLED)); }
public boolean isConfigFileEnabled() { return Boolean.parseBoolean(getExpressionValue(configFileEnabledExpression)); }
XQueryRunConfig { public boolean isConfigFileEnabled() { return Boolean.parseBoolean(getExpressionValue(configFileEnabledExpression)); } }
XQueryRunConfig { public boolean isConfigFileEnabled() { return Boolean.parseBoolean(getExpressionValue(configFileEnabledExpression)); } XQueryRunConfig(String xml); }
XQueryRunConfig { public boolean isConfigFileEnabled() { return Boolean.parseBoolean(getExpressionValue(configFileEnabledExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); ...
XQueryRunConfig { public boolean isConfigFileEnabled() { return Boolean.parseBoolean(getExpressionValue(configFileEnabledExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); ...