Running Query Analyzer in a Cortex Development Environment
Update the
MAVEN_OPTS
system variable:For Windows, open command prompt and run the following:
set MAVEN_OPTS=%MAVEN_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
For Linux, start a terminal and run the following:
export MAVEN_OPTS="$MAVEN_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
This enables remote JMX connections, so that you can connect to the application through JMX and configure logging as required. Use the
mvnDebug
command to enable debuggingRun Cortex in the same terminal.
Navigate to the
extensions/cortex/ext-cortex-webapp
module and run the following command:mvn tomcat8:run-war
Execute a request in Cortex Studio to prime caches.
Start the Query Analyzer using the Felix Console.
Execute the request in Cortex Studio again.
Stop the Query Analyzer using the Felix Console.
To view query statistics, open
{$user_home}/ep/db_statistics.json
.Use an online JSON viewer, such as JSON Editor Online, or install a JSON viewer in your IDE to view the results.