Class CreateTriggerByAreaRequest
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordGPUdb.createTriggerByArea.
Sets up an area trigger mechanism for two column_names for one or more tables. (This function is essentially the two-dimensional version of GPUdb.createTriggerByRange.) Once the trigger has been activated, any record added to the listed tables(s) via GPUdb.insertRecords with the chosen columns’ values falling within the specified region 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 CreateTriggerByAreaRequest object with default parameters.CreateTriggerByAreaRequest(String requestId, List<String> tableNames, String xColumnName, List<Double> xVector, String yColumnName, List<Double> yVector, Map<String, String> options) Constructs a CreateTriggerByAreaRequest 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.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.Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.Name of a numeric column on which the trigger is activated.The respective coordinate values for the region on which the trigger is activated.Name of a second numeric column on which the trigger is activated.The respective coordinate values for the region on which the trigger is activated.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setOptions(Map<String, String> options) Optional parameters.setRequestId(String requestId) User-created ID for the trigger.setTableNames(List<String> tableNames) Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.setXColumnName(String xColumnName) Name of a numeric column on which the trigger is activated.setXVector(List<Double> xVector) The respective coordinate values for the region on which the trigger is activated.setYColumnName(String yColumnName) Name of a second numeric column on which the trigger is activated.setYVector(List<Double> yVector) The respective coordinate values for the region on which the trigger is activated.toString()
Constructor Details
CreateTriggerByAreaRequest
public CreateTriggerByAreaRequest()Constructs a CreateTriggerByAreaRequest object with default parameters.CreateTriggerByAreaRequest
public CreateTriggerByAreaRequest(String requestId, List<String> tableNames, String xColumnName, List<Double> xVector, String yColumnName, List<Double> yVector, Map<String, String> options) Constructs a CreateTriggerByAreaRequest 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- Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.xColumnName- Name of a numeric column on which the trigger is activated. Usually ‘x’ for geospatial data points.xVector- The respective coordinate values for the region on which the trigger is activated. This usually translates to the x-coordinates of a geospatial region.yColumnName- Name of a second numeric column on which the trigger is activated. Usually ‘y’ for geospatial data points.yVector- The respective coordinate values for the region on which the trigger is activated. This usually translates to the y-coordinates of a geospatial region. Must be the same length as xvals.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
Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.Returns:The current value oftableNames.setTableNames
Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.Parameters:tableNames- The new value fortableNames.Returns:thisto mimic the builder pattern.setXColumnName
Name of a numeric column on which the trigger is activated. Usually ‘x’ for geospatial data points.Parameters:xColumnName- The new value forxColumnName.Returns:thisto mimic the builder pattern.setXVector
The respective coordinate values for the region on which the trigger is activated. This usually translates to the x-coordinates of a geospatial region.Parameters:xVector- The new value forxVector.Returns:thisto mimic the builder pattern.setYColumnName
Name of a second numeric column on which the trigger is activated. Usually ‘y’ for geospatial data points.Parameters:yColumnName- The new value foryColumnName.Returns:thisto mimic the builder pattern.setYVector
The respective coordinate values for the region on which the trigger is activated. This usually translates to the y-coordinates of a geospatial region. Must be the same length as xvals.Parameters:yVector- The new value foryVector.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: