public static <T> List<T> split( Class<T> type, String values ) { return split( type, ",", values ); }
public List<Integer> getOrdinals() { if( ordinals == null ) ordinals = Util.split( Integer.class, ",", getConf().get( "cascading.node.ordinals" ) ); return ordinals; }
public List<Integer> getOrdinals() { if( ordinals == null ) ordinals = Util.split( Integer.class, ",", getConf().get( "cascading.node.ordinals" ) ); return ordinals; }
/** * Maps each input to an ordinal on the flowelement. an input may be bound to multiple ordinals. * * @param element */ private SortedListMultiMap<Integer, LogicalInput> createInputMap( FlowElement element ) { String id = FlowElements.id( element ); SortedListMultiMap<Integer, LogicalInput> ordinalMap = new SortedListMultiMap<>(); for( LogicalInput logicalInput : inputMap.values() ) { Configuration configuration = inputConfigMap.get( logicalInput ); String foundID = configuration.get( "cascading.node.source" ); if( Util.isEmpty( foundID ) ) throw new IllegalStateException( "cascading.node.source property not set on source LogicalInput" ); if( !foundID.equals( id ) ) continue; String values = configuration.get( "cascading.node.ordinals", "" ); List<Integer> ordinals = Util.split( Integer.class, ",", values ); for( Integer ordinal : ordinals ) ordinalMap.put( ordinal, logicalInput ); } return ordinalMap; }
/** * Maps each input to an ordinal on the flowelement. an input may be bound to multiple ordinals. * * @param element */ private SortedListMultiMap<Integer, LogicalInput> createInputMap( FlowElement element ) { String id = FlowElements.id( element ); SortedListMultiMap<Integer, LogicalInput> ordinalMap = new SortedListMultiMap<>(); for( LogicalInput logicalInput : inputMap.values() ) { Configuration configuration = inputConfigMap.get( logicalInput ); String foundID = configuration.get( "cascading.node.source" ); if( Util.isEmpty( foundID ) ) throw new IllegalStateException( "cascading.node.source property not set on source LogicalInput" ); if( !foundID.equals( id ) ) continue; String values = configuration.get( "cascading.node.ordinals", "" ); List<Integer> ordinals = Util.split( Integer.class, ",", values ); for( Integer ordinal : ordinals ) ordinalMap.put( ordinal, logicalInput ); } return ordinalMap; }