Examples of addPropertyValue()


Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

    // build commands from master-runner element
    Element containerRunnerElement = DomUtils.getChildElementByTagName(element, "container-runner");
    if(containerRunnerElement != null && containerCommandElement == null) {
      BeanDefinitionBuilder defBuilder = BeanDefinitionBuilder.genericBeanDefinition(LaunchCommandsFactoryBean.class);
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, containerRunnerElement, "command");
      defBuilder.addPropertyValue("runner", CommandLineContainerRunner.class);
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, containerRunnerElement, "context-file", false, "container-context.xml");
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, containerRunnerElement, "bean-name", false, YarnSystemConstants.DEFAULT_ID_CONTAINER);
      YarnNamespaceUtils.setReferenceIfAttributeDefined(defBuilder, containerRunnerElement, "arguments");
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, containerRunnerElement, "stdout", false, "<LOG_DIR>/Container.stdout");
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, containerRunnerElement, "stderr", false, "<LOG_DIR>/Container.stderr");
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

    boolean hasProperties = false;

    BeanDefinitionBuilder b = BeanDefinitionBuilder.genericBeanDefinition(PropertiesFactoryBean.class);
    b.setScope(builder.getRawBeanDefinition().getScope());
    b.addPropertyValue("localOverride", true);
    ManagedList<Object> propsArray = new ManagedList<Object>(2);
    b.addPropertyValue("propertiesArray", propsArray);

    String attr = element.getAttribute("properties-ref");
    if (StringUtils.hasText(attr)) {
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

    BeanDefinitionBuilder b = BeanDefinitionBuilder.genericBeanDefinition(PropertiesFactoryBean.class);
    b.setScope(builder.getRawBeanDefinition().getScope());
    b.addPropertyValue("localOverride", true);
    ManagedList<Object> propsArray = new ManagedList<Object>(2);
    b.addPropertyValue("propertiesArray", propsArray);

    String attr = element.getAttribute("properties-ref");
    if (StringUtils.hasText(attr)) {
      hasProperties = true;
      propsArray.add(new RuntimeBeanReference(attr));
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

    if (log.isInfoEnabled()) {
      log.info("No bean named '" + YarnContextUtils.TASK_SCHEDULER_BEAN_NAME
          + "' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.");
    }
    BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(ThreadPoolTaskScheduler.class);
    builder.addPropertyValue("poolSize", 10);
    builder.addPropertyValue("threadNamePrefix", "task-scheduler-");
    builder.addPropertyValue("rejectedExecutionHandler", new CallerRunsPolicy());
    BeanComponentDefinition schedulerComponent = new BeanComponentDefinition(builder.getBeanDefinition(),
        YarnContextUtils.TASK_SCHEDULER_BEAN_NAME);
    BeanDefinitionReaderUtils.registerBeanDefinition(schedulerComponent, registry);
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

      log.info("No bean named '" + YarnContextUtils.TASK_SCHEDULER_BEAN_NAME
          + "' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.");
    }
    BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(ThreadPoolTaskScheduler.class);
    builder.addPropertyValue("poolSize", 10);
    builder.addPropertyValue("threadNamePrefix", "task-scheduler-");
    builder.addPropertyValue("rejectedExecutionHandler", new CallerRunsPolicy());
    BeanComponentDefinition schedulerComponent = new BeanComponentDefinition(builder.getBeanDefinition(),
        YarnContextUtils.TASK_SCHEDULER_BEAN_NAME);
    BeanDefinitionReaderUtils.registerBeanDefinition(schedulerComponent, registry);
  }
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

          + "' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.");
    }
    BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(ThreadPoolTaskScheduler.class);
    builder.addPropertyValue("poolSize", 10);
    builder.addPropertyValue("threadNamePrefix", "task-scheduler-");
    builder.addPropertyValue("rejectedExecutionHandler", new CallerRunsPolicy());
    BeanComponentDefinition schedulerComponent = new BeanComponentDefinition(builder.getBeanDefinition(),
        YarnContextUtils.TASK_SCHEDULER_BEAN_NAME);
    BeanDefinitionReaderUtils.registerBeanDefinition(schedulerComponent, registry);
  }
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

    Element masterRunnerElement = DomUtils.getChildElementByTagName(element, "master-runner");
    if(masterRunnerElement != null && masterCommandElement == null) {
      BeanDefinitionBuilder defBuilder = BeanDefinitionBuilder.genericBeanDefinition(LaunchCommandsFactoryBean.class);
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, masterRunnerElement, "command");
      if (masterRunnerElement.hasAttribute("runner")) {
        defBuilder.addPropertyValue("runner", masterRunnerElement.getAttribute("runner"));               
      } else {
        defBuilder.addPropertyValue("runner", CommandLineAppmasterRunner.class);       
      }
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, masterRunnerElement, "context-file", false, "appmaster-context.xml");
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, masterRunnerElement, "bean-name", false, YarnSystemConstants.DEFAULT_ID_APPMASTER);
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

      BeanDefinitionBuilder defBuilder = BeanDefinitionBuilder.genericBeanDefinition(LaunchCommandsFactoryBean.class);
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, masterRunnerElement, "command");
      if (masterRunnerElement.hasAttribute("runner")) {
        defBuilder.addPropertyValue("runner", masterRunnerElement.getAttribute("runner"));               
      } else {
        defBuilder.addPropertyValue("runner", CommandLineAppmasterRunner.class);       
      }
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, masterRunnerElement, "context-file", false, "appmaster-context.xml");
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, masterRunnerElement, "bean-name", false, YarnSystemConstants.DEFAULT_ID_APPMASTER);
      YarnNamespaceUtils.setReferenceIfAttributeDefined(defBuilder, masterRunnerElement, "arguments");
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, masterRunnerElement, "stdout", false, "<LOG_DIR>/Appmaster.stdout");
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

    if(containerCommandElement != null) {
      String textContent = containerCommandElement.getTextContent();
      String command = ParsingUtils.extractRunnableCommand(textContent);
      List<String> commands = new ArrayList<String>();
      commands.add(command);
      builder.addPropertyValue("commands", commands);
    }

    // build commands from master-runner element
    Element containerRunnerElement = DomUtils.getChildElementByTagName(element, "container-runner");
    if(containerRunnerElement != null && containerCommandElement == null) {
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionBuilder.addPropertyValue()

    Element containerRunnerElement = DomUtils.getChildElementByTagName(element, "container-runner");
    if(containerRunnerElement != null && containerCommandElement == null) {
      BeanDefinitionBuilder defBuilder = BeanDefinitionBuilder.genericBeanDefinition(LaunchCommandsFactoryBean.class);
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, containerRunnerElement, "command");
      if (containerRunnerElement.hasAttribute("runner")) {
        defBuilder.addPropertyValue("runner", containerRunnerElement.getAttribute("runner"));
      } else {
        defBuilder.addPropertyValue("runner", CommandLineContainerRunner.class);
      }
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, containerRunnerElement, "context-file", false, "container-context.xml");
      YarnNamespaceUtils.setValueIfAttributeDefined(defBuilder, containerRunnerElement, "bean-name", false, YarnSystemConstants.DEFAULT_ID_CONTAINER);
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.