container/src/main/java/com/streamsets/datacollector/validation/ValidationUtil.java
public static void resolveStageAlias(
    StageLibraryTask stageLibrary,
    StageConfiguration stageConf
  ) {
    String aliasKey = Joiner.on(",").join(stageConf.getLibrary(), stageConf.getStageName());
    String aliasValue = Strings.nullToEmpty(stageLibrary.getStageNameAliases().get(aliasKey));
    if (LOG.isTraceEnabled()) {
      for (String key : stageLibrary.getStageNameAliases().keySet()) {
        LOG.trace("Stage Lib Alias: {} => {}", key, stageLibrary.getStageNameAliases().get(key));
      }
      LOG.trace("Looking for '{}' and found '{}'", aliasKey, aliasValue);
    }
    if (!aliasValue.isEmpty()) {
      List<String> alias = Splitter.on(",").splitToList(aliasValue);
      if (alias.size() == 2) {
        LOG.debug("Converting '{}' to '{}'", aliasKey, aliasValue);
        stageConf.setLibrary(alias.get(0));
        stageConf.setStageName(alias.get(1));
      } else {
        LOG.error("Malformed stage alias: '{}'", aliasValue);
      }
    }
  }
public static void resolveStageAlias(
    StageLibraryTask stageLibrary,
    StageConfiguration stageConf
  ) {
    String aliasKey = Joiner.on(",").join(stageConf.getLibrary(), stageConf.getStageName());
    String aliasValue = Strings.nullToEmpty(stageLibrary.getStageNameAliases().get(aliasKey));
    if (LOG.isTraceEnabled()) {
      for (String key : stageLibrary.getStageNameAliases().keySet()) {
        LOG.trace("Stage Lib Alias: {} => {}", key, stageLibrary.getStageNameAliases().get(key));
      }
      LOG.trace("Looking for '{}' and found '{}'", aliasKey, aliasValue);
    }
    if (!aliasValue.isEmpty()) {
      List<String> alias = Splitter.on(",").splitToList(aliasValue);
      if (alias.size() == 2) {
        LOG.debug("Converting '{}' to '{}'", aliasKey, aliasValue);
        stageConf.setLibrary(alias.get(0));
        stageConf.setStageName(alias.get(1));
      } else {
        LOG.error("Malformed stage alias: '{}'", aliasValue);
      }
    }
  }
public static void resolveStageAlias ( StageLibraryTask stageLibrary , StageConfiguration stageConf ) { String aliasKey = Joiner . on ( "," ) . join ( stageConf . getLibrary ( ) , stageConf . getStageName ( ) ) ; String aliasValue = Strings . nullToEmpty ( stageLibrary . getStageNameAliases ( ) . get ( aliasKey ) ) ; if ( LOG . isTraceEnabled ( ) ) { for ( String key : stageLibrary . getStageNameAliases ( ) . keySet ( ) ) { LOG . trace ( "Stage Lib Alias: {} => {}" , key , stageLibrary . getStageNameAliases ( ) . get ( key ) ) ; } LOG . trace ( "Looking for '{}' and found '{}'" , aliasKey , aliasValue ) ; } if ( ! aliasValue . isEmpty ( ) ) { List < String > alias = Splitter . on ( "," ) . splitToList ( aliasValue ) ; if ( alias . size ( ) == 2 ) { LOG . debug ( "Converting '{}' to '{}'" , aliasKey , aliasValue ) ; stageConf . setLibrary ( alias . get ( 0 ) ) ; stageConf . setStageName ( alias . get ( 1 ) ) ; } else { LOG . error ( "Malformed stage alias: '{}'" , aliasValue ) ; } } }
Resolve stage aliases (e.g. when a stage is renamed).
Resolve stage aliases ( e . g . when a stage is renamed ) .