Package com.dp.nebula.wormhole.engine.storage

Examples of com.dp.nebula.wormhole.engine.storage.StorageConf


  private List<StorageConf> createStorageConfs(JobConf jobConf) {
    List<JobPluginConf> writerConfList = jobConf.getWriterConfs();
    List<StorageConf> result = new ArrayList<StorageConf>();

    for (JobPluginConf jobPluginConf : writerConfList) {
      StorageConf storageConf = new StorageConf();
      storageConf.setId(jobPluginConf.getId());
      storageConf.setStorageClassName(engineConf.getValue(
          EngineConfParamKey.STORAGE_CLASS_NAME,
          DEFAULT_STORAGE_CLASS_NAME));
      storageConf.setLineLimit(engineConf.getIntValue(
          EngineConfParamKey.STORAGE_LINE_LIMIT,
          DEFAULT_STORAGE_LINE_LIMIT));
      storageConf.setByteLimit(engineConf.getIntValue(
          EngineConfParamKey.STORAGE_BYTE_LIMIT,
          DEFAULT_STORAGE_BYTE_LIMIT));
      storageConf.setDestructLimit(engineConf.getIntValue(
          EngineConfParamKey.STORAGE_DESTRUCT_LIMIT,
          DEFAULT_STORAGE_DESTRUCT_LIMIT));
      storageConf.setPeriod(engineConf.getIntValue(
          EngineConfParamKey.MONITOR_INFO_DISPLAY_PERIOD,
          INFO_SHOW_PERIOD));
      storageConf.setWaitTime(engineConf.getIntValue(
          EngineConfParamKey.STORAGE_WAIT_TIME,
          DEFAULT_STORAGE_WAIT_TIME));
      storageConf
          .setPeripheralTimeout(engineConf
              .getIntValue(EngineConfParamKey.READER_AND_WRITER_PERIPHERAL_TIMEOUT));
      result.add(storageConf);
    }
    return result;
View Full Code Here


    IParam engineConf = null;
    engineConf = ParseXMLUtil.loadEngineConfig();
    List<StorageConf> result = new ArrayList<StorageConf>();
   
    for(int i = 0; i< 5; i++){
      StorageConf storageConf = new StorageConf();
      storageConf.setId(String.valueOf(i));
      storageConf.setStorageClassName(
          engineConf.getValue(EngineConfParamKey.STORAGE_CLASS_NAME));
      storageConf.setLineLimit(
          engineConf.getIntValue(EngineConfParamKey.STORAGE_LINE_LIMIT));
      storageConf.setByteLimit(
          engineConf.getIntValue(EngineConfParamKey.STORAGE_BYTE_LIMIT));
      storageConf.setDestructLimit(
          engineConf.getIntValue(EngineConfParamKey.STORAGE_DESTRUCT_LIMIT));
      storageConf.setPeriod(
          engineConf.getIntValue(EngineConfParamKey.MONITOR_INFO_DISPLAY_PERIOD));
      storageConf.setWaitTime(
          engineConf.getIntValue(EngineConfParamKey.STORAGE_WAIT_TIME));
      result.add(storageConf);
    }
    StorageManager manager = new StorageManager(result);
    BufferedLineExchanger exchanger = new BufferedLineExchanger(manager.getStorageForWriter("1"), manager.getStorageForReader());
View Full Code Here

    IParam engineConf = null;
    engineConf = ParseXMLUtil.loadEngineConfig();
    List<StorageConf> result = new ArrayList<StorageConf>();
   
    for(int i = 0; i< 5; i++){
      StorageConf storageConf = new StorageConf();
      storageConf.setId(String.valueOf(i));
      storageConf.setStorageClassName(
          engineConf.getValue(EngineConfParamKey.STORAGE_CLASS_NAME));
      storageConf.setLineLimit(
          10);
      storageConf.setByteLimit(
          engineConf.getIntValue(EngineConfParamKey.STORAGE_BYTE_LIMIT));
      storageConf.setDestructLimit(
          engineConf.getIntValue(EngineConfParamKey.STORAGE_DESTRUCT_LIMIT));
      storageConf.setPeriod(
          engineConf.getIntValue(EngineConfParamKey.MONITOR_INFO_DISPLAY_PERIOD));
      storageConf.setWaitTime(
          1000);
      result.add(storageConf);
    }
    StorageManager manager = new StorageManager(result);
    return new BufferedLineExchanger(manager.getStorageForWriter("1"), manager.getStorageForReader());
View Full Code Here

    IParam engineConf = null;
    engineConf = ParseXMLUtil.loadEngineConfig();
    List<StorageConf> result = new ArrayList<StorageConf>();
   
    for(int i = 0; i< 1; i++){
      StorageConf storageConf = new StorageConf();
      storageConf.setId(String.valueOf(i));
      storageConf.setStorageClassName(
          engineConf.getValue(EngineConfParamKey.STORAGE_CLASS_NAME));
      storageConf.setLineLimit(
          10);
      storageConf.setByteLimit(
          engineConf.getIntValue(EngineConfParamKey.STORAGE_BYTE_LIMIT));
      storageConf.setDestructLimit(
          engineConf.getIntValue(EngineConfParamKey.STORAGE_DESTRUCT_LIMIT));
      storageConf.setPeriod(
          engineConf.getIntValue(EngineConfParamKey.MONITOR_INFO_DISPLAY_PERIOD));
      storageConf.setWaitTime(
          5000
         
      );
      result.add(storageConf);
    }
View Full Code Here

TOP

Related Classes of com.dp.nebula.wormhole.engine.storage.StorageConf

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.