Examples of ContainerID


Examples of jade.core.ContainerID

    CreateAgent ca = new CreateAgent();
    String localName = myAgent.getLocalName()+"-helper-on-"+containerName;
    ca.setAgentName(localName);
    ca.setClassName("jade.tools.logging.LogHelperAgent");
    ca.addArguments(myAgent.getAID());
    ca.setContainer(new ContainerID(containerName, null));
   
    Action act = new Action();
    act.setActor(myAgent.getAMS());
    act.setAction(ca);
   
View Full Code Here

Examples of org.apache.activemq.kaha.ContainerId

    }

    public synchronized void clear() throws IOException {
        initialize();
        for (Iterator i = mapsContainer.getKeys().iterator(); i.hasNext();) {
            ContainerId id = (ContainerId)i.next();
            MapContainer container = getMapContainer(id.getKey(), id.getDataContainerName());
            container.clear();
        }
        for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
            ContainerId id = (ContainerId)i.next();
            ListContainer container = getListContainer(id.getKey(), id.getDataContainerName());
            container.clear();
        }

    }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.container.ContainerId

    protected ListContainerImpl getStoreList(Object id) throws Exception{
        String containerName="test";
        DataManager dm=store.getDataManager(containerName);
        IndexManager im=store.getIndexManager(dm,containerName);
        ContainerId containerId=new ContainerId();
        containerId.setKey(id);
        containerId.setDataContainerName(containerName);
        IndexItem root=store.getListsContainer().addRoot(im,containerId);
        ListContainerImpl result=new ListContainerImpl(containerId,root,im,dm,IndexTypes.DISK_INDEX);
        result.expressDataInterest();
        result.setMaximumCacheSize(MAX_CACHE_SIZE);
        return result;
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.ContainerId

    when(container.getPriority()).thenReturn(priority);
    return container;
  }

  public static ContainerId getMockContainerId(ApplicationAttemptId applicationAttemptId, int id) {
    ContainerId containerId = mock(ContainerId.class);
    doReturn(applicationAttemptId).when(containerId).getApplicationAttemptId();
    doReturn(id).when(containerId).getId();
    doReturn(Integer.toString(id)).when(containerId).toString();
    return containerId;
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.ContainerId

  @Override
  protected void onContainerCompleted(ContainerStatus status) {
    super.onContainerCompleted(status);

    // find assigned container for step execution
    ContainerId containerId = status.getContainerId();
    StepExecution stepExecution = containerToStepMap.get(containerId);

    if (stepExecution != null) {
      for (Entry<StepExecution, Set<StepExecution>> entry : masterExecutions.entrySet()) {
        Set<StepExecution> set = entry.getValue();
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.ContainerId

  public void testSucceed() throws Exception {
    DefaultContainerMonitor monitor = new DefaultContainerMonitor();

    ApplicationAttemptId applicationAttemptId = getMockApplicationAttemptId(1, 1);

    ContainerId containerId1 = getMockContainerId(applicationAttemptId, 1);
    Container container1 = getMockContainer(containerId1, null, null, null);

    // container 1
    // failed free running
    // allocated running completed failed
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.ContainerId

  public void testTwoSucceed() throws Exception {
    DefaultContainerMonitor monitor = new DefaultContainerMonitor();

    ApplicationAttemptId applicationAttemptId = getMockApplicationAttemptId(1, 1);

    ContainerId containerId1 = getMockContainerId(applicationAttemptId, 1);
    Container container1 = getMockContainer(containerId1, null, null, null);
    ContainerId containerId2 = getMockContainerId(applicationAttemptId, 2);
    Container container2 = getMockContainer(containerId2, null, null, null);

    // container 1
    // failed free running
    // allocated running completed failed
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.ContainerId

  public void testFailedAndSucceedWithGarbage() throws Exception {
    DefaultContainerMonitor monitor = new DefaultContainerMonitor();

    ApplicationAttemptId applicationAttemptId = getMockApplicationAttemptId(1, 1);

    ContainerId containerId1 = getMockContainerId(applicationAttemptId, 1);
    Container container1 = getMockContainer(containerId1, null, null, null);
    ContainerId containerId2 = getMockContainerId(applicationAttemptId, 2);
    Container container2 = getMockContainer(containerId2, null, null, null);
    ContainerId containerId3 = getMockContainerId(applicationAttemptId, 3);
    //Container container3 = getMockContainer(containerId3, null, null, null, ContainerState.NEW);

    // container 1
    // failed free running
    // allocated running completed failed
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.ContainerId

  public void testFailedWithContainerLoss() throws Exception {
    // SHDP-385 case when nm is killed and eventually rm receives
    // Container released on a *lost* node" exit_status: -100
    DefaultContainerMonitor monitor = new DefaultContainerMonitor();
    ApplicationAttemptId applicationAttemptId = getMockApplicationAttemptId(1, 1);
    ContainerId containerId1 = getMockContainerId(applicationAttemptId, 1);
    Container container1 = getMockContainer(containerId1, null, null, null);
    monitor.onContainer(Arrays.asList(container1));
    assertMonitorState(monitor, 1, 0, 0, 0);

    monitor.onContainerStatus(Arrays.asList(getMockContainerStatus(containerId1, ContainerState.COMPLETE, -100)));
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.ContainerId

  @Test
  public void testFailedWithContainerDiskFailed() throws Exception {
    DefaultContainerMonitor monitor = new DefaultContainerMonitor();
    ApplicationAttemptId applicationAttemptId = getMockApplicationAttemptId(1, 1);
    ContainerId containerId1 = getMockContainerId(applicationAttemptId, 1);
    Container container1 = getMockContainer(containerId1, null, null, null);
    monitor.onContainer(Arrays.asList(container1));
    assertMonitorState(monitor, 1, 0, 0, 0);

    monitor.onContainerStatus(Arrays.asList(getMockContainerStatus(containerId1, ContainerState.COMPLETE, -101)));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.