org.apache.flink.api.java.functions.FunctionAnnotation.NonForwardedFields Java Examples
The following examples show how to use
org.apache.flink.api.java.functions.FunctionAnnotation.NonForwardedFields.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SemanticPropUtil.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public static SingleInputSemanticProperties getSemanticPropsSingle( Set<Annotation> set, TypeInformation<?> inType, TypeInformation<?> outType) { if (set == null) { return null; } Iterator<Annotation> it = set.iterator(); String[] forwarded = null; String[] nonForwarded = null; String[] read = null; while (it.hasNext()) { Annotation ann = it.next(); if (ann instanceof ForwardedFields) { forwarded = ((ForwardedFields) ann).value(); } else if (ann instanceof NonForwardedFields) { nonForwarded = ((NonForwardedFields) ann).value(); } else if (ann instanceof ReadFields) { read = ((ReadFields) ann).value(); } else if (ann instanceof ForwardedFieldsFirst || ann instanceof ForwardedFieldsSecond || ann instanceof NonForwardedFieldsFirst || ann instanceof NonForwardedFieldsSecond || ann instanceof ReadFieldsFirst || ann instanceof ReadFieldsSecond) { throw new InvalidSemanticAnnotationException("Annotation " + ann.getClass() + " invalid for single input function."); } } if (forwarded != null || nonForwarded != null || read != null) { SingleInputSemanticProperties result = new SingleInputSemanticProperties(); getSemanticPropsSingleFromString(result, forwarded, nonForwarded, read, inType, outType); return result; } return null; }
Example #2
Source File: SemanticPropUtil.java From flink with Apache License 2.0 | 5 votes |
public static SingleInputSemanticProperties getSemanticPropsSingle( Set<Annotation> set, TypeInformation<?> inType, TypeInformation<?> outType) { if (set == null) { return null; } Iterator<Annotation> it = set.iterator(); String[] forwarded = null; String[] nonForwarded = null; String[] read = null; while (it.hasNext()) { Annotation ann = it.next(); if (ann instanceof ForwardedFields) { forwarded = ((ForwardedFields) ann).value(); } else if (ann instanceof NonForwardedFields) { nonForwarded = ((NonForwardedFields) ann).value(); } else if (ann instanceof ReadFields) { read = ((ReadFields) ann).value(); } else if (ann instanceof ForwardedFieldsFirst || ann instanceof ForwardedFieldsSecond || ann instanceof NonForwardedFieldsFirst || ann instanceof NonForwardedFieldsSecond || ann instanceof ReadFieldsFirst || ann instanceof ReadFieldsSecond) { throw new InvalidSemanticAnnotationException("Annotation " + ann.getClass() + " invalid for single input function."); } } if (forwarded != null || nonForwarded != null || read != null) { SingleInputSemanticProperties result = new SingleInputSemanticProperties(); getSemanticPropsSingleFromString(result, forwarded, nonForwarded, read, inType, outType); return result; } return null; }
Example #3
Source File: SemanticPropUtil.java From flink with Apache License 2.0 | 5 votes |
public static SingleInputSemanticProperties getSemanticPropsSingle( Set<Annotation> set, TypeInformation<?> inType, TypeInformation<?> outType) { if (set == null) { return null; } Iterator<Annotation> it = set.iterator(); String[] forwarded = null; String[] nonForwarded = null; String[] read = null; while (it.hasNext()) { Annotation ann = it.next(); if (ann instanceof ForwardedFields) { forwarded = ((ForwardedFields) ann).value(); } else if (ann instanceof NonForwardedFields) { nonForwarded = ((NonForwardedFields) ann).value(); } else if (ann instanceof ReadFields) { read = ((ReadFields) ann).value(); } else if (ann instanceof ForwardedFieldsFirst || ann instanceof ForwardedFieldsSecond || ann instanceof NonForwardedFieldsFirst || ann instanceof NonForwardedFieldsSecond || ann instanceof ReadFieldsFirst || ann instanceof ReadFieldsSecond) { throw new InvalidSemanticAnnotationException("Annotation " + ann.getClass() + " invalid for single input function."); } } if (forwarded != null || nonForwarded != null || read != null) { SingleInputSemanticProperties result = new SingleInputSemanticProperties(); getSemanticPropsSingleFromString(result, forwarded, nonForwarded, read, inType, outType); return result; } return null; }
Example #4
Source File: SemanticPropUtil.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
public static DualInputSemanticProperties getSemanticPropsDual( Set<Annotation> set, TypeInformation<?> inType1, TypeInformation<?> inType2, TypeInformation<?> outType) { if (set == null) { return null; } Iterator<Annotation> it = set.iterator(); String[] forwardedFirst = null; String[] forwardedSecond = null; String[] nonForwardedFirst = null; String[] nonForwardedSecond = null; String[] readFirst = null; String[] readSecond = null; while (it.hasNext()) { Annotation ann = it.next(); if (ann instanceof ForwardedFieldsFirst) { forwardedFirst = ((ForwardedFieldsFirst) ann).value(); } else if (ann instanceof ForwardedFieldsSecond) { forwardedSecond = ((ForwardedFieldsSecond) ann).value(); } else if (ann instanceof NonForwardedFieldsFirst) { nonForwardedFirst = ((NonForwardedFieldsFirst) ann).value(); } else if (ann instanceof NonForwardedFieldsSecond) { nonForwardedSecond = ((NonForwardedFieldsSecond) ann).value(); } else if (ann instanceof ReadFieldsFirst) { readFirst = ((ReadFieldsFirst) ann).value(); } else if (ann instanceof ReadFieldsSecond) { readSecond = ((ReadFieldsSecond) ann).value(); } else if (ann instanceof ForwardedFields || ann instanceof NonForwardedFields || ann instanceof ReadFields) { throw new InvalidSemanticAnnotationException("Annotation " + ann.getClass() + " invalid for dual input function."); } } if (forwardedFirst != null || nonForwardedFirst != null || readFirst != null || forwardedSecond != null || nonForwardedSecond != null || readSecond != null) { DualInputSemanticProperties result = new DualInputSemanticProperties(); getSemanticPropsDualFromString(result, forwardedFirst, forwardedSecond, nonForwardedFirst, nonForwardedSecond, readFirst, readSecond, inType1, inType2, outType); return result; } return null; }
Example #5
Source File: SemanticPropUtil.java From flink with Apache License 2.0 | 4 votes |
public static DualInputSemanticProperties getSemanticPropsDual( Set<Annotation> set, TypeInformation<?> inType1, TypeInformation<?> inType2, TypeInformation<?> outType) { if (set == null) { return null; } Iterator<Annotation> it = set.iterator(); String[] forwardedFirst = null; String[] forwardedSecond = null; String[] nonForwardedFirst = null; String[] nonForwardedSecond = null; String[] readFirst = null; String[] readSecond = null; while (it.hasNext()) { Annotation ann = it.next(); if (ann instanceof ForwardedFieldsFirst) { forwardedFirst = ((ForwardedFieldsFirst) ann).value(); } else if (ann instanceof ForwardedFieldsSecond) { forwardedSecond = ((ForwardedFieldsSecond) ann).value(); } else if (ann instanceof NonForwardedFieldsFirst) { nonForwardedFirst = ((NonForwardedFieldsFirst) ann).value(); } else if (ann instanceof NonForwardedFieldsSecond) { nonForwardedSecond = ((NonForwardedFieldsSecond) ann).value(); } else if (ann instanceof ReadFieldsFirst) { readFirst = ((ReadFieldsFirst) ann).value(); } else if (ann instanceof ReadFieldsSecond) { readSecond = ((ReadFieldsSecond) ann).value(); } else if (ann instanceof ForwardedFields || ann instanceof NonForwardedFields || ann instanceof ReadFields) { throw new InvalidSemanticAnnotationException("Annotation " + ann.getClass() + " invalid for dual input function."); } } if (forwardedFirst != null || nonForwardedFirst != null || readFirst != null || forwardedSecond != null || nonForwardedSecond != null || readSecond != null) { DualInputSemanticProperties result = new DualInputSemanticProperties(); getSemanticPropsDualFromString(result, forwardedFirst, forwardedSecond, nonForwardedFirst, nonForwardedSecond, readFirst, readSecond, inType1, inType2, outType); return result; } return null; }
Example #6
Source File: SemanticPropUtil.java From flink with Apache License 2.0 | 4 votes |
public static DualInputSemanticProperties getSemanticPropsDual( Set<Annotation> set, TypeInformation<?> inType1, TypeInformation<?> inType2, TypeInformation<?> outType) { if (set == null) { return null; } Iterator<Annotation> it = set.iterator(); String[] forwardedFirst = null; String[] forwardedSecond = null; String[] nonForwardedFirst = null; String[] nonForwardedSecond = null; String[] readFirst = null; String[] readSecond = null; while (it.hasNext()) { Annotation ann = it.next(); if (ann instanceof ForwardedFieldsFirst) { forwardedFirst = ((ForwardedFieldsFirst) ann).value(); } else if (ann instanceof ForwardedFieldsSecond) { forwardedSecond = ((ForwardedFieldsSecond) ann).value(); } else if (ann instanceof NonForwardedFieldsFirst) { nonForwardedFirst = ((NonForwardedFieldsFirst) ann).value(); } else if (ann instanceof NonForwardedFieldsSecond) { nonForwardedSecond = ((NonForwardedFieldsSecond) ann).value(); } else if (ann instanceof ReadFieldsFirst) { readFirst = ((ReadFieldsFirst) ann).value(); } else if (ann instanceof ReadFieldsSecond) { readSecond = ((ReadFieldsSecond) ann).value(); } else if (ann instanceof ForwardedFields || ann instanceof NonForwardedFields || ann instanceof ReadFields) { throw new InvalidSemanticAnnotationException("Annotation " + ann.getClass() + " invalid for dual input function."); } } if (forwardedFirst != null || nonForwardedFirst != null || readFirst != null || forwardedSecond != null || nonForwardedSecond != null || readSecond != null) { DualInputSemanticProperties result = new DualInputSemanticProperties(); getSemanticPropsDualFromString(result, forwardedFirst, forwardedSecond, nonForwardedFirst, nonForwardedSecond, readFirst, readSecond, inType1, inType2, outType); return result; } return null; }