/** * A shaded jar will have multiple version.properties, e.g. * <pre> * file:/mnt/var/lib/hadoop/tmp/hadoop-unjar7817209360894770970/cascading/version.properties * jar:file:/mnt/single-load/./load-hadoop2-tez-20150729.jar!/cascading/version.properties * </pre> * <p> * only warn if there are duplicates within a protocol, not across since we should only be seeing file: and jar: */ private static void warnOnDuplicate( List<URL> resources ) { if( resources.size() == 1 ) return; SetMultiMap<String, String> map = new SetMultiMap<>(); for( URL resource : resources ) map.put( resource.getProtocol(), resource.toString() ); for( String key : map.getKeys() ) { Set<String> values = map.getValues( key ); if( values.size() > 1 ) LOG.warn( "found multiple 'cascading/version.properties' files on the CLASSPATH. Please check your dependencies: {}, using first returned", Util.join( values, "," ) ); } } }
protected void buildGraph() inputMultiMap = new SetMultiMap<>(); inputConfigMap.put( entry.getValue(), inputConfiguration ); inputMultiMap.addAll( getEdgeSourceID( entry.getValue(), inputConfiguration ), entry.getValue() ); outputMultiMap = new SetMultiMap<>(); outputConfigMap.put( entry.getValue(), outputConfiguration ); outputMultiMap.addAll( TezUtil.getEdgeSinkID( entry.getValue(), outputConfiguration ), entry.getValue() ); if( inputMultiMap.getKeys().size() == 1 ) streamedSource = Flows.getFlowElementForID( node.getSourceElements(), Util.getFirst( inputMultiMap.getKeys() ) );
private Collection<LogicalOutput> findLogicalOutputs( Pipe element ) { String id = Pipe.id( element ); return outputMultiMap.getValues( id ); }
protected void buildGraph() inputMultiMap = new SetMultiMap<>(); inputConfigMap.put( entry.getValue(), inputConfiguration ); inputMultiMap.addAll( getEdgeSourceID( entry.getValue(), inputConfiguration ), entry.getValue() ); outputMultiMap = new SetMultiMap<>(); outputConfigMap.put( entry.getValue(), outputConfiguration ); outputMultiMap.addAll( TezUtil.getEdgeSinkID( entry.getValue(), outputConfiguration ), entry.getValue() ); if( inputMultiMap.getKeys().size() == 1 ) streamedSource = Flows.getFlowElementForID( node.getSourceElements(), Util.getFirst( inputMultiMap.getKeys() ) );
private Collection<LogicalOutput> findLogicalOutputs( Pipe element ) { String id = Pipe.id( element ); return outputMultiMap.getValues( id ); }