Package com.rpl.rama.ops
Class Ops
java.lang.Object
com.rpl.rama.ops.Ops
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.rpl.rama.impl.NativeAnyArityRamaOperation"and" operator based on values being "truthy" (not null or false).EmitsClassof argument.static final com.rpl.rama.impl.NativeRamaFunction2<Collection, Object, Boolean> Arguments are a collection and an object and returns boolean true or false if the object is contained in the collection.static final com.rpl.rama.impl.NativeRamaFunction0<Long> Returns ID of current microbatch attempt.static final com.rpl.rama.impl.NativeRamaFunction0<Integer> Emits task ID where event is runningstatic final com.rpl.rama.impl.NativeRamaFunction0<String> Returns the type of the current topology ("stream", "microbatch", or "query"), or else null.Emits one less than input value as anIntegerEmits one less than input value as aLongDivides first argument by second argument and emits aDoublestatic final com.rpl.rama.impl.NativeAnyArityRamaFunctionTests whether all arguments are equal and emits boolean true or false.Emits every element of input list as a separate field.static final com.rpl.rama.impl.NativeRamaOperation1<Object> Emits every element of input list individually.static final com.rpl.rama.impl.NativeRamaOperation1<Object> Emits every element of input list individually along with index of emit.static final com.rpl.rama.impl.NativeRamaOperation1<Object> Emits every key/value pair of input map individually.Extracts contents of a PState as a value.Emits first element of input collection ornullif it is empty.Arguments are a collection and a key and emits the value for the key in the collection.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits boolean true or false on if each argument is greater than the next argument.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits boolean true or false on if each argument is greater than or equal to the next argument.Emits input argumentEmits one more than input value as anIntegerEmits one more than input value as aLongEmits boolean true or false on whether input argument is an even numberArguments are aClassand object and emits boolean true or false on whether the second argument is an instance of the first argumentEmits boolean true or false on whether input argument is a negative numberEmits boolean true or false on whether input argument is notnullEmits boolean true or false on whether input argument isnullEmits boolean true or false on whether input argument is a numberEmits boolean true or false on whether input argument is an odd numberEmits boolean true or false on whether input argument is a positive numberEmits last element of input collection ornullif it is empty.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits boolean true or false on if each argument is less than the next argument.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits boolean true or false on if each argument is less than or equal to the next argument.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionLogs at debug level using slf4j Logger.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionLogs at error level using slf4j Logger.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionLogs at info level using slf4j Logger.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionLogs at trace level using slf4j Logger.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionLogs at warn level using slf4j Logger.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits maximum value of all input argumentsstatic final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits minimum value of all input argumentsstatic final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits result of subtracting all arguments after the first argument from the first argument as anInteger.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits result of subtracting all arguments after the first argument from the first argument as aLong.static final com.rpl.rama.impl.NativeRamaFunction0<ModuleInstanceInfo> EmitsModuleInstanceInfofor module and worker of running eventEmits first argument modulo the second argument as anIntegerEmits first argument modulo the second argument as aLong"not" operator based on whether input is "truthy" (not null or false).static final com.rpl.rama.impl.NativeAnyArityRamaFunctionTests whether any arguments are not equal and emits boolean true or false.static final com.rpl.rama.impl.NativeAnyArityRamaOperation"or" operator based on values being "truthy" (not null or false).static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits result of adding all input numbers together as anInteger.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits result of adding all input numbers together as aLong.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionPrints all input arguments to stdoutArguments are a starting integer (inclusive) and an end integer (exclusive) and emits each integer between than range individually Example:Block.each(Ops.RANGE, 10, 20).out("*i")static final com.rpl.rama.impl.NativeRamaFunction1<Collection, Integer> Emits size of input collection as anIntegerstatic final com.rpl.rama.impl.NativeRamaFunction1<Collection, Integer> Emits sum of all numbers in input list as anInteger.static final com.rpl.rama.impl.NativeRamaFunction1<Collection, Long> Emits sum of all numbers in input list as aLong.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits result of multiplying all input numbers together as anInteger.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits result of multiplying all input numbers together as aLong.static final com.rpl.rama.impl.NativeAnyArityRamaFunctionEmits result of converting all input arguments to strings and concatenating them togetherstatic final com.rpl.rama.impl.NativeAnyArityRamaFunctionCombines all input arguments into aListExample:Block.each(Ops.TUPLE, 1, 2, 3).out("*tuple") -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
AND
public static final com.rpl.rama.impl.NativeAnyArityRamaOperation AND"and" operator based on values being "truthy" (not null or false). Emits last truthy value or first non-truthy value. Short-circuits computation by not evaluatingExprarguments after a non-truthy value.
ANDwith zero arguments emits boolean true. -
CLASS
EmitsClassof argument.CLASSon null emits null. -
CONTAINS
Arguments are a collection and an object and returns boolean true or false if the object is contained in the collection.nullis considered an empty collection. -
CURRENT_MICROBATCH_ID
Returns ID of current microbatch attempt. Can only be called within a microbatch topology. This can be used to achieve fault-tolerant exactly-once update semantics when updating external systems with Rama's integration API.- See Also:
-
CURRENT_TOPOLOGY_TYPE
Returns the type of the current topology ("stream", "microbatch", or "query"), or else null. -
CURRENT_TASK_ID
Emits task ID where event is running- See Also:
-
DEC
Emits one less than input value as anInteger -
DEC_LONG
Emits one less than input value as aLong -
DIV
Divides first argument by second argument and emits aDouble -
EQUAL
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction EQUALTests whether all arguments are equal and emits boolean true or false. UsesObject.equals(Object). -
EXPAND
Emits every element of input list as a separate field. Useful for processing elements of fixed-size lists.
Example:Block.each(Ops.EXPAND, Arrays.asList(1, 2, 3)).out("*a", "*b", "*c") -
EXPLODE
Emits every element of input list individually. Number of emits is equal to size of input list. -
EXPLODE_INDEXED
Emits every element of input list individually along with index of emit. Number of emits is equal to size of input list.
Example:Block.each(Ops.EXPLODE_INDEXED, Arrays.asList(1, 2, 3)).out("*index", "*val") -
EXPLODE_MAP
Emits every key/value pair of input map individually. Key and value are emitted as separate fields. Number of emits is equal to size of input map.
Example:Block.each(Ops.EXPLODE_MAP, m).out("*key", "*val") -
FIRST
Emits first element of input collection ornullif it is empty.nullis considered an empty collection. -
GET
Arguments are a collection and a key and emits the value for the key in the collection. Collection can be a map or a list. For lists, the key is an index. Emitsnullfor non-existing keys.nullis considered an empty collection. -
GREATER_THAN
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction GREATER_THANEmits boolean true or false on if each argument is greater than the next argument. Emits boolean true with one argument. -
GREATER_THAN_OR_EQUAL
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction GREATER_THAN_OR_EQUALEmits boolean true or false on if each argument is greater than or equal to the next argument. Emits boolean true with one argument. -
IDENTITY
Emits input argument -
INC
Emits one more than input value as anInteger -
INC_LONG
Emits one more than input value as aLong -
IS_EVEN
Emits boolean true or false on whether input argument is an even number -
IS_INSTANCE_OF
Arguments are aClassand object and emits boolean true or false on whether the second argument is an instance of the first argument -
IS_NEGATIVE
Emits boolean true or false on whether input argument is a negative number -
IS_NOT_NULL
Emits boolean true or false on whether input argument is notnull -
IS_NULL
Emits boolean true or false on whether input argument isnull -
IS_NUMBER
Emits boolean true or false on whether input argument is a number -
IS_ODD
Emits boolean true or false on whether input argument is an odd number -
IS_POSITIVE
Emits boolean true or false on whether input argument is a positive number -
LAST
Emits last element of input collection ornullif it is empty.nullis considered an empty collection. -
LESS_THAN
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction LESS_THANEmits boolean true or false on if each argument is less than the next argument. Emits boolean true with one argument. -
LESS_THAN_OR_EQUAL
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction LESS_THAN_OR_EQUALEmits boolean true or false on if each argument is less than or equal to the next argument. Emits boolean true with one argument. -
LOG_DEBUG
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction LOG_DEBUGLogs at debug level using slf4j Logger. First argument is instance ofLoggerclass, and rest of arguments correspond to that interface. -
LOG_ERROR
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction LOG_ERRORLogs at error level using slf4j Logger. First argument is instance ofLoggerclass, and rest of arguments correspond to that interface. -
LOG_INFO
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction LOG_INFOLogs at info level using slf4j Logger. First argument is instance ofLoggerclass, and rest of arguments correspond to that interface. -
LOG_TRACE
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction LOG_TRACELogs at trace level using slf4j Logger. First argument is instance ofLoggerclass, and rest of arguments correspond to that interface. -
LOG_WARN
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction LOG_WARNLogs at warn level using slf4j Logger. First argument is instance ofLoggerclass, and rest of arguments correspond to that interface. -
MAX
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction MAXEmits maximum value of all input arguments -
MIN
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction MINEmits minimum value of all input arguments -
MINUS
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction MINUSEmits result of subtracting all arguments after the first argument from the first argument as anInteger. If called with only one argument, emits negative of that value. -
MINUS_LONG
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction MINUS_LONGEmits result of subtracting all arguments after the first argument from the first argument as aLong. If called with only one argument, emits negative of that value. -
MODULE_INSTANCE_INFO
EmitsModuleInstanceInfofor module and worker of running event -
MODULO
Emits first argument modulo the second argument as anInteger -
MODULO_LONG
Emits first argument modulo the second argument as aLong -
NOT
"not" operator based on whether input is "truthy" (not null or false). Emits boolean false for truthy input and boolean true for non-truthy input. -
NOT_EQUAL
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction NOT_EQUALTests whether any arguments are not equal and emits boolean true or false. UsesObject.equals(Object). -
OR
public static final com.rpl.rama.impl.NativeAnyArityRamaOperation OR"or" operator based on values being "truthy" (not null or false). Emits first truthy value or last non-truthy value. Short-circuits computation by not evaluatingExprarguments after a truthy value.
ORwith zero arguments emitsnull -
PLUS
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction PLUSEmits result of adding all input numbers together as anInteger. If no arguments, emits zero. -
PLUS_LONG
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction PLUS_LONGEmits result of adding all input numbers together as aLong. If no arguments, emits zero. -
PRINTLN
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction PRINTLNPrints all input arguments to stdout -
RANGE
Arguments are a starting integer (inclusive) and an end integer (exclusive) and emits each integer between than range individually Example:Block.each(Ops.RANGE, 10, 20).out("*i") -
SIZE
Emits size of input collection as anInteger -
SUM
Emits sum of all numbers in input list as anInteger. Emits zero for empty list. -
SUM_LONG
Emits sum of all numbers in input list as aLong. Emits zero for empty list. -
TIMES
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction TIMESEmits result of multiplying all input numbers together as anInteger. If no arguments, emits one. -
TIMES_LONG
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction TIMES_LONGEmits result of multiplying all input numbers together as aLong. If no arguments, emits one. -
TO_STRING
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction TO_STRINGEmits result of converting all input arguments to strings and concatenating them together -
TUPLE
public static final com.rpl.rama.impl.NativeAnyArityRamaFunction TUPLECombines all input arguments into aListExample:Block.each(Ops.TUPLE, 1, 2, 3).out("*tuple") -
EXTRACT_VALUE
Extracts contents of a PState as a value. Should only be called on PStates with a top-levelClassschema.- See Also:
-
-
Constructor Details
-
Ops
public Ops()
-