The Apache Cassandra database provides scalability and high availability for certain applications of big data. In JasperReports Server 5.6, Jaspersoft replaces the previously unsupported community connector with a supported data source for Cassandra. For more information about Cassandra, see http://cassandra.apache.org/.
The Cassandra data source relies on a new driver that has certain limitations in how your data can be structured and accessed:
• | The current version of Cassandra does not support NULL values in the data. All required fields must have non-NULL default values. This also means that input controls cannot be null and must be given a value. |
• | The current version of the driver does not support aggregate functions (sum, min, max). |
• | For query parameters, the current version of the driver supports $X(IN...), but no other $X functions. |
As the Cassandra driver is updated to include more functionality, Jaspersoft plans to update the Cassadra data source in future releases.
The Cassandra data source supports queries in the Cassandra Query Language 3 (CQL3). To improve performance, design your Cassandra data with the following guidelines:
• | Specify the ALLOW FILTERING suffix to speed up queries. |
• | All fields referenced in WHERE clauses of a query should be indexed. |
As with all big data stores, Cassandra data sources have the following limitations and usage guidelines within JasperReports Server:
• | Cassandra data sources are not supported for OLAP connections |
• | Cassandra data sources cannot be used directly in Domains. To use Cassandra in a Domain, see Big Data Connectors for Virtual Data Sources. |
• | Cassandra data sources can be used in Ad Hoc Topics, but they do not support query optimization. |
• | You must configure your query limits to handle big data (see Configuring Ad Hoc). |
• | You must configure your JVM memory to handle the expected amount of data (see the JasperReports Server Installation Guide). |
Creating a Cassandra Data Source
1. | Log on as an administrator. |
2. | Click View > Repository, expand the folder tree, and right-click a folder to select Add Resource > Data Source from the context menu. Alternatively, you can select Create > Data Source from the main menu on any page and specify a folder location later. If you installed the sample data, the suggested folder is Data Sources. |
The New Data Source page appears.
3. | In the Type field, select Cassandra Data Source. |
The information on the page changes to reflect what’s needed to define a Cassandra data source.
Cassandra Data Source Page |
4. | Fill in the required fields, along with any optional information. |
Use port 9042 with the Cassandra data source. Cassandra's default port of 9160 is for the Thrift client that is commonly used with Cassandra. To use the Cassandra Query Language (CQL) with Jaspersoft's Cassandra data source, you need may need to configure your Cassandra instance as follows:
start_native_transport: true
native_transport_port: 9042
5. | Click Test Connection to check the values you entered. Make sure that the port is set to 9042, because the connection test will also work with the wrong port (9160). |
6. | When done, click Save. The data source appears in the repository. |
Increasing File Descriptor Limits for Cassandra
Many users have reported errors when viewing many reports from a Cassandra data source. Cassandra generally needs more than the default limit of open file descriptors (1024).
To increase the number of file descriptors, administrators need to change the security limits on the Cassandra nodes and on the operating systems running JasperReports Server.
To test this configuration, you can increase the limits for the current session with the following Linux commands:
sudo ulimit -Hn 32768
or
sudo ulimit -Sn 32768
The effects of the commands above will be reset when the computer restarts. To make the changes permanent, edit the file /etc/security/limits.conf to add the following settings:
Recommended Comments
There are no comments to display.