Accessing Cassandra databases

Read(149) Label: cassandra, datastaxcli,

1. Download the following jars for connecting to Cassandra databases from datastax’s official website https://www.datastax.com/ and put them in esProc external library folder. Get the appropriate jars according to the Cassandra version you are using. The directory containing files of DatastaxCli external library is: installation directory\esProc\extlib\DatastaxCli. The Raqsoft core jar for this external library is DatastaxCli.jar.

asm-5.0.3.jar

asm-analysis-5.0.3.jar

asm-commons-5.0.3.jar

asm-tree-5.0.3.jar

asm-util-5.0.3.jar

cassandra-driver-core-3.3.0.jar

cassandra-driver-extras-3.3.0.jar

cassandra-driver-mapping-3.3.0.jar

guava-19.0.jar

HdrHistogram-2.1.9.jar

jackson-core-2.8.8.jar

jackson-databind-2.7.9.1.jar

javax.json-api-1.0.jar

jffi-1.2.10.jar

jffi-1.2.10-native.jar

jnr-constants-0.9.0.jar

jnr-ffi-2.0.7.jar

jnr-posix-3.0.27.jar

jnr-x86asm-1.0.2.jar

joda-time-2.9.1.jar

lz4-1.3.0.jar

metrics-core-3.2.2.jar

netty-all-4.1.17.Final.jar

slf4j-api-1.7.25.jar

snappy-java-1.1.2.6.jar

Note: The third-party jars are provided within the package and users can choose appropriate ones for specific scenarios.

 

2. A JRE version 1.7 or above is required. The embedded JRE version in esProc is JRE1.6. Users need to install a higher version and configure java_home in the config.txt under installation directory\esProc\bin. If a JDK version1.7 or above has been chosne when installing esProc, just ignore this step.

 

3. Users can manually change the size of memory if the default size isn’t large enough for needs. Two ways to manage memory under Windows are available: Change the memory settings in config.txt when starting esProc through the executable file; and in the .bat file when starting the application through the batch file. Under Linux, change the memory size in the .sh file.

Below is the method of changing memory settings in config.txt under Windows:

java_home=C:\ProgramFiles\Java\JDK1.7.0_11;esproc_port=48773;jvm_args=-Xms256m -XX:PermSize=256M -XX:MaxPermSize=512M -Xmx9783m -Duser.language=zh

 

4. esProc provides three library functions - stax_connect(), stax_query() and stax_close() - to access the Cassandra databases. Look up them inHelp-Function referenceto find the uses.