- Open the script using vi or vim
- Type
esc - Type
:set fileformat=unix - Save with
:wq!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| zookeeper-1: | |
| image: confluentinc/cp-zookeeper:latest | |
| hostname: zookeeper-1 | |
| ports: | |
| - "12181:12181" | |
| environment: | |
| ZOOKEEPER_SERVER_ID: 1 | |
| ZOOKEEPER_CLIENT_PORT: 12181 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run --name spark-app \ | |
| -e ENABLE_INIT_DAEMON=false \ | |
| --link spark-master:spark-master \ | |
| --network=same-network-as-master-and-worker \ | |
| spark-app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.1" | |
| services: | |
| spark-master: | |
| image: bde2020/spark-master:2.4.0-hadoop2.7 | |
| container_name: spark-master | |
| ports: | |
| - "8080:8080" | |
| - "7077:7077" | |
| environment: | |
| - INIT_DAEMON_STEP=setup_spark |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mappings: | |
| - match: '*.*.jvm.*.*' | |
| name: jvm_memory_usage | |
| labels: | |
| application: $1 | |
| executor_id: $2 | |
| mem_type: $3 | |
| qty: $4 | |
| - match: '*.*.jvm.pools.*.*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| graphite_exporter: | |
| image: prom/graphite-exporter | |
| command: "--graphite.mapping-config=/tmp/graphite_mapping.conf" | |
| container_name: graphite_exporter | |
| volumes: | |
| - path/to-your/graphite_mapping.conf:/tmp/graphite_mapping.conf | |
| ports: | |
| - "9108:9108" | |
| - "9109:9109" | |
| - "9109:9109/udp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *.sink.graphite.class=org.apache.spark.metrics.sink.GraphiteSink | |
| *.sink.graphite.host=graphite_exporter | |
| *.sink.graphite.port=9109 | |
| *.sink.graphite.period=10 | |
| *.sink.graphite.unit=seconds | |
| # Enable JvmSource for instance master, worker, driver and executor | |
| master.source.jvm.class=org.apache.spark.metrics.source.JvmSource | |
| worker.source.jvm.class=org.apache.spark.metrics.source.JvmSource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run --name spark-app \ | |
| -e ENABLE_INIT_DAEMON=false \ | |
| --link spark-master:spark-master \ | |
| -v path/to-your/metrics.properties:/spark/conf/metrics.properties \ | |
| --network=same-network-as-master-and-worker \ | |
| spark-app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.1" | |
| services: | |
| spark-master: | |
| image: bde2020/spark-master:2.4.0-hadoop2.7 | |
| container_name: spark-master | |
| ports: | |
| - "8080:8080" | |
| - "7077:7077" | |
| volumes: | |
| - ${PWD}/spark/metrics.properties:/spark/conf/metrics.properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: 1 | |
| datasources: | |
| - name: Prometheus | |
| type: prometheus | |
| access: proxy | |
| url: http://prometheus-ip:9090 |
NewerOlder