Search in sources :

Example 36 with RMNodeEvent

use of org.ow2.proactive.resourcemanager.common.event.RMNodeEvent in project scheduling by ow2-proactive.

the class TestConcurrentUsers method testConcurrency.

@Test
public void testConcurrency() throws Exception {
    ResourceManager resourceManager = rmHelper.getResourceManager();
    String nsName = "TestConcurrentUsers";
    String node1Name = "node1";
    testNode = rmHelper.createNode(node1Name);
    String node1URL = testNode.getNode().getNodeInformation().getURL();
    resourceManager.createNodeSource(nsName, DefaultInfrastructureManager.class.getName(), null, StaticPolicy.class.getName(), null, NODES_NOT_RECOVERABLE);
    rmHelper.waitForNodeSourceEvent(RMEventType.NODESOURCE_CREATED, nsName);
    resourceManager.addNode(node1URL, nsName);
    // waiting for node adding event
    rmHelper.waitForNodeEvent(RMEventType.NODE_ADDED, node1URL);
    // waiting for the node to be free
    rmHelper.waitForAnyNodeEvent(RMEventType.NODE_STATE_CHANGED);
    assertTrue(resourceManager.getState().getTotalNodesNumber() == 1);
    assertTrue(resourceManager.getState().getFreeNodesNumber() == 1);
    log("Test 1 - releasing of the foreign node");
    // acquiring a node
    final NodeSet ns = resourceManager.getAtMostNodes(1, null);
    // waiting for node busy event
    RMNodeEvent evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node1URL);
    assertEquals(evt.getNodeState(), NodeState.BUSY);
    assertEquals(ns.size(), 1);
    assertTrue(resourceManager.getState().getTotalNodesNumber() == 1);
    assertTrue(resourceManager.getState().getFreeNodesNumber() == 0);
    Thread t = new Thread() {

        @Override
        public void run() {
            try {
                Credentials cred = Credentials.createCredentials(new CredData(CredData.parseLogin("user"), CredData.parseDomain("user"), "pwd"), TestConcurrentUsers.this.rmHelper.getRMAuth().getPublicKey());
                ResourceManager rm2 = TestConcurrentUsers.this.rmHelper.getRMAuth().login(cred);
                rm2.releaseNode(ns.get(0)).getBooleanValue();
                Assert.assertTrue("Should not be able to release foreign node", false);
            } catch (Exception e) {
                log(e.getMessage());
            }
        }
    };
    t.start();
    t.join();
    assertEquals(1, resourceManager.getState().getTotalNodesNumber());
    assertEquals(0, resourceManager.getState().getFreeNodesNumber());
    resourceManager.releaseNodes(ns);
    evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node1URL);
    assertEquals(evt.getNodeState(), NodeState.FREE);
    assertEquals(1, resourceManager.getState().getTotalNodesNumber());
    assertEquals(1, resourceManager.getState().getFreeNodesNumber());
    log("Test 2 - releasing node twice");
    resourceManager.releaseNodes(ns);
    // to make sure everything has been processed
    Thread.sleep(1000);
    assertEquals(1, resourceManager.getState().getTotalNodesNumber());
    assertEquals(1, resourceManager.getState().getFreeNodesNumber());
    log("Test 3 - client crash detection");
    JVMProcessImpl nodeProcess = new JVMProcessImpl(new org.objectweb.proactive.core.process.AbstractExternalProcess.StandardOutputMessageLogger());
    nodeProcess.setJvmOptions(Collections.singletonList(PAResourceManagerProperties.RM_HOME.getCmdLine() + PAResourceManagerProperties.RM_HOME.getValueAsString()));
    nodeProcess.setClassname(GetAllNodes.class.getName());
    nodeProcess.startProcess();
    // node busy event
    for (int i = 0; i < 1; i++) {
        evt = rmHelper.waitForAnyNodeEvent(RMEventType.NODE_STATE_CHANGED);
        assertEquals(evt.getNodeState(), NodeState.BUSY);
    }
    assertEquals(1, resourceManager.getState().getTotalNodesNumber());
    assertEquals(0, resourceManager.getState().getFreeNodesNumber());
    // client does not exist anymore
    log("Client does not exist anymore. Waiting for client crash detection.");
    // waiting for node free event
    for (int i = 0; i < 1; i++) {
        evt = rmHelper.waitForAnyNodeEvent(RMEventType.NODE_STATE_CHANGED);
        assertEquals(NodeState.FREE, evt.getNodeState());
    }
    assertEquals(1, resourceManager.getState().getTotalNodesNumber());
    assertEquals(1, resourceManager.getState().getFreeNodesNumber());
    log("Test 4 - disconnecting");
    NodeSet ns2 = resourceManager.getAtMostNodes(1, null);
    RMNodeEvent event = rmHelper.waitForAnyNodeEvent(RMEventType.NODE_STATE_CHANGED, 10000);
    Assert.assertTrue(event.getNodeState() == NodeState.BUSY);
    PAFuture.waitFor(ns2);
    log("Number of found nodes " + ns2.size());
    assertEquals(1, ns2.size());
    t = new Thread() {

        public void run() {
            try {
                RMAuthentication auth = rmHelper.getRMAuth();
                Credentials cred = Credentials.createCredentials(new CredData(TestUsers.TEST.username, TestUsers.TEST.password), auth.getPublicKey());
                ResourceManager rm = auth.login(cred);
                rm.disconnect().getBooleanValue();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    };
    t.start();
    t.join();
    try {
        event = rmHelper.waitForAnyNodeEvent(RMEventType.NODE_STATE_CHANGED, 10000);
        fail("Unexpected event: " + event);
    } catch (ProActiveTimeoutException e) {
    }
}
Also used : NodeSet(org.ow2.proactive.utils.NodeSet) DefaultInfrastructureManager(org.ow2.proactive.resourcemanager.nodesource.infrastructure.DefaultInfrastructureManager) StaticPolicy(org.ow2.proactive.resourcemanager.nodesource.policy.StaticPolicy) CredData(org.ow2.proactive.authentication.crypto.CredData) JVMProcessImpl(org.objectweb.proactive.core.process.JVMProcessImpl) ResourceManager(org.ow2.proactive.resourcemanager.frontend.ResourceManager) ProActiveTimeoutException(org.objectweb.proactive.core.ProActiveTimeoutException) ProActiveTimeoutException(org.objectweb.proactive.core.ProActiveTimeoutException) RMAuthentication(org.ow2.proactive.resourcemanager.authentication.RMAuthentication) RMNodeEvent(org.ow2.proactive.resourcemanager.common.event.RMNodeEvent) Credentials(org.ow2.proactive.authentication.crypto.Credentials) Test(org.junit.Test) RMFunctionalTest(functionaltests.utils.RMFunctionalTest)

Example 37 with RMNodeEvent

use of org.ow2.proactive.resourcemanager.common.event.RMNodeEvent in project scheduling by ow2-proactive.

the class StaticSelectionScriptTest method action.

@Test
public void action() throws Exception {
    ResourceManager resourceManager = rmHelper.getResourceManager();
    int nodeNumber = rmHelper.createNodeSource("StaticSelectionScriptTest");
    String node1Name = "node1";
    String node2Name = "node2";
    HashMap<String, String> vmProperties = new HashMap<>();
    String vmPropKey = "myProperty";
    String vmPropValue = "myValue";
    vmProperties.put(vmPropKey, vmPropValue);
    TestNode node1 = rmHelper.createNode(node1Name, vmProperties);
    testNodes.add(node1);
    String node1URL = node1.getNode().getNodeInformation().getURL();
    resourceManager.addNode(node1URL);
    // wait node adding event
    rmHelper.waitForNodeEvent(RMEventType.NODE_ADDED, node1URL);
    // wait for the nodes to be in free state
    rmHelper.waitForAnyNodeEvent(RMEventType.NODE_STATE_CHANGED);
    // create the static selection script object
    SelectionScript sScript = new SelectionScript(new File(vmPropSelectionScriptpath.toURI()), new String[] { vmPropKey, vmPropValue }, false);
    log("Test 1");
    NodeSet nodes = resourceManager.getAtMostNodes(1, sScript);
    // wait node selection
    PAFuture.waitFor(nodes);
    assertEquals(1, nodes.size());
    assertEquals(nodeNumber, resourceManager.getState().getFreeNodesNumber());
    assertEquals(node1URL, nodes.get(0).getNodeInformation().getURL());
    // wait for node busy event
    RMNodeEvent evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node1URL);
    assertEquals(NodeState.BUSY, evt.getNodeState());
    resourceManager.releaseNode(nodes.get(0));
    // wait for node free event
    evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node1URL);
    assertEquals(NodeState.FREE, evt.getNodeState());
    log("Test 2");
    nodes = resourceManager.getAtMostNodes(3, sScript);
    // wait node selection
    PAFuture.waitFor(nodes);
    assertEquals(1, nodes.size());
    assertEquals(nodeNumber, resourceManager.getState().getFreeNodesNumber());
    assertEquals(node1URL, nodes.get(0).getNodeInformation().getURL());
    // wait for node busy event
    evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node1URL);
    assertEquals(NodeState.BUSY, evt.getNodeState());
    resourceManager.releaseNode(nodes.get(0));
    // wait for node free event
    evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node1URL);
    assertEquals(NodeState.FREE, evt.getNodeState());
    log("Test 3");
    // add a second with JVM env var
    TestNode node2 = rmHelper.createNode(node2Name, vmProperties);
    testNodes.add(node2);
    String node2URL = node2.getNode().getNodeInformation().getURL();
    resourceManager.addNode(node2URL);
    // wait node adding event
    rmHelper.waitForNodeEvent(RMEventType.NODE_ADDED, node2URL);
    // wait for the nodes to be in free state
    rmHelper.waitForAnyNodeEvent(RMEventType.NODE_STATE_CHANGED);
    nodes = resourceManager.getAtMostNodes(3, sScript);
    // wait node selection
    PAFuture.waitFor(nodes);
    assertEquals(2, nodes.size());
    assertEquals(nodeNumber, resourceManager.getState().getFreeNodesNumber());
    // wait for node busy event
    evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node1URL);
    assertEquals(NodeState.BUSY, evt.getNodeState());
    evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node2URL);
    assertEquals(NodeState.BUSY, evt.getNodeState());
    resourceManager.releaseNodes(nodes);
    // wait for nodes free event
    evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node1URL);
    assertEquals(NodeState.FREE, evt.getNodeState());
    evt = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, node2URL);
    Assert.assertEquals(NodeState.FREE, evt.getNodeState());
    log("Test 4");
    resourceManager.removeNode(node1URL, true);
    resourceManager.removeNode(node2URL, true);
    // wait for node removed event
    rmHelper.waitForNodeEvent(RMEventType.NODE_REMOVED, node1URL);
    rmHelper.waitForNodeEvent(RMEventType.NODE_REMOVED, node2URL);
    nodes = resourceManager.getAtMostNodes(3, sScript);
    // wait node selection
    PAFuture.waitFor(nodes);
    assertEquals(0, nodes.size());
    assertEquals(nodeNumber, resourceManager.getState().getFreeNodesNumber());
    log("Test 5");
    // create the bad static selection script object
    SelectionScript badScript = new SelectionScript(new File(badSelectionScriptpath.toURI()), new String[] {}, false);
    nodes = resourceManager.getAtMostNodes(3, badScript);
    // wait node selection
    PAFuture.waitFor(nodes);
    assertEquals(0, nodes.size());
    assertEquals(nodeNumber, resourceManager.getState().getFreeNodesNumber());
    log("Test 6");
    // create the static selection script object that doesn't define 'selected'
    SelectionScript noSelectedScript = new SelectionScript(new File(withoutSelectedSelectionScriptpath.toURI()), new String[] {}, false);
    nodes = resourceManager.getAtMostNodes(3, noSelectedScript);
    // wait node selection
    PAFuture.waitFor(nodes);
    assertEquals(0, nodes.size());
    assertEquals(nodeNumber, resourceManager.getState().getFreeNodesNumber());
}
Also used : NodeSet(org.ow2.proactive.utils.NodeSet) SelectionScript(org.ow2.proactive.scripting.SelectionScript) HashMap(java.util.HashMap) TestNode(functionaltests.utils.TestNode) ResourceManager(org.ow2.proactive.resourcemanager.frontend.ResourceManager) File(java.io.File) RMNodeEvent(org.ow2.proactive.resourcemanager.common.event.RMNodeEvent) Test(org.junit.Test) RMFunctionalTest(functionaltests.utils.RMFunctionalTest)

Example 38 with RMNodeEvent

use of org.ow2.proactive.resourcemanager.common.event.RMNodeEvent in project scheduling by ow2-proactive.

the class TestLocalInfrastructureRestartDownNodesPolicy method testRestartDownNodesPolicy.

@Test
public void testRestartDownNodesPolicy() throws Exception {
    nodeSourceName = "Node_source_1";
    RMTHelper.log("Test 1 - restart down nodes policy");
    createNodeSourceWithNodes(nodeSourceName, new Object[] { "ALL", "ALL", "10000" });
    RMState stateTest1 = resourceManager.getState();
    assertEquals(defaultDescriptorNodesNb, stateTest1.getTotalNodesNumber());
    assertEquals(defaultDescriptorNodesNb, stateTest1.getFreeNodesNumber());
    NodeSet ns = resourceManager.getNodes(new Criteria(defaultDescriptorNodesNb));
    for (Node n : ns) {
        rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, n.getNodeInformation().getURL());
    }
    String nodeUrl = ns.get(0).getNodeInformation().getURL();
    // Nodes will be redeployed only if we kill the whole runtime
    rmHelper.killRuntime(nodeUrl);
    RMNodeEvent ev = rmHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, nodeUrl);
    assertEquals(NodeState.DOWN, ev.getNodeState());
    // one node is down - the policy should detect it and redeploy
    rmHelper.waitForAnyNodeEvent(RMEventType.NODE_ADDED);
    rmHelper.waitForAnyNodeEvent(RMEventType.NODE_STATE_CHANGED);
    assertEquals(defaultDescriptorNodesNb, stateTest1.getTotalNodesNumber());
    assertEquals(defaultDescriptorNodesNb, stateTest1.getTotalAliveNodesNumber());
}
Also used : NodeSet(org.ow2.proactive.utils.NodeSet) Node(org.objectweb.proactive.core.node.Node) Criteria(org.ow2.proactive.utils.Criteria) RMState(org.ow2.proactive.resourcemanager.common.RMState) RMNodeEvent(org.ow2.proactive.resourcemanager.common.event.RMNodeEvent) Test(org.junit.Test) RMFunctionalTest(functionaltests.utils.RMFunctionalTest)

Example 39 with RMNodeEvent

use of org.ow2.proactive.resourcemanager.common.event.RMNodeEvent in project scheduling by ow2-proactive.

the class TestNodeSourceThreadPool method testDownNodesCanStillBeDetectedWhenDeploymentThreadsAreExhausted.

@Test
public void testDownNodesCanStillBeDetectedWhenDeploymentThreadsAreExhausted() throws Exception {
    String rmConfig = new File(RMTHelper.class.getResource(TWO_THREADS_CONFIG_FILE_PATH).toURI()).getAbsolutePath();
    this.rmHelper.startRM(rmConfig);
    this.resourceManager = this.rmHelper.getResourceManager();
    this.resourceManager.defineNodeSource(NODE_SOURCE_NAME, SSHInfrastructureV2.class.getName(), getInfiniteRetryInfrastructureParameters(), StaticPolicy.class.getName(), getStaticPolicyParameters(), NODES_NOT_RECOVERABLE);
    this.resourceManager.deployNodeSource(NODE_SOURCE_NAME);
    RMTHelper.log("Waiting for the RM to have one free node");
    while (this.resourceManager.getState().getFreeNodesNumber() != ONE_NODE_PER_HOST) {
        Thread.sleep(ACTIVE_WAITING_PERIOD);
    }
    RMTHelper.log("The RM has one free node");
    RMTHelper.log("Killing the free node");
    String freeNodeUrl = this.resourceManager.getState().getFreeNodes().iterator().next();
    RMTHelper.killRuntime(freeNodeUrl);
    RMMonitorsHandler monitor = this.rmHelper.getMonitorsHandler();
    monitor.flushEvents();
    RMTHelper.log("Waiting for the RM to detect the node down");
    RMNodeEvent nodeEvent = RMTHelper.waitForNodeEvent(RMEventType.NODE_STATE_CHANGED, freeNodeUrl, NODE_STATE_CHANGED_TIMEOUT, monitor);
    assertEquals(NodeState.DOWN, nodeEvent.getNodeState());
}
Also used : StaticPolicy(org.ow2.proactive.resourcemanager.nodesource.policy.StaticPolicy) RMTHelper(functionaltests.utils.RMTHelper) SSHInfrastructureV2(org.ow2.proactive.resourcemanager.nodesource.infrastructure.SSHInfrastructureV2) File(java.io.File) RMNodeEvent(org.ow2.proactive.resourcemanager.common.event.RMNodeEvent) RMMonitorsHandler(functionaltests.monitor.RMMonitorsHandler) Test(org.junit.Test) RMFunctionalTest(functionaltests.utils.RMFunctionalTest)

Example 40 with RMNodeEvent

use of org.ow2.proactive.resourcemanager.common.event.RMNodeEvent in project scheduling by ow2-proactive.

the class RMCore method getRMInitialState.

/**
 * Builds and returns a snapshot of RMCore's current state. Initial state
 * must be understood as a new Monitor point of view. A new monitor start to
 * receive RMCore events, so must be informed of the current state of the
 * Core at the beginning of monitoring. The monitor is built in three parts
 * first with all the nodes knows by the RMCore, then with all deploying
 * nodes known by the deployed node sources and then with all the defined
 * node sources.
 *
 * @return RMInitialState containing nodes and nodeSources of the RMCore.
 */
public RMInitialState getRMInitialState() {
    final Map<String, RMNodeEvent> nodeEvents = this.allNodes.values().stream().map(RMNode::createNodeEvent).collect(Collectors.toMap(RMNodeEvent::getNodeUrl, event -> event));
    for (NodeSource source : this.deployedNodeSources.values()) {
        for (RMDeployingNode node : source.getDeployingAndLostNodes()) {
            final RMNodeEvent nodeEvent = node.createNodeEvent();
            nodeEvents.put(nodeEvent.getNodeUrl(), nodeEvent);
        }
    }
    final List<RMNodeSourceEvent> nodeSourceEvents = new ArrayList<>(this.definedNodeSources.values().stream().map(ns -> {
        if (deployedNodeSources.containsKey(ns.getName())) {
            return PAFuture.getFutureValue(deployedNodeSources.get(ns.getName()).createNodeSourceEvent());
        } else {
            return ns.createNodeSourceEvent();
        }
    }).collect(Collectors.toList()));
    long eventCounter = 0;
    for (RMNodeSourceEvent nodeSourceEvent : nodeSourceEvents) {
        nodeSourceEvent.setCounter(eventCounter++);
    }
    for (RMNodeEvent nodeEvent : nodeEvents.values()) {
        nodeEvent.setCounter(eventCounter++);
    }
    final RMInitialState rmInitialState = new RMInitialState();
    rmInitialState.addAll(nodeEvents.values());
    rmInitialState.addAll(nodeSourceEvents);
    return rmInitialState;
}
Also used : Arrays(java.util.Arrays) NodeSet(org.ow2.proactive.utils.NodeSet) ScriptResult(org.ow2.proactive.scripting.ScriptResult) SelectionScript(org.ow2.proactive.scripting.SelectionScript) ConfigurableField(org.ow2.proactive.resourcemanager.nodesource.common.ConfigurableField) RMAuthenticationImpl(org.ow2.proactive.resourcemanager.authentication.RMAuthenticationImpl) Matcher(java.util.regex.Matcher) Body(org.objectweb.proactive.Body) NodeSource(org.ow2.proactive.resourcemanager.nodesource.NodeSource) DefaultInfrastructureManager(org.ow2.proactive.resourcemanager.nodesource.infrastructure.DefaultInfrastructureManager) ImmediateService(org.objectweb.proactive.annotation.ImmediateService) Map(java.util.Map) Script(org.ow2.proactive.scripting.Script) RMInitialState(org.ow2.proactive.resourcemanager.common.event.RMInitialState) RMNodeEvent(org.ow2.proactive.resourcemanager.common.event.RMNodeEvent) RMJMXHelper(org.ow2.proactive.resourcemanager.core.jmx.RMJMXHelper) NodeSourceStatus(org.ow2.proactive.resourcemanager.nodesource.NodeSourceStatus) RMState(org.ow2.proactive.resourcemanager.common.RMState) Set(java.util.Set) InitActive(org.objectweb.proactive.InitActive) NodeState(org.ow2.proactive.resourcemanager.common.NodeState) RMException(org.ow2.proactive.resourcemanager.exception.RMException) Serializable(java.io.Serializable) RMMonitoringImpl(org.ow2.proactive.resourcemanager.frontend.RMMonitoringImpl) CountDownLatch(java.util.concurrent.CountDownLatch) SimpleScript(org.ow2.proactive.scripting.SimpleScript) NodeException(org.objectweb.proactive.core.node.NodeException) Permission(java.security.Permission) Predicate(com.google.common.base.Predicate) RMDeployingNode(org.ow2.proactive.resourcemanager.rmnode.RMDeployingNode) ScriptException(org.ow2.proactive.scripting.ScriptException) RMEvent(org.ow2.proactive.resourcemanager.common.event.RMEvent) Service(org.objectweb.proactive.Service) StaticPolicy(org.ow2.proactive.resourcemanager.nodesource.policy.StaticPolicy) PluginNotFoundException(org.ow2.proactive.resourcemanager.nodesource.PluginNotFoundException) UserData(org.ow2.proactive.authentication.UserData) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) NodeSourceDescriptor(org.ow2.proactive.resourcemanager.nodesource.NodeSourceDescriptor) RMNodeConfigurator(org.ow2.proactive.resourcemanager.nodesource.RMNodeConfigurator) Client(org.ow2.proactive.resourcemanager.authentication.Client) TopologyException(org.ow2.proactive.resourcemanager.frontend.topology.TopologyException) RMEventType(org.ow2.proactive.resourcemanager.common.event.RMEventType) Criteria(org.ow2.proactive.utils.Criteria) NSAdminPermission(org.ow2.proactive.permissions.NSAdminPermission) Files(java.nio.file.Files) NodeUserAllPermission(org.ow2.proactive.permissions.NodeUserAllPermission) Node(org.objectweb.proactive.core.node.Node) StubObject(org.objectweb.proactive.core.mop.StubObject) File(java.io.File) InfrastructureManagerFactory(org.ow2.proactive.resourcemanager.nodesource.infrastructure.InfrastructureManagerFactory) TopologyManager(org.ow2.proactive.resourcemanager.selection.topology.TopologyManager) Paths(java.nio.file.Paths) StringWrapper(org.objectweb.proactive.core.util.wrapper.StringWrapper) PluginDescriptor(org.ow2.proactive.resourcemanager.nodesource.common.PluginDescriptor) RunActive(org.objectweb.proactive.RunActive) InfrastructureManager(org.ow2.proactive.resourcemanager.nodesource.infrastructure.InfrastructureManager) RMNodeData(org.ow2.proactive.resourcemanager.db.RMNodeData) ActiveObjectCreationException(org.objectweb.proactive.ActiveObjectCreationException) PAFuture(org.objectweb.proactive.api.PAFuture) URISyntaxException(java.net.URISyntaxException) ClientPinger(org.ow2.proactive.resourcemanager.utils.ClientPinger) LocalBodyStore(org.objectweb.proactive.core.body.LocalBodyStore) IdentityPrincipal(org.ow2.proactive.authentication.principals.IdentityPrincipal) ProbablisticSelectionManager(org.ow2.proactive.resourcemanager.selection.statistics.ProbablisticSelectionManager) MethodCallPermission(org.ow2.proactive.permissions.MethodCallPermission) Logger(org.apache.log4j.Logger) TopologyDescriptor(org.ow2.proactive.topology.descriptor.TopologyDescriptor) ThreadDumpNotAccessibleException(org.ow2.proactive.resourcemanager.rmnode.ThreadDumpNotAccessibleException) RMStateNodeUrls(org.ow2.proactive.resourcemanager.common.RMStateNodeUrls) SelectionManager(org.ow2.proactive.resourcemanager.selection.SelectionManager) URI(java.net.URI) ResourceManager(org.ow2.proactive.resourcemanager.frontend.ResourceManager) Topology(org.ow2.proactive.resourcemanager.frontend.topology.Topology) Function(com.google.common.base.Function) ImmutableSet(com.google.common.collect.ImmutableSet) RMNode(org.ow2.proactive.resourcemanager.rmnode.RMNode) Request(org.objectweb.proactive.core.body.request.Request) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) RMNodeHistory(org.ow2.proactive.resourcemanager.common.event.RMNodeHistory) Collectors(java.util.stream.Collectors) List(java.util.List) ActiveObject(org.objectweb.proactive.extensions.annotation.ActiveObject) NodesHouseKeepingService(org.ow2.proactive.resourcemanager.housekeeping.NodesHouseKeepingService) Entry(java.util.Map.Entry) NodesRecoveryManager(org.ow2.proactive.resourcemanager.core.recovery.NodesRecoveryManager) Pattern(java.util.regex.Pattern) RMDBManager(org.ow2.proactive.resourcemanager.db.RMDBManager) RMNodeSourceEvent(org.ow2.proactive.resourcemanager.common.event.RMNodeSourceEvent) RMMonitoring(org.ow2.proactive.resourcemanager.frontend.RMMonitoring) UniqueID(org.objectweb.proactive.core.UniqueID) RMCoreAllPermission(org.ow2.proactive.permissions.RMCoreAllPermission) UserNamePrincipal(org.ow2.proactive.authentication.principals.UserNamePrincipal) TargetType(org.ow2.proactive.resourcemanager.utils.TargetType) BooleanWrapper(org.objectweb.proactive.core.util.wrapper.BooleanWrapper) NodeSourcePolicy(org.ow2.proactive.resourcemanager.nodesource.policy.NodeSourcePolicy) HashMap(java.util.HashMap) AddingNodesException(org.ow2.proactive.resourcemanager.exception.AddingNodesException) NodeSourceConfiguration(org.ow2.proactive.resourcemanager.nodesource.common.NodeSourceConfiguration) PAActiveObject(org.objectweb.proactive.api.PAActiveObject) NodeSourceData(org.ow2.proactive.resourcemanager.db.NodeSourceData) HashSet(java.util.HashSet) UserHistory(org.ow2.proactive.resourcemanager.core.history.UserHistory) NotConnectedException(org.ow2.proactive.resourcemanager.exception.NotConnectedException) LinkedList(java.util.LinkedList) RMAccountsManager(org.ow2.proactive.resourcemanager.core.account.RMAccountsManager) RMConstants(org.ow2.proactive.resourcemanager.common.RMConstants) IntWrapper(org.objectweb.proactive.core.util.wrapper.IntWrapper) ProActiveException(org.objectweb.proactive.core.ProActiveException) PAResourceManagerProperties(org.ow2.proactive.resourcemanager.core.properties.PAResourceManagerProperties) NodeHistory(org.ow2.proactive.resourcemanager.core.history.NodeHistory) RMNodeHelper(org.ow2.proactive.resourcemanager.utils.RMNodeHelper) AbstractMap(java.util.AbstractMap) ClientsPolicy(org.ow2.proactive.policy.ClientsPolicy) NodeSourcePolicyFactory(org.ow2.proactive.resourcemanager.nodesource.policy.NodeSourcePolicyFactory) PrincipalPermission(org.ow2.proactive.permissions.PrincipalPermission) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Collections(java.util.Collections) NodesCleaner(org.ow2.proactive.resourcemanager.cleaning.NodesCleaner) NodeSource(org.ow2.proactive.resourcemanager.nodesource.NodeSource) RMNodeSourceEvent(org.ow2.proactive.resourcemanager.common.event.RMNodeSourceEvent) RMInitialState(org.ow2.proactive.resourcemanager.common.event.RMInitialState) ArrayList(java.util.ArrayList) RMDeployingNode(org.ow2.proactive.resourcemanager.rmnode.RMDeployingNode) RMNodeEvent(org.ow2.proactive.resourcemanager.common.event.RMNodeEvent)

Aggregations

RMNodeEvent (org.ow2.proactive.resourcemanager.common.event.RMNodeEvent)39 Test (org.junit.Test)24 RMFunctionalTest (functionaltests.utils.RMFunctionalTest)19 NodeSet (org.ow2.proactive.utils.NodeSet)16 File (java.io.File)15 ResourceManager (org.ow2.proactive.resourcemanager.frontend.ResourceManager)15 TestNode (functionaltests.utils.TestNode)8 HashMap (java.util.HashMap)8 NodeState (org.ow2.proactive.resourcemanager.common.NodeState)8 Node (org.objectweb.proactive.core.node.Node)7 SelectionScript (org.ow2.proactive.scripting.SelectionScript)7 RMNodeSourceEvent (org.ow2.proactive.resourcemanager.common.event.RMNodeSourceEvent)6 StaticPolicy (org.ow2.proactive.resourcemanager.nodesource.policy.StaticPolicy)6 RMDeployingNode (org.ow2.proactive.resourcemanager.rmnode.RMDeployingNode)6 Criteria (org.ow2.proactive.utils.Criteria)6 RMMonitorEventReceiver (functionaltests.monitor.RMMonitorEventReceiver)5 RMTHelper (functionaltests.utils.RMTHelper)5 HashSet (java.util.HashSet)5 BooleanWrapper (org.objectweb.proactive.core.util.wrapper.BooleanWrapper)5 ArrayList (java.util.ArrayList)4