### Install and Start Local Docs Server Source: https://github.com/apache/druid-website/blob/asf-site/docs/36.0.0/development/contribute-to-docs/index.html Install dependencies and start the local development server to preview documentation changes. This command should be run from the 'website' directory. ```bash npm install npm run start ``` -------------------------------- ### Druid Quickstart Installation Source: https://github.com/apache/druid-website/blob/asf-site/docs/0.20.1/tutorials/index.html Steps to download and extract the Druid distribution for a quickstart installation. ```bash tar -xzf apache-druid-0.20.1-bin.tar.gz ``` -------------------------------- ### Install Website Dependencies and Build Source: https://github.com/apache/druid-website/blob/asf-site/docs/37.0.0/development/contribute-to-docs/index.html Install necessary dependencies for the website and build the site. This is typically done once. ```bash npm install npm run build ``` -------------------------------- ### Start Local Development Server Source: https://github.com/apache/druid-website/blob/asf-site/docs/latest/development/contribute-to-docs/index.html Build and start the local development server to preview your documentation changes. This command is run from the 'website' directory. ```bash npm run start ``` -------------------------------- ### Partitioning Rule Example Source: https://github.com/apache/druid-website/blob/asf-site/docs/37.0.0/data-management/cascading-reindexing/index.html Example of a partitioning rule for compacting data into daily segments with range partitioning. ```json { "id": "daily-range-30d", "olderThan": "P30D", "segmentGranularity": "DAY", "partitionsSpec": { "type": "range", "targetRowsPerSegment": 5000000, "partitionDimensions": ["channel", "countryName"] }, "description": "Compact to daily segments with range partitioning for data older than 30 days" } ``` -------------------------------- ### Build and Test Documentation Locally Source: https://github.com/apache/druid-website/blob/asf-site/docs/33.0.0/development/contribute-to-docs/index.html Navigate to the website directory, install dependencies, build the site, and start a local development server to preview your changes. ```bash cd website npm install npm run start ``` -------------------------------- ### Example log4j2.xml Configuration Source: https://github.com/apache/druid-website/blob/asf-site/docs/25.0.0/configuration/logging.html This is an example log4j2.xml configuration based on the micro quickstart. It demonstrates how to set the log directory, configure console and rolling file appenders, and define logging levels for different loggers. Modify this file to customize your logging setup. ```xml ``` -------------------------------- ### Install Dependencies and Build Website Source: https://github.com/apache/druid-website/blob/asf-site/docs/34.0.0/development/contribute-to-docs/index.html Navigate to the 'website' directory and install necessary npm packages. Then, build the website to test your changes locally. This command only needs to be run once. ```bash cd website npm install npm run build ``` -------------------------------- ### Install Python Packages for Local Setup Source: https://github.com/apache/druid-website/blob/asf-site/docs/27.0.0/tutorials/tutorial-jupyter-docker/index.html Installs the 'requests' and 'jupyterlab' packages required for running Jupyter Notebook tutorials locally. Ensure you have Python and pip installed. ```bash # Install requests pip install requests # Install JupyterLab pip install jupyterlab # Install Jupyter Notebook pip install notebook ``` -------------------------------- ### Create Sample Data Directory Source: https://github.com/apache/druid-website/blob/asf-site/docs/25.0.0/tutorials/tutorial-kafka.html Create a directory to store sample data for the tutorial. ```bash mkdir sample-data ``` -------------------------------- ### Example Output of Starting Druid Services Source: https://github.com/apache/druid-website/blob/asf-site/docs/0.16.0-incubating/tutorials/index.html Illustrates the expected output when running the start-micro-quickstart script, showing the startup of Zookeeper and various Druid services. ```text $ ./bin/start-micro-quickstart [Fri May 3 11:40:50 2019] Running command[zk], logging to[/apache-druid-0.16.0-incubating/var/sv/zk.log]: bin/run-zk conf [Fri May 3 11:40:50 2019] Running command[coordinator-overlord], logging to[/apache-druid-0.16.0-incubating/var/sv/coordinator-overlord.log]: bin/run-druid coordinator-overlord conf/druid/single-server/micro-quickstart [Fri May 3 11:40:50 2019] Running command[broker], logging to[/apache-druid-0.16.0-incubating/var/sv/broker.log]: bin/run-druid broker conf/druid/single-server/micro-quickstart [Fri May 3 11:40:50 2019] Running command[router], logging to[/apache-druid-0.16.0-incubating/var/sv/router.log]: bin/run-druid router conf/druid/single-server/micro-quickstart [Fri May 3 11:40:50 2019] Running command[historical], logging to[/apache-druid-0.16.0-incubating/var/sv/historical.log]: bin/run-druid historical conf/druid/single-server/micro-quickstart [Fri May 3 11:40:50 2019] Running command[middleManager], logging to[/apache-druid-0.16.0-incubating/var/sv/middleManager.log]: bin/run-druid middleManager conf/druid/single-server/micro-quickstart ``` -------------------------------- ### Install and Start Zookeeper on Master Server Source: https://github.com/apache/druid-website/blob/asf-site/docs/0.15.0-incubating/tutorials/cluster.md Steps to download, extract, and move ZooKeeper, and then start the Master server processes with ZK. ```bash curl http://www.gtlib.gatech.edu/pub/apache/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz -o zookeeper-3.4.11.tar.gz tar -xzf zookeeper-3.4.11.tar.gz mv zookeeper-3.4.11 zk ``` ```bash bin/start-cluster-master-with-zk-server ``` -------------------------------- ### Install and Start Zookeeper Source: https://github.com/apache/druid-website/blob/asf-site/docs/0.13.0-incubating/tutorials/cluster.md Download, extract, configure, and start Zookeeper on the coordination server. Ensure you copy the sample configuration to zoo.cfg. ```bash curl http://www.gtlib.gatech.edu/pub/apache/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz -o zookeeper-3.4.11.tar.gz tar -xzf zookeeper-3.4.11.tar.gz cd zookeeper-3.4.11 cp conf/zoo_sample.cfg conf/zoo.cfg ./bin/zkServer.sh start ``` -------------------------------- ### Start Druid Micro-Quickstart Source: https://github.com/apache/druid-website/blob/asf-site/docs/0.15.0-incubating/tutorials/index.md Run this command from the apache-druid-0.15.0-incubating package root to start all Druid services on a single machine. ```bash ./bin/start-micro-quickstart ``` -------------------------------- ### Start Druid Services Source: https://github.com/apache/druid-website/blob/asf-site/docs/28.0.0/tutorials/index.html Starts all Druid services for a single-server setup. You can specify the total memory available to Druid using the -m flag. ```bash ./bin/start-druid ``` ```bash ./bin/start-druid -m 16g ``` -------------------------------- ### Example log4j2.xml Configuration Source: https://github.com/apache/druid-website/blob/asf-site/docs/32.0.1/configuration/logging/index.html This is an example log4j2.xml configuration file based on the micro quickstart. It demonstrates how to configure daily log rollover and retention policies. ```xml ```