Adapter for Apache Cassandra 10.2 | webMethods Adapter for Apache Cassandra Documentation | webMethods Adapter for Apache Cassandra Installation and User’s Documentation | Adapter Services | Configuring Query Service
 
Configuring Query Service
A Query service retrieves the record from the Cassandra table. You configure Query service using Designer. For more information about adapter services, see Using Adapter Services.
Read the section Before Managing Adapter Services, before you configure adapter services.
*To configure an adapter service using the Query template
1. In Designer, right-click the folder in which the service is to be contained and select New > Adapter Service.
2. Select the parent namespace, type a name for the adapter service, and click Next.
3. Select webMethods Adapter for Apache Cassandra as the adapter type and click Next.
4. Select the appropriate Adapter Connection Name and click Next.
5. From the list of available templates, select the Query template and click Finish.
The adapter service editor for the selected adapter service appears. You can select the Adapter Settings tab at any time to confirm Adapter Properties such as the Adapter Name, Adapter Connection Name, and Adapter Service Template as necessary.
6. Select the Table tab to configure the table and set the fields as follows:
Field
Field Description/Action
Keyspace Name
Specifies the keyspace which is auto-populated based on the created connection.
Table Name
Specify the name of the table.
7. Use the Columns tab to provide values for the following fields:
a. Use the icon to populate a single column in the table. You can use the icon to display all columns created in an existing table.
Field
Description/Action
Column Name
The column name in the table.
Column Type
The column data type defined in the corresponding Column Name of the table.
Type Definition
Specifies the string representation of Column Type.
Output Field
The output field name.
Output Field Type
The Java type that corresponds to the output field.
8. Use the Options tab to provide the appropriate values for the following fields:
Field
Description/Action
Fetch Size
Limits the number of records for a table, if the records exceeds by the given size. The default value is -1.
Allow Filtering
Provides the capability to query the clustering columns using any condition.
Consistency Level
Defines to manage availability versus data accuracy. You can configure consistency for a session or per individual read or write operation.
The write consistency levels in strongest-to-weakest order is given as follows:
*ALL: Provides the highest consistency and the lowest availability of any other level.
*EACH QUORIUM: Maintains a strict consistency level at the same level, when used in multiple datacenter clusters.
*QUORIUM: Maintains a strong consistency across the cluster, when used in either single or multiple datacenter clusters. Use QUORIUM, if you can tolerate some level of failure.
*LOCAL QUORIUM: Maintains consistency locally. LOCAL QUORIUM is used in multiple datacenter clusters with a rack-aware replica placement strategy, such as (NetworkTopologyStatergy), and a properly configured snitch. Can be used with SimpleStrategy.
*LOCAL ONE: In a multiple datacenter clusters, the consistency level cross-DC traffic is not desirable when compared to the consistency level of ONE. LOCAL ONE accomplishes this. Use this consistency level in an offline datacenter to prevent automatic connection to online nodes in other datacenters if an offline node goes down.
*THREE: Satisfies the needs of most users because consistency requirements are not stringent.
*ANY: Provides low latency and a guarantee that a write never fails. Delivers the lowest consistency and highest availability.
The read consistency levels in strongest-to-weakest order is given as follows:
*ALL: Provides the highest consistency of all levels and the lowest availability of all levels.
*QUORIUM: Maintains strong consistency across the cluster, when used in single or multiple datacenter clusters. Ensures strong consistency if you can tolerate some level of failure.
*LOCAL QUORIUM: Used in multiple datacenter clusters with a rack-aware replica placement strategy ( NetworkTopologyStrategy) and a properly configured snitch. Fails when used with SimpleStrategy.
*THREE: Provides the highest availability of all the levels if you can tolerate a comparatively high probability of stale data being read. The replicas contacted for reads may not always have the most recent write.
*LOCAL ONE: In a multiple datacenter clusters, the consistency level cross-DC traffic is not desirable when compared to the consistency level of ONE. LOCAL ONE accomplishes this. Use this consistency level in an offline datacenter to prevent automatic connection to online nodes in other datacenters if an offline node goes down.
*SERIAL: Use SERIAL to read the latest value of a column after a user has invoked a lightweight transaction to write to the column. Cassandra then checks the inflight lightweight transaction for updates and, if found, returns the latest data.
*LOCAL SERIAL: Used to achieve linearizable consistency for lightweight transactions.
Limit
Limits the number of records to be retrieved by providing a definite value.
Read Timeout in Millis
Specify the read time out value in milli seconds. This value is the amount of time Adapter for Apache Cassandra waits for the response from the Cassandra node to execute before stopping the Query service.
Enabling Tracing
Define to enable and disable the tracing for transactions on all nodes in the cluster. Tracing is enabled to troubleshoot performance problems.
9. Use the WHERE tab to specify the valid conditions for selecting information:
a. Select the icon to define the new WHERE clause fields.
b. Select the AND logical operator and specify the following fields:
Name
Name Description/Action
AND
The logical operator.
Column
The name of the column you want to use in the WHERE clause.
Operator
The following are the operators used:
*=
*<
*>
*<=
*>=
*IN
*CONTAINS
*CONTAINS KEY
Input Field
The default value is ?, which acts as a placeholder for the variable so that you can set the input variable for that column at run time, or get input external to this adapter service. You can also type a fixed value in this field now or at run time. If you type a fixed value, be sure that it is valid, or an exception will be generated at run time.
The adapter automatically generates values for the following fields:
Field
Description/Action
Parameter
The unique key for those rows in the above table which takes input at runtime.
Column
The name of the column you need to use in the WHERE clause.
CQL Type
The CQL data type defined in the corresponding Column Name of the table.
Input Field Type
The corresponding data type of the Input Field.
Input Field
The name of the input field. By default the name combines the values of Parameter and Column fields. However, you can also choose to specify any custom value.
10. Use the OrderBy tab to define the values for the following fields:
Field
Description/Action
Column Name
Displays the columns which contains only the cluster key type.
Sort Order
Displays the records in correct ascending or descending order. Select either ASC or DES. By default, ASC is selected.
11. To verify input or output information for the service, use the Input/Output tab as required.
Here, the columns selected in WHERE tab is auto-populated.
12. From the File menu, select Save.