Package org.apache.whirr.ClusterSpec

Examples of org.apache.whirr.ClusterSpec.Property


   * Load the cluster spec by parsing the command line option set
   */
  protected ClusterSpec getClusterSpec(OptionSet optionSet) throws ConfigurationException {
    Configuration optionsConfig = new PropertiesConfiguration();
    for (Map.Entry<Property, OptionSpec<?>> entry : optionSpecs.entrySet()) {
      Property property = entry.getKey();
      OptionSpec<?> option = entry.getValue();
      Object value;
      if (property.hasMultipleArguments()) {
        value = optionSet.valuesOf(option);
      } else {
        value = optionSet.valueOf(option);
      }
      if (value != null) {
        optionsConfig.setProperty(property.getConfigName(), value);
      }
    }
    CompositeConfiguration config = new CompositeConfiguration();
    config.addConfiguration(optionsConfig);
    if (optionSet.has(configOption)) {
View Full Code Here


  }

  protected ClusterSpec getClusterSpec(OptionSet optionSet) throws ConfigurationException {
    Configuration optionsConfig = new PropertiesConfiguration();
    for (Map.Entry<Property, OptionSpec<?>> entry : optionSpecs.entrySet()) {
      Property property = entry.getKey();
      OptionSpec<?> option = entry.getValue();
      if (property.hasMultipleArguments()) {
        optionsConfig.setProperty(property.getConfigName(),
            optionSet.valuesOf(option));
      } else {
        optionsConfig.setProperty(property.getConfigName(),
            optionSet.valueOf(option));
      }
    }
    CompositeConfiguration config = new CompositeConfiguration();
    config.addConfiguration(optionsConfig);
View Full Code Here

  }

  protected ClusterSpec getClusterSpec(OptionSet optionSet) throws ConfigurationException {
    Configuration optionsConfig = new PropertiesConfiguration();
    for (Map.Entry<Property, OptionSpec<?>> entry : optionSpecs.entrySet()) {
      Property property = entry.getKey();
      OptionSpec<?> option = entry.getValue();
      if (property.hasMultipleArguments()) {
        optionsConfig.setProperty(property.getConfigName(),
            optionSet.valuesOf(option));
      } else {
        optionsConfig.setProperty(property.getConfigName(),
            optionSet.valueOf(option));
      }
    }
    CompositeConfiguration config = new CompositeConfiguration();
    config.addConfiguration(optionsConfig);
View Full Code Here

  }

  protected ClusterSpec getClusterSpec(OptionSet optionSet) throws ConfigurationException {
    Configuration optionsConfig = new PropertiesConfiguration();
    for (Map.Entry<Property, OptionSpec<?>> entry : optionSpecs.entrySet()) {
      Property property = entry.getKey();
      OptionSpec<?> option = entry.getValue();
      if (property.hasMultipleArguments()) {
        optionsConfig.setProperty(property.getConfigName(),
            optionSet.valuesOf(option));
      } else {
        optionsConfig.setProperty(property.getConfigName(),
            optionSet.valueOf(option));
      }
    }
    CompositeConfiguration config = new CompositeConfiguration();
    config.addConfiguration(optionsConfig);
View Full Code Here

   * Load the cluster spec by parsing the command line option set
   */
  protected ClusterSpec getClusterSpec(OptionSet optionSet) throws ConfigurationException {
    Configuration optionsConfig = new PropertiesConfiguration();
    for (Map.Entry<Property, OptionSpec<?>> entry : optionSpecs.entrySet()) {
      Property property = entry.getKey();
      OptionSpec<?> option = entry.getValue();
      Object value;
      if (property.hasMultipleArguments()) {
        value = optionSet.valuesOf(option);
      } else {
        value = optionSet.valueOf(option);
      }
      if (value == null && property.getType().equals(Boolean.class) && optionSet.has(property.getSimpleName())) {
        value = Boolean.TRUE.toString();
      }
      if (value != null) {
        optionsConfig.setProperty(property.getConfigName(), value);
      }
    }
    CompositeConfiguration config = new CompositeConfiguration();
    config.addConfiguration(optionsConfig);
    if (optionSet.has(configOption)) {
View Full Code Here

TOP

Related Classes of org.apache.whirr.ClusterSpec.Property

Copyright © 2018 www.massapicom. 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.