Package eu.stratosphere.configuration

Examples of eu.stratosphere.configuration.Configuration


    if (cl == null) {
      throw new IOException("Cannot find class loader for job graph " + this.jobID);
    }

    // Re-instantiate the job configuration object and read the configuration
    this.jobConfiguration = new Configuration(cl);
    this.jobConfiguration.read(in);

    // Read the task manager configuration
    this.taskManagerConfiguration.read(in);
  }
View Full Code Here


   *         if the path cannot be retrieved
   */
  public Path getFileOutputPath() {

    // TODO: This is a quick workaround, problem can be solved in a more generic way
    final Configuration conf = getEnvironment().getTaskConfiguration();

    final String outputPath = conf.getString("outputPath", null);

    if (outputPath != null) {
      return new Path(outputPath);
    }

View Full Code Here

      return iterationNode;
    }
   
    public void setHeadTask(JobTaskVertex headTask, TaskConfig headConfig) {
      this.headTask = headTask;
      this.headFinalResultConfig = new TaskConfig(new Configuration());
     
      // check if we already had a configuration, for example if the solution set was
      if (this.headConfig != null) {
        headConfig.getConfiguration().addAll(this.headConfig.getConfiguration());
      }
View Full Code Here

    // Create a new job manager object
    JobManager jobManager = new JobManager(executionMode);
   
    // Set base dir for info server
    Configuration infoserverConfig = GlobalConfiguration.getConfiguration();
    if (configDir != null && new File(configDir).isDirectory()) {
      infoserverConfig.setString(ConfigConstants.STRATOSPHERE_BASE_DIR_PATH_KEY, configDir+"/..");
    }
    GlobalConfiguration.includeConfiguration(infoserverConfig);
    return jobManager;
  }
View Full Code Here

  /**
   * Starts the Jetty Infoserver for the Jobmanager
   *
   */
  public void startInfoServer() {
    final Configuration config = GlobalConfiguration.getConfiguration();
    // Start InfoServer
    try {
      int port = config.getInteger(ConfigConstants.JOB_MANAGER_WEB_PORT_KEY, ConfigConstants.DEFAULT_JOB_MANAGER_WEB_FRONTEND_PORT);
      server = new WebInfoServer(config, port, this);
      server.start();
    } catch (FileNotFoundException e) {
      LOG.error(e.getMessage(), e);
    } catch (Exception e) {
View Full Code Here

   * Constructs a new local instance manager.
   *
   */
  public LocalInstanceManager() throws Exception {

    final Configuration config = GlobalConfiguration.getConfiguration();

    // get the default instance type
    InstanceType type = null;
    final String descr = config.getString(LOCALINSTANCE_TYPE_KEY, null);
    if (descr != null) {
      LOG.info("Attempting to parse default instance type from string " + descr);
      type = InstanceTypeFactory.constructFromDescription(descr);
      if (type == null) {
        LOG.warn("Unable to parse default instance type from configuration, using hardware profile instead");
      }
    }

    this.defaultInstanceType = (type != null) ? type : createDefaultInstanceType();

    LOG.info("Default instance type is " + this.defaultInstanceType.getIdentifier());

    this.networkTopology = NetworkTopology.createEmptyTopology();

    this.instanceTypeDescriptionMap = new SerializableHashMap<InstanceType, InstanceTypeDescription>();

    numTaskManagers = GlobalConfiguration.getInteger(ConfigConstants
        .LOCAL_INSTANCE_MANAGER_NUMBER_TASK_MANAGER, 1);
    for(int i=0; i< numTaskManagers; i++){

      Configuration tm = new Configuration();
      int ipcPort = GlobalConfiguration.getInteger(ConfigConstants.TASK_MANAGER_IPC_PORT_KEY,
          ConfigConstants.DEFAULT_TASK_MANAGER_IPC_PORT);
      int dataPort = GlobalConfiguration.getInteger(ConfigConstants.TASK_MANAGER_DATA_PORT_KEY,
          ConfigConstants.DEFAULT_TASK_MANAGER_DATA_PORT);

      tm.setInteger(ConfigConstants.TASK_MANAGER_IPC_PORT_KEY, ipcPort + i);
      tm.setInteger(ConfigConstants.TASK_MANAGER_DATA_PORT_KEY, dataPort + i);

      GlobalConfiguration.includeConfiguration(tm);

      TaskManager t = new TaskManager();
      taskManagers.add(t);
View Full Code Here

      } catch (IOException ioe) {
        throw new RuntimeException("Library cache manager could not be instantiated.", ioe);
      }
    }
    // obtain task configuration (including stub parameters)
    Configuration taskConf = getTaskConfiguration();
    taskConf.setClassLoader(this.userCodeClassLoader);
    this.config = new TaskConfig(taskConf);

    try {
      this.format = config.<OutputFormat<IT>>getStubWrapper(this.userCodeClassLoader).getUserCodeObject(OutputFormat.class, this.userCodeClassLoader);
View Full Code Here

    mapper.setRuntimeContext(getUdfRuntimeContext());
  }

  @Override
  public void openTask() throws Exception {
    Configuration stubConfig = this.config.getStubParameters();
    RegularPactTask.openUserCode(this.mapper, stubConfig);
  }
View Full Code Here

    mapper.setRuntimeContext(getUdfRuntimeContext());
  }

  @Override
  public void openTask() throws Exception {
    Configuration stubConfig = this.config.getStubParameters();
    RegularPactTask.openUserCode(this.mapper, stubConfig);
  }
View Full Code Here

    mapper.setRuntimeContext(getUdfRuntimeContext());
  }

  @Override
  public void openTask() throws Exception {
    Configuration stubConfig = this.config.getStubParameters();
    RegularPactTask.openUserCode(this.mapper, stubConfig);
  }
View Full Code Here

TOP

Related Classes of eu.stratosphere.configuration.Configuration

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.