Examples of IParam


Examples of com.dp.nebula.wormhole.common.interfaces.IParam

  @Override
  public List<IParam> split(){
    List<IParam> result = new ArrayList<IParam>();
    int concurrency = param.getIntValue(ParamKey.concurrency);
    for (int i = 0; i < concurrency; i++){
      IParam p = param.clone();
      result.add(p);
    }
    log.info("the number of split: " + result.size());
    return result;
  }
View Full Code Here

Examples of com.dp.nebula.wormhole.common.interfaces.IParam

    return wmInstance;
  }

  public int getFailedLinesThreshold(String writerID) {
    IParam jobParam = writerToJobParamsMap.get(writerID);
    if (jobParam == null) {
      return 0;
    }
    return jobParam.getIntValue(JOB_PARAM_FAILED_LINES_THRESHOLD, 0);
  }
View Full Code Here

Examples of com.dp.nebula.wormhole.common.interfaces.IParam

      Map<String, IParam> pluginParamsMap) throws TimeoutException,
      ExecutionException, InterruptedException {
    for (JobPluginConf jobPluginConf : jobPluginList) {

      String writerID = jobPluginConf.getId();
      IParam jobParams = jobPluginConf.getPluginParam();
      writerToJobParamsMap.put(writerID, jobParams);
      IParam pluginParams = pluginParamsMap.get(jobPluginConf
          .getPluginName());
      jobParams.putValue(AbstractPlugin.PLUGINID, writerID);
      String writerPath = pluginParams.getValue(PluginConfParamKey.PATH);
      String writerPeripheryClassName = pluginParams
          .getValue(PluginConfParamKey.PERIPHERY_CLASS_NAME);
      IWriterPeriphery writerPeriphery = null;
      if (StringUtils.isEmpty(writerPeripheryClassName)) {
        writerPeriphery = new DefaultWriterPeriphery();
      } else {
        writerPeriphery = ReflectionUtil
            .createInstanceByDefaultConstructor(
                writerPeripheryClassName,
                IWriterPeriphery.class,
                JarLoader.getInstance(writerPath));
      }
      writerPeripheryMap.put(writerID, writerPeriphery);

      String splitterClassName = pluginParams
          .getValue(PluginConfParamKey.SPLITTER_CLASS_NAME);
      ISplitter splitter = null;
      if (StringUtils.isEmpty(splitterClassName)) {
        splitter = new DefaultSplitter();
      } else {
        splitter = ReflectionUtil.createInstanceByDefaultConstructor(
            splitterClassName, ISplitter.class,
            JarLoader.getInstance(writerPath));
      }

      WritePrepareCallable<List<IParam>> writerCallable = new WritePrepareCallable<List<IParam>>();
      writerCallable.writerPeriphery = writerPeriphery;
      writerCallable.jobParams = jobParams;
      runWithTimeout(new FutureTask<List<IParam>>(writerCallable));
      splitter.init(jobParams);

      WriteSplitCallable<List<IParam>> splitCallable = new WriteSplitCallable<List<IParam>>();
      splitCallable.splitter = splitter;
      List<IParam> splittedParam = (List<IParam>) runWithTimeout(new FutureTask<List<IParam>>(
          splitCallable));

      int concurrency = getConcurrency(jobParams, pluginParams);
      String writeClassName = pluginParams
          .getValue(PluginConfParamKey.PLUGIN_CLASS_NAME);
      ExecutorService writerPool = createThreadPool(concurrency);
      writerPoolMap.put(writerID, writerPool);

      List<Future<Integer>> resultList = new ArrayList<Future<Integer>>();
View Full Code Here

Examples of com.dp.nebula.wormhole.common.interfaces.IParam

    IWriterPeriphery writerPeriphery = writerPeripheryMap.get(writerID);
    if (writerPeriphery == null) {
      s_logger.error("can not find any writer periphery for " + writerID);
      return;
    }
    IParam jobParams = writerToJobParamsMap.get(writerID);
    if (jobParams == null) {
      s_logger.error("can not find any job parameters for " + writerID);
      return;
    }
View Full Code Here

Examples of com.dp.nebula.wormhole.common.interfaces.IParam

    IWriterPeriphery writerPeriphery = writerPeripheryMap.get(writerID);
    if (writerPeriphery == null) {
      s_logger.error("can not find any writer periphery for " + writerID);
      return;
    }
    IParam jobParams = writerToJobParamsMap.get(writerID);
    if (jobParams == null) {
      s_logger.error("can not find any job parameters for " + writerID);
      return;
    }
View Full Code Here

Examples of org.apache.wookie.beans.IParam

      feature.setFeatureName(featureEntity.getName());
      feature.setRequired(featureEntity.isRequired());
            widget.getFeatures().add(feature);
      // now attach all parameters to this feature.
      for(IParamEntity paramEntity : featureEntity.getParams()){
              IParam param = persistenceManager.newInstance(IParam.class);
        param.setParameterName(paramEntity.getName());
        param.setParameterValue(paramEntity.getValue());
              feature.getParameters().add(param);
      }
    }
  }
View Full Code Here

Examples of org.apache.wookie.beans.IParam

      feature.setFeatureName(featureEntity.getName());
      feature.setRequired(featureEntity.isRequired());
            widget.getFeatures().add(feature);
      // now attach all parameters to this feature.
      for(IParamEntity paramEntity : featureEntity.getParams()){
              IParam param = persistenceManager.newInstance(IParam.class);
        param.setParameterName(paramEntity.getName());
        param.setParameterValue(paramEntity.getValue());
              feature.getParameters().add(param);
      }
    }
  }
View Full Code Here

Examples of org.apache.wookie.beans.IParam

      feature.setFeatureName(featureEntity.getName());
      feature.setRequired(featureEntity.isRequired());
            widget.getFeatures().add(feature);
      // now attach all parameters to this feature.
      for(IParamEntity paramEntity : featureEntity.getParams()){
              IParam param = persistenceManager.newInstance(IParam.class);
        param.setParameterName(paramEntity.getName());
        param.setParameterValue(paramEntity.getValue());
              feature.getParameters().add(param);
      }
    }
  }
View Full Code Here

Examples of org.apache.wookie.beans.IParam

      feature.setFeatureName(featureEntity.getName());
      feature.setRequired(featureEntity.isRequired());
            widget.getFeatures().add(feature);
      // now attach all parameters to this feature.
      for(IParamEntity paramEntity : featureEntity.getParams()){
              IParam param = persistenceManager.newInstance(IParam.class);
        param.setParameterName(paramEntity.getName());
        param.setParameterValue(paramEntity.getValue());
              feature.getParameters().add(param);
      }
    }
  }
View Full Code Here

Examples of org.apache.wookie.w3c.IParam

      feature.setName(ofeature.getName());
      feature.setRequired(ofeature.isRequired());
            widget.getFeatures().add(feature);
      // now attach all parameters to this feature.
      for(org.apache.wookie.w3c.IParam oparam : ofeature.getParameters()){
              IParam param = persistenceManager.newInstance(IParam.class);
        param.setName(oparam.getName());
        param.setValue(oparam.getValue());
              feature.getParameters().add(param);
      }
    }
  }
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.