From 22ab5841609e2565578a5c9499059a5e9a196149 Mon Sep 17 00:00:00 2001 From: Yabin Meng Date: Wed, 10 Mar 2021 14:06:29 -0600 Subject: [PATCH] Minor document correction for clarification. --- driver-pulsar/src/main/resources/pulsar.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/driver-pulsar/src/main/resources/pulsar.md b/driver-pulsar/src/main/resources/pulsar.md index 3a51d1b92..01be82b06 100644 --- a/driver-pulsar/src/main/resources/pulsar.md +++ b/driver-pulsar/src/main/resources/pulsar.md @@ -126,7 +126,7 @@ blocks: ... ``` -Each time when you execute the NB command, you can only choose one command block to execute. This is achieved by applying a filtering condition against **phase** tag, as below: +Each time when you execute the NB command, you can choose one command block to execute by applying a filtering condition against **phase** tag, as below. ```bash driver=pulsar tags=phase: ... ``` @@ -140,6 +140,8 @@ An example of executing Pulsar producer/consumer API using NB is like this: driver=pulsar tags=phase:consumer ... ``` +Technically speaking, NB is able to execute multiple command blocks. In the context of Pulsar driver, this means we're able to use NB to test multiple Pulsar operations in one run! But if we want to focus the testing on one particular operation, we can use the tag to filter the command block as listed above! + ### 1.3.1. NB Cycle Level Parameters vs. Global Level Parameters Some parameters, especially topic name and producer/consumer/reader/etc. name, can be set at the global level in **config.properties** file, or at NB cycle level via **pulsar.yaml** file. An example of setting a topic name in both levels is as below: @@ -388,20 +390,22 @@ Some other common NB activity parameters are listed as below. Please reference t ## 1.7. NB Pulsar Driver Execution Example +**NOTE**: in the following examples, the Pulsar service URL is **pulsar://localhost:6650**, please change it accordingly for your own Pulsar environment. + 1. Run Pulsar producer API to produce 100K messages using 100 NB threads ```bash - run driver=pulsar tags=phase:producer threads=100 cycles=100K config=/config.properties yaml=/pulsar.yaml + run driver=pulsar tags=phase:producer threads=100 cycles=100K service_url=pulsar://localhost:6650 config=/config.properties yaml=/pulsar.yaml ``` 2. Run Pulsar producer batch API to produce 1M messages with 2 NB threads; put NB execution metrics in a specified metrics folder ```bash - run driver=pulsar seq=concat tags=phase:batch-producer threads=2 cycles=1M config=/config.properties yaml=/pulsar.yaml --report-csv-to + run driver=pulsar seq=concat tags=phase:batch-producer threads=2 cycles=1M service_url=pulsar://localhost:6650 config=/config.properties yaml=/pulsar.yaml --report-csv-to ``` 3. Run Pulsar consumer API to consume (and acknowledge) 100 messages using one single NB thread. ```bash - run driver=pulsar tags=phase:consumer cycles=100 config=/config.properties yaml=/pulsar.yaml + run driver=pulsar tags=phase:consumer cycles=100 service_url=pulsar://localhost:6650 config=/config.properties yaml=/pulsar.yaml ```