Skip to content

Disabling_Assertions

Joe Winter edited this page Sep 4, 2014 · 1 revision

Disabling Assertions
The Java runtime option -ea (or -enableassertions) is used to enable diagnostic “assert” statements in Java applications. It is useful in development/debugging environments since additional internal checking is performed, but it has a small performance cost. It should be disabled in production environments to eliminate the performance cost. This can be done by simply removing the -ea option in JVM options or replacing it with -da (or disableassertions). In both the Cassandra script files {doradus_home}/bin/doradus-cassandra.bat and {cassandra_home}/bin/cassandra.bat, assertions are declared in the set JAVA_OPTS statement as shown below:
set JAVA_OPTS=-ea^
...

Clone this wiki locally