/** * Constructor OperatorException creates a new OperatorException instance. * * @param pipe of type Pipe * @param string of type String */ public OperatorException( Pipe pipe, String string ) { super( TraceUtil.formatTrace( pipe, string ) ); }
/** * Constructor PlannerException creates a new PlannerException instance. * * @param flowElement of type FlowElement * @param message of type String * @param throwable of type Throwable */ public PlannerException( FlowElement flowElement, String message, Throwable throwable ) { super( TraceUtil.formatTrace( flowElement, message ), throwable ); }
public ElementGraphException( Tap tap, String message ) { this( (FlowElement) tap, TraceUtil.formatTrace( tap, message ) ); }
public static String formatTrace( final Pipe pipe, String message ) { return formatTrace( pipe, message, new TraceFormatter() { @Override public String format( String trace ) { return "[" + Util.truncate( pipe.getName(), 25 ) + "][" + trace + "]"; } } ); }
public static String formatTrace( final Tap tap, String message ) { return formatTrace( tap, message, new TraceFormatter() { @Override public String format( String trace ) { return "[" + Util.truncate( tap.toString(), 25 ) + "][" + trace + "]"; } } ); }
/** * Constructor PlannerException creates a new PlannerException instance. * * @param flowElement of type FlowElement * @param message of type String */ public PlannerException( FlowElement flowElement, String message ) { super( TraceUtil.formatTrace( flowElement, message ) ); }
public static String formatTrace( final Scheme scheme, String message ) { return formatTrace( scheme, message, new TraceFormatter() { @Override public String format( String trace ) { return "[" + Util.truncate( scheme.toString(), 25 ) + "][" + trace + "]"; } } ); }
/** * Constructor OperatorException creates a new OperatorException instance. * * @param pipe of type Pipe * @param string of type String * @param throwable of type Throwable */ public OperatorException( Pipe pipe, String string, Throwable throwable ) { super( TraceUtil.formatTrace( pipe, string ), throwable ); }
/** * Constructor PlannerException creates a new PlannerException instance. * * @param flowElement of type FlowElement * @param message of type String * @param throwable of type Throwable * @param elementGraph of type ElementGraph */ public PlannerException( FlowElement flowElement, String message, Throwable throwable, ElementGraph elementGraph ) { super( TraceUtil.formatTrace( flowElement, message ), throwable ); this.elementGraph = elementGraph; }
public ElementGraphException( Pipe pipe, String message ) { this( (FlowElement) pipe, TraceUtil.formatTrace( pipe, message ) ); }
/** * Method formatRawTrace does not include the pipe name * * @param pipe of type Pipe * @param message of type String * @return String */ public static String formatRawTrace( Pipe pipe, String message ) { return formatTrace( pipe, message, new TraceFormatter() { @Override public String format( String trace ) { return "[" + trace + "]"; } } ); }
public static String formatTrace( FlowElement flowElement, String message ) { if( flowElement == null ) return message; if( flowElement instanceof Pipe ) return formatTrace( (Pipe) flowElement, message ); if( flowElement instanceof Tap ) return formatTrace( (Tap) flowElement, message ); throw new UnsupportedOperationException( "cannot format type: " + flowElement.getClass().getName() ); }
public static String formatTraces( Collection<FlowElement> flowElements, String delim ) { List<String> messages = new ArrayList<>( flowElements.size() ); for( FlowElement flowElement : flowElements ) messages.add( formatTrace( (Traceable) flowElement, flowElement.toString(), new TraceFormatter() { @Override public String format( String trace ) { return "[" + trace + "] ->"; } } ) ); return Util.join( messages, delim ); }
private static String createMessage( Pipe pipe, Kind kind, Fields incomingFields, Fields argumentSelector ) { String message = "unable to resolve " + kind + " selector: " + argumentSelector.printVerbose() + ", with incoming: " + incomingFields.printVerbose(); return TraceUtil.formatTrace( pipe, message ); }
protected void fail() { throwFail( TraceUtil.formatTrace( this, getMessage() ) ); }
protected void fail( Object... args ) { throwFail( TraceUtil.formatTrace( this, getMessage() ), args ); }
private static String createMessage( Pipe pipe, Fields incomingFields, Fields declaredFields, Fields outputSelector ) { String message = "unable to resolve output selector: " + outputSelector.printVerbose() + ", with incoming: " + incomingFields.printVerbose() + " and declared: " + declaredFields.printVerbose(); return TraceUtil.formatTrace( pipe, message ); }
private static String createMessage( Tap tap, Fields incomingFields, Fields selectorFields ) { String message = "unable to resolve scheme sink selector: " + selectorFields.printVerbose() + ", with incoming: " + incomingFields.printVerbose(); return TraceUtil.formatTrace( tap.getScheme(), message ); } }