.format(" with input ").format(prettyTaps(flow.getSources())).format("\n") .format(" and output ").format(prettyTaps(flow.getSinks())).format("\n");
@Override public void onStarting( Flow flow ) { Map<String, Tap> sources = flow.getSources(); for( Map.Entry<String, Tap> entry : sources.entrySet() ) { String key = entry.getKey(); Tap value = entry.getValue(); Set<Hfs> taps = Util.createIdentitySet(); accumulate( taps, value ); for( Hfs tap : taps ) { if( !testExists( flow, tap ) ) throw new FlowException( "cannot start flow: " + flow.getName() + ", _SUCCESS file missing in tap: '" + key + "', at: " + value.getIdentifier() ); } } }
@Override public void onStarting( Flow flow ) { Map<String, Tap> sources = flow.getSources(); for( Map.Entry<String, Tap> entry : sources.entrySet() ) { String key = entry.getKey(); Tap value = entry.getValue(); Set<Hfs> taps = Util.createIdentitySet(); accumulate( taps, value ); for( Hfs tap : taps ) { if( !testExists( flow, tap ) ) throw new FlowException( "cannot start flow: " + flow.getName() + ", _SUCCESS file missing in tap: '" + key + "', at: " + value.getIdentifier() ); } } }
private void initializeSchema( SQLPlanner sqlPlanner, Flow flowDef, TapSchema currentTapSchema ) { if( sqlPlanner.getDefaultSchema() != null ) currentTapSchema = createGetTapSchema( currentTapSchema, getDefaultSchema() ); SchemaDef currentSchemaDef = new SchemaDef(); if( sqlPlanner.getDefaultSchema() != null ) currentSchemaDef = createGetSchemaDef( currentSchemaDef, getDefaultSchema() ); addTaps( currentSchemaDef, currentTapSchema, flowDef.getSources(), new Function<Tap, Fields>() { @Override public Fields apply( Tap input ) { return input.getSourceFields(); } } ); addTaps( currentSchemaDef, currentTapSchema, flowDef.getSinks(), new Function<Tap, Fields>() { @Override public Fields apply( Tap input ) { return input.getSinkFields(); } } ); }