-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* master: Reduce CLI scripts to one-liners (#30759) SQL: Preserve scoring in bool queries (#30730) QA: Switch rolling upgrade to 3 nodes (#30728) [TEST] Enable DEBUG logging on testAutoQueueSizingWithMax [ML] Don't install empty ML metadata on startup (#30751) Add assertion on removing copy_settings (#30748) bump lucene version for 6_3_0 [DOCS] Mark painless execute api as experimental (#30710) disable annotation processor for docs (#30610) Add more script contexts (#30721) Fix default shards count in create index docs (#30747) Mute testCorruptFileThenSnapshotAndRestore
- Loading branch information
Showing
74 changed files
with
530 additions
and
694 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -e -o pipefail | ||
|
||
source "`dirname "$0"`"/elasticsearch-env | ||
|
||
IFS=';' read -r -a additional_sources <<< "$ES_ADDITIONAL_SOURCES" | ||
for additional_source in "${additional_sources[@]}" | ||
do | ||
source "`dirname "$0"`"/$additional_source | ||
done | ||
|
||
exec \ | ||
"$JAVA" \ | ||
$ES_JAVA_OPTS \ | ||
-Des.path.home="$ES_HOME" \ | ||
-Des.path.conf="$ES_PATH_CONF" \ | ||
-Des.distribution.flavor="$ES_DISTRIBUTION_FLAVOR" \ | ||
-Des.distribution.type="$ES_DISTRIBUTION_TYPE" \ | ||
-cp "$ES_CLASSPATH" \ | ||
$1 \ | ||
"${@:2}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
#!/bin/bash | ||
|
||
source "`dirname "$0"`"/elasticsearch-env | ||
|
||
exec \ | ||
"$JAVA" \ | ||
$ES_JAVA_OPTS \ | ||
-Des.path.home="$ES_HOME" \ | ||
-Des.path.conf="$ES_PATH_CONF" \ | ||
-Des.distribution.flavor="$ES_DISTRIBUTION_FLAVOR" \ | ||
-Des.distribution.type="$ES_DISTRIBUTION_TYPE" \ | ||
-cp "$ES_CLASSPATH" \ | ||
"`dirname "$0"`"/elasticsearch-cli \ | ||
org.elasticsearch.common.settings.KeyStoreCli \ | ||
"$@" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
#!/bin/bash | ||
|
||
source "`dirname "$0"`"/elasticsearch-env | ||
|
||
exec \ | ||
"$JAVA" \ | ||
$ES_JAVA_OPTS \ | ||
-Des.path.home="$ES_HOME" \ | ||
-Des.path.conf="$ES_PATH_CONF" \ | ||
-Des.distribution.flavor="$ES_DISTRIBUTION_FLAVOR" \ | ||
-Des.distribution.type="$ES_DISTRIBUTION_TYPE" \ | ||
-cp "$ES_CLASSPATH" \ | ||
"`dirname "$0"`"/elasticsearch-cli \ | ||
org.elasticsearch.plugins.PluginCli \ | ||
"$@" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
#!/bin/bash | ||
|
||
source "`dirname "$0"`"/elasticsearch-env | ||
|
||
exec \ | ||
"$JAVA" \ | ||
$ES_JAVA_OPTS \ | ||
-Des.path.home="$ES_HOME" \ | ||
-Des.path.conf="$ES_PATH_CONF" \ | ||
-Des.distribution.flavor="$ES_DISTRIBUTION_FLAVOR" \ | ||
-Des.distribution.type="$ES_DISTRIBUTION_TYPE" \ | ||
-cp "$ES_CLASSPATH" \ | ||
"`dirname "$0"`"/elasticsearch-cli \ | ||
org.elasticsearch.index.translog.TranslogToolCli \ | ||
"$@" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
91 changes: 91 additions & 0 deletions
91
qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/AbstractRollingTestCase.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/* | ||
* Licensed to Elasticsearch under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.elasticsearch.upgrades; | ||
|
||
import org.apache.http.entity.ContentType; | ||
import org.apache.http.entity.StringEntity; | ||
import org.elasticsearch.Version; | ||
import org.elasticsearch.action.support.PlainActionFuture; | ||
import org.elasticsearch.client.Response; | ||
import org.elasticsearch.cluster.metadata.IndexMetaData; | ||
import org.elasticsearch.common.settings.Settings; | ||
import org.elasticsearch.common.util.concurrent.AbstractRunnable; | ||
import org.elasticsearch.test.rest.ESRestTestCase; | ||
import org.elasticsearch.test.rest.yaml.ObjectPath; | ||
|
||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.concurrent.Future; | ||
import java.util.function.Predicate; | ||
|
||
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomAsciiOfLength; | ||
import static java.util.Collections.emptyMap; | ||
import static org.elasticsearch.cluster.routing.UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING; | ||
import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE_SETTING; | ||
import static org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider.SETTING_ALLOCATION_MAX_RETRY; | ||
import static org.hamcrest.Matchers.equalTo; | ||
import static org.hamcrest.Matchers.hasSize; | ||
import static org.hamcrest.Matchers.notNullValue; | ||
|
||
public abstract class AbstractRollingTestCase extends ESRestTestCase { | ||
protected enum ClusterType { | ||
OLD, | ||
MIXED, | ||
UPGRADED; | ||
|
||
public static ClusterType parse(String value) { | ||
switch (value) { | ||
case "old_cluster": | ||
return OLD; | ||
case "mixed_cluster": | ||
return MIXED; | ||
case "upgraded_cluster": | ||
return UPGRADED; | ||
default: | ||
throw new AssertionError("unknown cluster type: " + value); | ||
} | ||
} | ||
} | ||
|
||
protected static final ClusterType CLUSTER_TYPE = ClusterType.parse(System.getProperty("tests.rest.suite")); | ||
|
||
@Override | ||
protected final boolean preserveIndicesUponCompletion() { | ||
return true; | ||
} | ||
|
||
@Override | ||
protected final boolean preserveReposUponCompletion() { | ||
return true; | ||
} | ||
|
||
@Override | ||
protected final Settings restClientSettings() { | ||
return Settings.builder().put(super.restClientSettings()) | ||
// increase the timeout here to 90 seconds to handle long waits for a green | ||
// cluster health. the waits for green need to be longer than a minute to | ||
// account for delayed shards | ||
.put(ESRestTestCase.CLIENT_RETRY_TIMEOUT, "90s") | ||
.put(ESRestTestCase.CLIENT_SOCKET_TIMEOUT, "90s") | ||
.build(); | ||
} | ||
} |
Oops, something went wrong.