mirror of https://github.com/apache/druid.git
fix docs version interpolation (#8568)
This commit is contained in:
parent
2104cee79b
commit
52f3f2c229
|
@ -57,7 +57,7 @@ Don't use the default remote repositories, only use the repositories provided di
|
|||
|
||||
`-d` or `--defaultVersion`
|
||||
|
||||
Version to use for extension coordinate that doesn't have a version information. For example, if extension coordinate is `org.apache.druid.extensions:mysql-metadata-storage`, and default version is `#{DRUIDVERSION}`, then this coordinate will be treated as `org.apache.druid.extensions:mysql-metadata-storage:#{DRUIDVERSION}`
|
||||
Version to use for extension coordinate that doesn't have a version information. For example, if extension coordinate is `org.apache.druid.extensions:mysql-metadata-storage`, and default version is `{{DRUIDVERSION}}`, then this coordinate will be treated as `org.apache.druid.extensions:mysql-metadata-storage:{{DRUIDVERSION}}`
|
||||
|
||||
`--use-proxy`
|
||||
|
||||
|
@ -91,10 +91,10 @@ To run `pull-deps`, you should
|
|||
|
||||
Example:
|
||||
|
||||
Suppose you want to download ```mysql-metadata-storage``` and ```hadoop-client```(both 2.3.0 and 2.4.0) with a specific version, you can run `pull-deps` command with `-c org.apache.druid.extensions:mysql-metadata-storage:#{DRUIDVERSION}`, `-h org.apache.hadoop:hadoop-client:2.3.0` and `-h org.apache.hadoop:hadoop-client:2.4.0`, an example command would be:
|
||||
Suppose you want to download ```mysql-metadata-storage``` and ```hadoop-client```(both 2.3.0 and 2.4.0) with a specific version, you can run `pull-deps` command with `-c org.apache.druid.extensions:mysql-metadata-storage:{{DRUIDVERSION}}`, `-h org.apache.hadoop:hadoop-client:2.3.0` and `-h org.apache.hadoop:hadoop-client:2.4.0`, an example command would be:
|
||||
|
||||
```
|
||||
java -classpath "/my/druid/lib/*" org.apache.druid.cli.Main tools pull-deps --clean -c org.apache.druid.extensions:mysql-metadata-storage:#{DRUIDVERSION} -h org.apache.hadoop:hadoop-client:2.3.0 -h org.apache.hadoop:hadoop-client:2.4.0
|
||||
java -classpath "/my/druid/lib/*" org.apache.druid.cli.Main tools pull-deps --clean -c org.apache.druid.extensions:mysql-metadata-storage:{{DRUIDVERSION}} -h org.apache.hadoop:hadoop-client:2.3.0 -h org.apache.hadoop:hadoop-client:2.4.0
|
||||
```
|
||||
|
||||
Because `--clean` is supplied, this command will first remove the directories specified at `druid.extensions.directory` and `druid.extensions.hadoopDependenciesDir`, then recreate them and start downloading the extensions there. After finishing downloading, if you go to the extension directories you specified, you will see
|
||||
|
@ -103,7 +103,7 @@ Because `--clean` is supplied, this command will first remove the directories sp
|
|||
tree extensions
|
||||
extensions
|
||||
└── mysql-metadata-storage
|
||||
└── mysql-metadata-storage-#{DRUIDVERSION}.jar
|
||||
└── mysql-metadata-storage-{{DRUIDVERSION}}.jar
|
||||
```
|
||||
|
||||
```
|
||||
|
@ -128,10 +128,10 @@ hadoop-dependencies/
|
|||
..... lots of jars
|
||||
```
|
||||
|
||||
Note that if you specify `--defaultVersion`, you don't have to put version information in the coordinate. For example, if you want `mysql-metadata-storage` to use version `#{DRUIDVERSION}`, you can change the command above to
|
||||
Note that if you specify `--defaultVersion`, you don't have to put version information in the coordinate. For example, if you want `mysql-metadata-storage` to use version `{{DRUIDVERSION}}`, you can change the command above to
|
||||
|
||||
```
|
||||
java -classpath "/my/druid/lib/*" org.apache.druid.cli.Main tools pull-deps --defaultVersion #{DRUIDVERSION} --clean -c org.apache.druid.extensions:mysql-metadata-storage -h org.apache.hadoop:hadoop-client:2.3.0 -h org.apache.hadoop:hadoop-client:2.4.0
|
||||
java -classpath "/my/druid/lib/*" org.apache.druid.cli.Main tools pull-deps --defaultVersion {{DRUIDVERSION}} --clean -c org.apache.druid.extensions:mysql-metadata-storage -h org.apache.hadoop:hadoop-client:2.3.0 -h org.apache.hadoop:hadoop-client:2.4.0
|
||||
```
|
||||
|
||||
> Please note to use the pull-deps tool you must know the Maven groupId, artifactId, and version of your extension.
|
||||
|
|
|
@ -80,7 +80,7 @@ include "selector", "bound", "in", "like", "regex", "search", "and", "or", and "
|
|||
Other query types (like TopN, Scan, Select, and Search) ignore the "vectorize" parameter, and will execute without
|
||||
vectorization. These query types will ignore the "vectorize" parameter even if it is set to `"force"`.
|
||||
|
||||
Vectorization is an alpha-quality feature as of Druid #{DRUIDVERSION}. We heartily welcome any feedback and testing
|
||||
Vectorization is an alpha-quality feature as of Druid {{DRUIDVERSION}}. We heartily welcome any feedback and testing
|
||||
from the community as we work to battle-test it.
|
||||
|
||||
|property|default| description|
|
||||
|
|
|
@ -144,14 +144,14 @@ First, download and unpack the release archive. It's best to do this on a single
|
|||
since you will be editing the configurations and then copying the modified distribution out to all
|
||||
of your servers.
|
||||
|
||||
[Download](https://www.apache.org/dyn/closer.cgi?path=/incubator/druid/#{DRUIDVERSION}/apache-druid-#{DRUIDVERSION}-bin.tar.gz)
|
||||
the #{DRUIDVERSION} release.
|
||||
[Download](https://www.apache.org/dyn/closer.cgi?path=/incubator/druid/{{DRUIDVERSION}}/apache-druid-{{DRUIDVERSION}}-bin.tar.gz)
|
||||
the {{DRUIDVERSION}} release.
|
||||
|
||||
Extract Druid by running the following commands in your terminal:
|
||||
|
||||
```bash
|
||||
tar -xzf apache-druid-#{DRUIDVERSION}-bin.tar.gz
|
||||
cd apache-druid-#{DRUIDVERSION}
|
||||
tar -xzf apache-druid-{{DRUIDVERSION}}-bin.tar.gz
|
||||
cd apache-druid-{{DRUIDVERSION}}
|
||||
```
|
||||
|
||||
In the package, you should find:
|
||||
|
@ -418,7 +418,7 @@ Copy the Druid distribution and your edited configurations to your Master server
|
|||
If you have been editing the configurations on your local machine, you can use *rsync* to copy them:
|
||||
|
||||
```bash
|
||||
rsync -az apache-druid-#{DRUIDVERSION}/ MASTER_SERVER:apache-druid-#{DRUIDVERSION}/
|
||||
rsync -az apache-druid-{{DRUIDVERSION}}/ MASTER_SERVER:apache-druid-{{DRUIDVERSION}}/
|
||||
```
|
||||
|
||||
### No Zookeeper on Master
|
||||
|
|
|
@ -52,14 +52,14 @@ configuration than `micro-quickstart`.
|
|||
|
||||
## Getting started
|
||||
|
||||
[Download](https://www.apache.org/dyn/closer.cgi?path=/incubator/druid/#{DRUIDVERSION}/apache-druid-#{DRUIDVERSION}-bin.tar.gz)
|
||||
the #{DRUIDVERSION} release.
|
||||
[Download](https://www.apache.org/dyn/closer.cgi?path=/incubator/druid/{{DRUIDVERSION}}/apache-druid-{{DRUIDVERSION}}-bin.tar.gz)
|
||||
the {{DRUIDVERSION}} release.
|
||||
|
||||
Extract Druid by running the following commands in your terminal:
|
||||
|
||||
```bash
|
||||
tar -xzf apache-druid-#{DRUIDVERSION}-bin.tar.gz
|
||||
cd apache-druid-#{DRUIDVERSION}
|
||||
tar -xzf apache-druid-{{DRUIDVERSION}}-bin.tar.gz
|
||||
cd apache-druid-{{DRUIDVERSION}}
|
||||
```
|
||||
|
||||
In the package, you should find:
|
||||
|
@ -86,7 +86,7 @@ mv zookeeper-3.4.14 zk
|
|||
```
|
||||
|
||||
The startup scripts for the tutorial will expect the contents of the Zookeeper tarball to be located at `zk` under the
|
||||
apache-druid-#{DRUIDVERSION} package root.
|
||||
apache-druid-{{DRUIDVERSION}} package root.
|
||||
|
||||
## Start up Druid services
|
||||
|
||||
|
@ -94,7 +94,7 @@ The following commands will assume that you are using the `micro-quickstart` sin
|
|||
using a different configuration, the `bin` directory has equivalent scripts for each configuration, such as
|
||||
`bin/start-single-server-small`.
|
||||
|
||||
From the apache-druid-#{DRUIDVERSION} package root, run the following command:
|
||||
From the apache-druid-{{DRUIDVERSION}} package root, run the following command:
|
||||
|
||||
```bash
|
||||
./bin/start-micro-quickstart
|
||||
|
@ -104,15 +104,15 @@ This will bring up instances of Zookeeper and the Druid services, all running on
|
|||
|
||||
```bash
|
||||
$ ./bin/start-micro-quickstart
|
||||
[Fri May 3 11:40:50 2019] Running command[zk], logging to[/apache-druid-#{DRUIDVERSION}/var/sv/zk.log]: bin/run-zk conf
|
||||
[Fri May 3 11:40:50 2019] Running command[coordinator-overlord], logging to[/apache-druid-#{DRUIDVERSION}/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-#{DRUIDVERSION}/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-#{DRUIDVERSION}/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-#{DRUIDVERSION}/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-#{DRUIDVERSION}/var/sv/middleManager.log]: bin/run-druid middleManager conf/druid/single-server/micro-quickstart
|
||||
[Fri May 3 11:40:50 2019] Running command[zk], logging to[/apache-druid-{{DRUIDVERSION}}/var/sv/zk.log]: bin/run-zk conf
|
||||
[Fri May 3 11:40:50 2019] Running command[coordinator-overlord], logging to[/apache-druid-{{DRUIDVERSION}}/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-{{DRUIDVERSION}}/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-{{DRUIDVERSION}}/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-{{DRUIDVERSION}}/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-{{DRUIDVERSION}}/var/sv/middleManager.log]: bin/run-druid middleManager conf/druid/single-server/micro-quickstart
|
||||
```
|
||||
|
||||
All persistent state such as the cluster metadata store and segments for the services will be kept in the `var` directory under the apache-druid-#{DRUIDVERSION} package root. Logs for the services are located at `var/sv`.
|
||||
All persistent state such as the cluster metadata store and segments for the services will be kept in the `var` directory under the apache-druid-{{DRUIDVERSION}} package root. Logs for the services are located at `var/sv`.
|
||||
|
||||
Later on, if you'd like to stop the services, CTRL-C to exit the `bin/start-micro-quickstart` script, which will terminate the Druid processes.
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ For this tutorial, we've provided a Dockerfile for a Hadoop 2.8.3 cluster, which
|
|||
|
||||
This Dockerfile and related files are located at `quickstart/tutorial/hadoop/docker`.
|
||||
|
||||
From the apache-druid-#{DRUIDVERSION} package root, run the following commands to build a Docker image named "druid-hadoop-demo" with version tag "2.8.3":
|
||||
From the apache-druid-{{DRUIDVERSION}} package root, run the following commands to build a Docker image named "druid-hadoop-demo" with version tag "2.8.3":
|
||||
|
||||
```bash
|
||||
cd quickstart/tutorial/hadoop/docker
|
||||
|
@ -110,7 +110,7 @@ docker exec -it druid-hadoop-demo bash
|
|||
|
||||
### Copy input data to the Hadoop container
|
||||
|
||||
From the apache-druid-#{DRUIDVERSION} package root on the host, copy the `quickstart/tutorial/wikiticker-2015-09-12-sampled.json.gz` sample data to the shared folder:
|
||||
From the apache-druid-{{DRUIDVERSION}} package root on the host, copy the `quickstart/tutorial/wikiticker-2015-09-12-sampled.json.gz` sample data to the shared folder:
|
||||
|
||||
```bash
|
||||
cp quickstart/tutorial/wikiticker-2015-09-12-sampled.json.gz /tmp/shared/wikiticker-2015-09-12-sampled.json.gz
|
||||
|
|
|
@ -244,7 +244,7 @@ Once the spec is submitted, you can follow the same instructions as above to wai
|
|||
|
||||
Let's briefly discuss how we would've submitted the ingestion task without using the script. You do not need to run these commands.
|
||||
|
||||
To submit the task, POST it to Druid in a new terminal window from the apache-druid-#{DRUIDVERSION} directory:
|
||||
To submit the task, POST it to Druid in a new terminal window from the apache-druid-{{DRUIDVERSION}} directory:
|
||||
|
||||
```bash
|
||||
curl -X 'POST' -H 'Content-Type:application/json' -d @quickstart/tutorial/wikipedia-index.json http://localhost:8081/druid/indexer/v1/task
|
||||
|
|
|
@ -631,7 +631,7 @@ We've finished defining the ingestion spec, it should now look like the followin
|
|||
|
||||
## Submit the task and query the data
|
||||
|
||||
From the apache-druid-#{DRUIDVERSION} package root, run the following command:
|
||||
From the apache-druid-{{DRUIDVERSION}} package root, run the following command:
|
||||
|
||||
```bash
|
||||
bin/post-index-task --file quickstart/ingestion-tutorial-index.json --url http://localhost:8081
|
||||
|
|
|
@ -114,7 +114,7 @@ We will see how these definitions are used after we load this data.
|
|||
|
||||
## Load the example data
|
||||
|
||||
From the apache-druid-#{DRUIDVERSION} package root, run the following command:
|
||||
From the apache-druid-{{DRUIDVERSION}} package root, run the following command:
|
||||
|
||||
```bash
|
||||
bin/post-index-task --file quickstart/tutorial/rollup-index.json --url http://localhost:8081
|
||||
|
|
|
@ -26,11 +26,19 @@ if (process.argv.length !== 3) {
|
|||
var version = process.argv[2];
|
||||
|
||||
try {
|
||||
// Fix doc paths
|
||||
replace.sync({
|
||||
files: './build/ApacheDruid/docs/**/*.html',
|
||||
from: /\/docs\//g,
|
||||
to: '/docs/' + version + '/',
|
||||
});
|
||||
|
||||
// Interpolate {{DRUIDVERSION}}
|
||||
replace.sync({
|
||||
files: './build/ApacheDruid/docs/**/*.html',
|
||||
from: /\{\{DRUIDVERSION\}\}/g,
|
||||
to: version,
|
||||
});
|
||||
console.log('Fixed versions');
|
||||
} catch (error) {
|
||||
console.error('Error occurred:', error);
|
||||
|
|
Loading…
Reference in New Issue