cfg.set(TupleSerializationProps.SERIALIZATION_TOKENS, Util.join(",", Util.removeNulls(tokens, id + "=" + lmw))); LogFactory.getLog(EsTap.class).trace(String.format("Registered Cascading serialization token %s for %s", id, lmw)); return;
/** * This method joins the values in the given list with the delim String value. * * @param list * @param delim * @return String */ public static String join( int[] list, String delim ) { return join( list, delim, false ); }
public static boolean hasAllVersionInfo() { return !Util.isEmpty( getReleaseBuild() ) && hasMajorMinorVersionInfo(); }
public static boolean hasMajorMinorVersionInfo() { return !Util.isEmpty( getReleaseMinor() ) && !Util.isEmpty( getReleaseMajor() ); }
public Set<FlowElement> getExcludedElements() { if( excludedElements == null ) excludedElements = createIdentitySet(); return excludedElements; }
public static Object invokeInstanceMethodSafe( Object target, String methodName, Object[] parameters, Class[] parameterTypes ) { try { return invokeInstanceMethod( target, methodName, parameters, parameterTypes ); } catch( Exception exception ) { return null; } }
/** * 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 static String[] simpleTypeNames( Type[] types ) { String[] names = new String[ types.length ]; for( int i = 0; i < types.length; i++ ) names[ i ] = getSimpleTypeName( types[ i ] ); return names; }
public static <R> R returnInstanceFieldIfExistsSafe( Object target, String fieldName ) { try { return returnInstanceFieldIfExists( target, fieldName ); } catch( Exception exception ) { // do nothing return null; } }
@Override public boolean hasAnnotations() { return annotations != null && !annotations.isEmpty(); }
/** * Allows for custom trace fields on Pipe, Tap, and Scheme types * * @param object * @param trace */ public static void setTrace( Object object, String trace ) { Util.setInstanceFieldIfExists( object, "trace", trace ); }
protected Map<K, C> getMap() { if( map == null ) map = createMap(); return map; }
/** * This method joins each valuein the collection with the given delimiter. * * @param collection * @param delim * @return a String */ public static String join( Collection collection, String delim ) { return join( collection, delim, false ); }
public Set<FlowElement> getMatchedElements() { if( foundElements == null ) foundElements = createIdentitySet(); return foundElements; }
/** * Method getFrameworks returns a list of frameworks used to build this App. * * @return Registered frameworks */ public String getFrameworks() { return join( frameworks, "," ); }
@Override protected Set<V> createCollection() { return Util.createIdentitySet(); } }
@Override public String toString() { return Util.join( elements, printDelim, true ); }