Examples of ContainerContext


Examples of nextapp.echo2.webcontainer.ContainerContext

        if (sessionExpirationMessageText.getText().trim().length() > 0) {
            clientConfiguration.setProperty(ClientConfiguration.PROPERTY_SESSION_EXPIRATION_MESSAGE,
                    sessionExpirationMessageText.getText());
        }
       
        ContainerContext containerContext
                = (ContainerContext) getApplicationInstance().getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
        containerContext.setClientConfiguration(clientConfiguration);
    }
View Full Code Here

Examples of nextapp.echo2.webcontainer.ContainerContext

       
        Button setNullButton = new Button("Set ServerDelayMessage to None");
        setNullButton.setStyleName("Default");
        setNullButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                ContainerContext containerContext
                        = (ContainerContext) getApplicationInstance().getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
                containerContext.setServerDelayMessage(null);
            }
        });
        add(setNullButton);
       
        Button setDefaultButton = new Button("Set ServerDelayMessage to Default");
        setDefaultButton.setStyleName("Default");
        setDefaultButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                ContainerContext containerContext
                        = (ContainerContext) getApplicationInstance().getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
                containerContext.setServerDelayMessage(DefaultServerDelayMessage.INSTANCE);
            }
        });
        add(setDefaultButton);
       
        Button setCustomDefaultButton = new Button("Set ServerDelayMessage to Custom DefaultServerDelayMessage");
        setCustomDefaultButton.setStyleName("Default");
        setCustomDefaultButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                ContainerContext containerContext
                        = (ContainerContext) getApplicationInstance().getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
                containerContext.setServerDelayMessage(new DefaultServerDelayMessage("Well, this seems to be taking a while.  "
                        + "Now might be a good time to grab a snack or a frosty beverage from the kitchen."));
            }
        });
        add(setCustomDefaultButton);
       
        Button coolButton = new Button("Set ServerDelayMessage to CoolDelayMessage");
        coolButton.setStyleName("Default");
        coolButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                ContainerContext containerContext
                        = (ContainerContext) getApplicationInstance().getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
                containerContext.setServerDelayMessage(new CoolDelayMessage(containerContext, "PLEASE WAIT"));
            }
        });
        add(coolButton);
    }
View Full Code Here

Examples of org.apache.tez.common.ContainerContext

      ApplicationId appId = ApplicationId.newInstance(10000, 1);
      ApplicationAttemptId appAttemptId = ApplicationAttemptId.newInstance(appId, 1);
      ContainerId containerId = ContainerId.newInstance(appAttemptId, 1);

      TezTaskUmbilicalForTest umbilical = new TezTaskUmbilicalForTest();
      ContainerContext containerContext = new ContainerContext(containerId.toString());

      ContainerReporter containerReporter = new ContainerReporter(umbilical, containerContext, 100);
      ListenableFuture<ContainerTask> getTaskFuture = executor.submit(containerReporter);

      getTaskFuture.get();
View Full Code Here

Examples of org.apache.tez.common.ContainerContext

    }
  }
 
  public ContainerExecutionResult run() throws IOException, InterruptedException, TezException {

    ContainerContext containerContext = new ContainerContext(containerIdString);
    ContainerReporter containerReporter = new ContainerReporter(umbilical, containerContext,
        getTaskMaxSleepTime);

    taskReporter = new TaskReporter(umbilical, amHeartbeatInterval,
        sendCounterInterval, maxEventsToGet, heartbeatCounter, containerIdString);
View Full Code Here

Examples of org.apache.tez.common.ContainerContext

   
    LOG.info("PID, containerIdentifier: " + pid + ", " + containerIdentifier);
   
    ContainerTask containerTask = null;
    UserGroupInformation childUGI = null;
    ContainerContext containerContext = new ContainerContext(
        containerIdentifier, pid);
    int getTaskMaxSleepTime = defaultConf.getInt(
        TezConfiguration.TEZ_TASK_GET_TASK_SLEEP_INTERVAL_MS_MAX,
        TezConfiguration.TEZ_TASK_GET_TASK_SLEEP_INTERVAL_MS_MAX_DEFAULT);
    int taskCount = 0;
View Full Code Here

Examples of org.apache.tez.common.ContainerContext

   
    LOG.info("PID, containerIdentifier: " + pid + ", " + containerIdentifier);
   
    ContainerTask containerTask = null;
    UserGroupInformation childUGI = null;
    ContainerContext containerContext = new ContainerContext(
        containerIdentifier, pid);
    int getTaskMaxSleepTime = defaultConf.getInt(
        TezConfiguration.TEZ_TASK_GET_TASK_SLEEP_INTERVAL_MS_MAX,
        TezConfiguration.TEZ_TASK_GET_TASK_SLEEP_INTERVAL_MS_MAX_DEFAULT);
    int taskCount = 0;
View Full Code Here

Examples of org.apache.tez.common.ContainerContext

   
    LOG.info("PID, containerIdentifier: " + pid + ", " + containerIdentifier);
   
    ContainerTask containerTask = null;
    UserGroupInformation childUGI = null;
    ContainerContext containerContext = new ContainerContext(
        containerIdentifier, pid);
    int getTaskMaxSleepTime = defaultConf.getInt(
        TezConfiguration.TEZ_TASK_GET_TASK_SLEEP_INTERVAL_MS_MAX,
        TezConfiguration.TEZ_TASK_GET_TASK_SLEEP_INTERVAL_MS_MAX_DEFAULT);
    int taskCount = 0;
View Full Code Here

Examples of org.apache.tez.common.ContainerContext

   
    LOG.info("PID, containerIdentifier: " + pid + ", " + containerIdentifier);
   
    ContainerTask containerTask = null;
    UserGroupInformation childUGI = null;
    ContainerContext containerContext = new ContainerContext(
        containerIdentifier, pid);
    int getTaskMaxSleepTime = defaultConf.getInt(
        TezConfiguration.TEZ_TASK_GET_TASK_SLEEP_INTERVAL_MS_MAX,
        TezConfiguration.TEZ_TASK_GET_TASK_SLEEP_INTERVAL_MS_MAX_DEFAULT);
    int taskCount = 0;
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

    taskResource = Resource.newInstance(1024, 1);
    localResources = new HashMap<String, LocalResource>();
    environment = new HashMap<String, String>();
    javaOpts = "";
    leafVertex = false;
    containerContext = new ContainerContext(localResources, credentials,
        environment, javaOpts);
    Vertex vertex = mock(Vertex.class);
    eventHandler = new TestEventHandler();
   
    mockTask = new MockTaskImpl(vertexId, partition,
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

  private AMSchedulerEventTALaunchRequest createLaunchRequestEvent(TezTaskAttemptID taID,
      TaskAttempt ta, Resource capability, String[] hosts, String[] racks, Priority priority,
      Map<String, LocalResource> localResources, String jvmOpts) {
    return createLaunchRequestEvent(taID, ta, capability, hosts, racks, priority,
        new ContainerContext(localResources, new Credentials(), new HashMap<String, String>(), jvmOpts));
  }
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.