mirror of https://github.com/apache/druid.git
Convert from DRUID_INTEGRATION_TEST_INDEXER to USE_INDEXER (#13684)
The old ITs use DRUID_INTEGRATION_TEST_INDEXER. The new ones use the USE_INDEXER env var passed in from the build environment.
This commit is contained in:
parent
7a54524076
commit
fa493f1ebc
|
@ -142,18 +142,18 @@ function build_shared_dir {
|
||||||
# docker-compose-indexer.yaml which uses the Indexer in place of Middle Manager.
|
# docker-compose-indexer.yaml which uses the Indexer in place of Middle Manager.
|
||||||
function docker_file {
|
function docker_file {
|
||||||
compose_args=""
|
compose_args=""
|
||||||
if [ -n "$DRUID_INTEGRATION_TEST_INDEXER" ]; then
|
if [ -n "$USE_INDEXER" ]; then
|
||||||
# Sanity check: DRUID_INTEGRATION_TEST_INDEXER must be "indexer" or "middleManager"
|
# Sanity check: USE_INDEXER must be "indexer" or "middleManager"
|
||||||
# if it is set at all.
|
# if it is set at all.
|
||||||
if [ "$DRUID_INTEGRATION_TEST_INDEXER" != "indexer" ] && [ "$DRUID_INTEGRATION_TEST_INDEXER" != "middleManager" ]
|
if [ "$USE_INDEXER" != "indexer" ] && [ "$USE_INDEXER" != "middleManager" ]
|
||||||
then
|
then
|
||||||
echo "DRUID_INTEGRATION_TEST_INDEXER must be 'indexer' or 'middleManager' (is '$DRUID_INTEGRATION_TEST_INDEXER')" 1>&2
|
echo "USE_INDEXER must be 'indexer' or 'middleManager' (is '$USE_INDEXER')" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "$DRUID_INTEGRATION_TEST_INDEXER" == "indexer" ]; then
|
if [ "$USE_INDEXER" == "indexer" ]; then
|
||||||
compose_file=docker-compose-indexer.yaml
|
compose_file=docker-compose-indexer.yaml
|
||||||
if [ ! -f "$CLUSTER_DIR/$compose_file" ]; then
|
if [ ! -f "$CLUSTER_DIR/$compose_file" ]; then
|
||||||
echo "DRUID_INTEGRATION_TEST_INDEXER=$DRUID_INTEGRATION_TEST_INDEXER, but $CLUSTER_DIR/$compose_file is missing" 1>&2
|
echo "USE_INDEXER=$USE_INDEXER, but $CLUSTER_DIR/$compose_file is missing" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
compose_args="-f $compose_file"
|
compose_args="-f $compose_file"
|
||||||
|
|
|
@ -173,13 +173,13 @@ public class ClusterConfig
|
||||||
/**
|
/**
|
||||||
* Create the set of configuration tags for this run. At present, the only options
|
* Create the set of configuration tags for this run. At present, the only options
|
||||||
* are "middleManager" or "indexer" corresponding to the value of the
|
* are "middleManager" or "indexer" corresponding to the value of the
|
||||||
* {@code DRUID_INTEGRATION_TEST_INDEXER} env var which says whether this cluster has
|
* {@code USE_INDEXER} env var which says whether this cluster has
|
||||||
* an indexer or middle manager.
|
* an indexer or middle manager.
|
||||||
*/
|
*/
|
||||||
private Set<String> createConfigTags()
|
private Set<String> createConfigTags()
|
||||||
{
|
{
|
||||||
String indexer = "middleManager";
|
String indexer = "middleManager";
|
||||||
String indexerValue = System.getenv("DRUID_INTEGRATION_TEST_INDEXER");
|
String indexerValue = System.getenv("USE_INDEXER");
|
||||||
if (indexerValue != null) {
|
if (indexerValue != null) {
|
||||||
indexer = indexerValue;
|
indexer = indexerValue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,7 +244,7 @@ another build task.
|
||||||
Tests should run on the Middle Manager by default. Tests can optionally run on the
|
Tests should run on the Middle Manager by default. Tests can optionally run on the
|
||||||
Indexer. To run on Indexer:
|
Indexer. To run on Indexer:
|
||||||
|
|
||||||
* In the environment, `export DRUID_INTEGRATION_TEST_INDEXER=indexer`. (Use `middleManager`
|
* In the environment, `export USE_INDEXER=indexer`. (Use `middleManager`
|
||||||
otherwise. If the variable is not set, `middleManager` is the default.)
|
otherwise. If the variable is not set, `middleManager` is the default.)
|
||||||
* The `cluster/<category>/docker-compose.yaml` file should be for the Middle manager. Create
|
* The `cluster/<category>/docker-compose.yaml` file should be for the Middle manager. Create
|
||||||
a separate file called `cluster/<category>/docker-compose-indexer.yaml` to define the
|
a separate file called `cluster/<category>/docker-compose-indexer.yaml` to define the
|
||||||
|
|
2
it.sh
2
it.sh
|
@ -54,7 +54,7 @@ Usage: $0 cmd [category]
|
||||||
|
|
||||||
Environment:
|
Environment:
|
||||||
OVERRIDE_ENV: optional, name of env file to pass to Docker
|
OVERRIDE_ENV: optional, name of env file to pass to Docker
|
||||||
DRUID_INTEGRATION_TEST_INDEXER: Set to middleManager (default if not set)
|
USE_INDEXER: Set to middleManager (default if not set)
|
||||||
or "indexer". If "indexer", requires docker-compose-indexer.yaml exist.
|
or "indexer". If "indexer", requires docker-compose-indexer.yaml exist.
|
||||||
druid_*: passed to the container.
|
druid_*: passed to the container.
|
||||||
Other, test-specific variables.
|
Other, test-specific variables.
|
||||||
|
|
Loading…
Reference in New Issue