Skip to content

amitca71/databricks_jmeter

Repository files navigation

databricks_jmeter

(inspired by https://github.com/manojkumar542/Jmeter-docker.git and https://github.com/Rbillon59/jmeter-docker-compose-starterkit)
This implementation works as is, with minor pre requisite of Databricks SQL configuration (host, PWD and warehouse id) set on .env file
its performing basic sql test for "show tables". and results apears on grafana, using influxDB.
the jmeter test configuration is stored under scenario/databricks_argument_plan_influx.jmx.
the file can be edited to your oun query, or be used as a baseline for the GUI configuration

pre requisite:

  1. Databricks workspace with:
  • SQL Warehouse installed
  • generated private token (PWD)
  1. cp .env.sample .env edit the .env with your sql warehouse:
  • host ("dbc-xxxx-xxx.cloud.databricks.com")
  • PWD ("dapixxxxxx")
  • warehouse ("dcxxxxxxxxx6")

execution:

source .env && docker-compose up -d

results on grafana:

localhost:300000 (admin/admin)

edit jmx scenario instructions (advanced- not needed for execution)

jmeter edit scenario by GUI instructions (its recomended to use ls scenario/databricks_argument_plan_influx.jmx as base line and edit it)

  1. install jmeter 5.5 https://jmeter.apache.org/download_jmeter.cgi

  2. download databricks client lib from: https://www.databricks.com/spark/jdbc-drivers-archive

  3. copy the driver (e.g. DatabricksJDBC42.jar) to lib/ext

  4. boot (./bin/jmeter)

  5. add DatabricksJDBC42.jar to classpath (press on browse and select it) image

  6. Add JDBC configuration:

image

fill similar to the following: image

where JDBC Driver Class = com.databricks.client.jdbc.Driver database URL: taken from the sql endpoint connecyion details connection propeties: PWD=

  1. Add thread group image

under thread group:

7.1 Add sampler→ JDBC Request

image

with following input : image

variable name of pool… : databricks (the one we declared before) query: the query (in this example: “show schemas”)

under JDBC request: 7.1.1 add listener: image

save… and execute.

Green ones mean successfull executions image

About

jmeter instructions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published