Class CreateTriggerByRangeRequest
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordGPUdb.createTriggerByRange.
Sets up a simple range trigger for a column_name for one or more tables. Once the trigger has been activated, any record added to the listed tables(s) via GPUdb.insertRecords with the chosen column_name’s value falling within the specified range will trip the trigger. All such records will be queued at the trigger port (by default ‘9001’ but able to be retrieved via GPUdb.showSystemStatus) for any listening client to collect. Active triggers can be cancelled by using the GPUdb.clearTrigger endpoint or by clearing all relevant tables.
The output returns the trigger handle as well as indicating success or failure of the trigger activation.
Constructor Summary
ConstructorsConstructorDescriptionConstructs a CreateTriggerByRangeRequest object with default parameters.CreateTriggerByRangeRequest(String requestId, List<String> tableNames, String columnName, double min, double max, Map<String, String> options) Constructs a CreateTriggerByRangeRequest object with the specified parameters.Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Name of a numeric column_name on which the trigger is activated.doublegetMax()The upper bound (inclusive) for the trigger range.doublegetMin()The lower bound (inclusive) for the trigger range.Optional parameters.User-created ID for the trigger.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setColumnName(String columnName) Name of a numeric column_name on which the trigger is activated.setMax(double max) The upper bound (inclusive) for the trigger range.setMin(double min) The lower bound (inclusive) for the trigger range.setOptions(Map<String, String> options) Optional parameters.setRequestId(String requestId) User-created ID for the trigger.setTableNames(List<String> tableNames) Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.toString()
Constructor Details
CreateTriggerByRangeRequest
public CreateTriggerByRangeRequest()Constructs a CreateTriggerByRangeRequest object with default parameters.CreateTriggerByRangeRequest
public CreateTriggerByRangeRequest(String requestId, List<String> tableNames, String columnName, double min, double max, Map<String, String> options) Constructs a CreateTriggerByRangeRequest object with the specified parameters.Parameters:requestId- User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.tableNames- Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.columnName- Name of a numeric column_name on which the trigger is activated.min- The lower bound (inclusive) for the trigger range.max- The upper bound (inclusive) for the trigger range.options- Optional parameters. The default value is an emptyMap.
Method Details
getClassSchema
public static org.apache.avro.Schema getClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.Returns:The schema for the class.setRequestId
User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.Parameters:requestId- The new value forrequestId.Returns:thisto mimic the builder pattern.getTableNames
Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.Returns:The current value oftableNames.setTableNames
Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.Parameters:tableNames- The new value fortableNames.Returns:thisto mimic the builder pattern.setColumnName
Name of a numeric column_name on which the trigger is activated.Parameters:columnName- The new value forcolumnName.Returns:thisto mimic the builder pattern.getMin
public double getMin()The lower bound (inclusive) for the trigger range.Returns:The current value ofmin.setMin
The lower bound (inclusive) for the trigger range.Parameters:min- The new value formin.Returns:thisto mimic the builder pattern.getMax
public double getMax()The upper bound (inclusive) for the trigger range.Returns:The current value ofmax.setMax
The upper bound (inclusive) for the trigger range.Parameters:max- The new value formax.Returns:thisto mimic the builder pattern.getSchema
public org.apache.avro.Schema getSchema()This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getSchemain interfaceorg.apache.avro.generic.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: