Esempio n. 1
0
  protected GenericDataSourceBase<OUT, ?> translateToDataFlow() {
    String name =
        this.name != null
            ? this.name
            : "at " + dataSourceLocationName + " (" + inputFormat.getClass().getName() + ")";
    if (name.length() > 150) {
      name = name.substring(0, 150);
    }

    @SuppressWarnings({"unchecked", "rawtypes"})
    GenericDataSourceBase<OUT, ?> source =
        new GenericDataSourceBase(this.inputFormat, new OperatorInformation<OUT>(getType()), name);
    source.setParallelism(parallelism);
    if (this.parameters != null) {
      source.getParameters().addAll(this.parameters);
    }
    if (this.splitDataProperties != null) {
      source.setSplitDataProperties(this.splitDataProperties);
    }
    return source;
  }