diff --git a/core/src/main/java/org/elasticsearch/action/DocWriteResponse.java b/core/src/main/java/org/elasticsearch/action/DocWriteResponse.java index fa3b16ef0d579..69ba6db63ef07 100644 --- a/core/src/main/java/org/elasticsearch/action/DocWriteResponse.java +++ b/core/src/main/java/org/elasticsearch/action/DocWriteResponse.java @@ -60,7 +60,7 @@ public abstract class DocWriteResponse extends ReplicationResponse implements Wr private static final String FORCED_REFRESH = "forced_refresh"; /** - * An enum that represents the the results of CRUD operations, primarily used to communicate the type of + * An enum that represents the results of CRUD operations, primarily used to communicate the type of * operation that occurred. */ public enum Result implements Writeable { diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/list/ListTasksResponse.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/list/ListTasksResponse.java index a203dd35b47ff..de5fcf9345d23 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/list/ListTasksResponse.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/list/ListTasksResponse.java @@ -110,7 +110,7 @@ private void buildTaskGroups() { // we found parent in the list of tasks - add it to the parent list parentTask.addGroup(taskGroup); } else { - // we got zombie or the parent was filtered out - add it to the the top task list + // we got zombie or the parent was filtered out - add it to the top task list topLevelTasks.add(taskGroup); } } else { diff --git a/core/src/main/java/org/elasticsearch/action/support/AutoCreateIndex.java b/core/src/main/java/org/elasticsearch/action/support/AutoCreateIndex.java index 2e442e2cc141c..d834d80338432 100644 --- a/core/src/main/java/org/elasticsearch/action/support/AutoCreateIndex.java +++ b/core/src/main/java/org/elasticsearch/action/support/AutoCreateIndex.java @@ -64,7 +64,7 @@ public boolean needToCheck() { /** * Should the index be auto created? - * @throws IndexNotFoundException if the the index doesn't exist and shouldn't be auto created + * @throws IndexNotFoundException if the index doesn't exist and shouldn't be auto created */ public boolean shouldAutoCreate(String index, ClusterState state) { if (resolver.hasIndexOrAlias(index, state)) { diff --git a/core/src/main/java/org/elasticsearch/action/support/replication/ReplicationOperation.java b/core/src/main/java/org/elasticsearch/action/support/replication/ReplicationOperation.java index f28beed1d7fac..1b4fd20140dad 100644 --- a/core/src/main/java/org/elasticsearch/action/support/replication/ReplicationOperation.java +++ b/core/src/main/java/org/elasticsearch/action/support/replication/ReplicationOperation.java @@ -343,7 +343,7 @@ public interface Primary< public interface Replicas> { /** - * Performs the the specified request on the specified replica. + * Performs the specified request on the specified replica. * * @param replica the shard this request should be executed on * @param replicaRequest the operation to perform diff --git a/core/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java b/core/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java index 283982446dd08..7940fe1bc7045 100644 --- a/core/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java +++ b/core/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java @@ -270,7 +270,7 @@ public String getId() { } /** - * The unique ephemeral id of the node. Ephemeral ids are meant to be attached the the life span + * The unique ephemeral id of the node. Ephemeral ids are meant to be attached the life span * of a node process. When ever a node is restarted, it's ephemeral id is required to change (while it's {@link #getId()} * will be read from the data folder and will remain the same across restarts). Since all node attributes and addresses * are maintained during the life span of a node process, we can (and are) using the ephemeralId in diff --git a/core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java b/core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java index 4376980eca8a9..f8d42b3d8f5a0 100644 --- a/core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java +++ b/core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java @@ -44,9 +44,7 @@ import java.util.Locale; import java.util.Map; import java.util.Optional; -import java.util.OptionalDouble; import java.util.Set; -import java.util.stream.Collectors; import static java.util.Collections.emptyMap; @@ -402,7 +400,7 @@ private static class NodeRankComparator implements Comparator { @Override public int compare(ShardRouting s1, ShardRouting s2) { if (s1.currentNodeId().equals(s2.currentNodeId())) { - // these shards on the the same node + // these shards on the same node return 0; } Double shard1rank = nodeRanks.get(s1.currentNodeId()); diff --git a/core/src/main/java/org/elasticsearch/common/xcontent/XContentParserUtils.java b/core/src/main/java/org/elasticsearch/common/xcontent/XContentParserUtils.java index e28b44b42c5a2..77d62f8d3095a 100644 --- a/core/src/main/java/org/elasticsearch/common/xcontent/XContentParserUtils.java +++ b/core/src/main/java/org/elasticsearch/common/xcontent/XContentParserUtils.java @@ -39,7 +39,7 @@ private XContentParserUtils() { } /** - * Makes sure that current token is of type {@link XContentParser.Token#FIELD_NAME} and the the field name is equal to the provided one + * Makes sure that current token is of type {@link XContentParser.Token#FIELD_NAME} and the field name is equal to the provided one * @throws ParsingException if the token is not of type {@link XContentParser.Token#FIELD_NAME} or is not equal to the given field name */ public static void ensureFieldName(XContentParser parser, Token token, String fieldName) throws IOException { diff --git a/core/src/main/java/org/elasticsearch/index/engine/VersionValue.java b/core/src/main/java/org/elasticsearch/index/engine/VersionValue.java index 1c2fa3005207d..f3d9618838f7b 100644 --- a/core/src/main/java/org/elasticsearch/index/engine/VersionValue.java +++ b/core/src/main/java/org/elasticsearch/index/engine/VersionValue.java @@ -34,7 +34,7 @@ class VersionValue implements Accountable { /** the seq number of the operation that last changed the associated uuid */ final long seqNo; - /** the the term of the operation that last changed the associated uuid */ + /** the term of the operation that last changed the associated uuid */ final long term; VersionValue(long version, long seqNo, long term) { diff --git a/core/src/main/java/org/elasticsearch/index/seqno/SeqNoStats.java b/core/src/main/java/org/elasticsearch/index/seqno/SeqNoStats.java index 6c420d64d84be..9c1795d654ccc 100644 --- a/core/src/main/java/org/elasticsearch/index/seqno/SeqNoStats.java +++ b/core/src/main/java/org/elasticsearch/index/seqno/SeqNoStats.java @@ -22,7 +22,6 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; -import org.elasticsearch.common.xcontent.ToXContent.Params; import org.elasticsearch.common.xcontent.ToXContentFragment; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -42,7 +41,7 @@ public class SeqNoStats implements ToXContentFragment, Writeable { public SeqNoStats(long maxSeqNo, long localCheckpoint, long globalCheckpoint) { assert localCheckpoint <= maxSeqNo: "local checkpoint [" + localCheckpoint + "] is above maximum seq no [" + maxSeqNo + "]"; - // note that the the global checkpoint can be higher from both maxSeqNo and localCheckpoint + // note that the global checkpoint can be higher from both maxSeqNo and localCheckpoint // as we use this stats object to describe lucene commits as well as live statistic. this.maxSeqNo = maxSeqNo; this.localCheckpoint = localCheckpoint; diff --git a/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java b/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java index 9845064c4df4a..34ed1b4ce9e35 100644 --- a/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java +++ b/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java @@ -609,6 +609,7 @@ private void verifyRelocatingState() { } } + @Override public IndexShardState state() { return state; } @@ -1346,6 +1347,7 @@ public RecoveryStats recoveryStats() { * Returns the current {@link RecoveryState} if this shard is recovering or has been recovering. * Returns null if the recovery has not yet started or shard was not recovered (created via an API). */ + @Override public RecoveryState recoveryState() { return this.recoveryState; } @@ -1757,7 +1759,7 @@ public void updateGlobalCheckpointOnReplica(final long globalCheckpoint, final S * case that the global checkpoint update from the primary is ahead of the local checkpoint on this shard. In this case, we * ignore the global checkpoint update. This can happen if we are in the translog stage of recovery. Prior to this, the engine * is not opened and this shard will not receive global checkpoint updates, and after this the shard will be contributing to - * calculations of the the global checkpoint. However, we can not assert that we are in the translog stage of recovery here as + * calculations of the global checkpoint. However, we can not assert that we are in the translog stage of recovery here as * while the global checkpoint update may have emanated from the primary when we were in that state, we could subsequently move * to recovery finalization, or even finished recovery before the update arrives here. */ diff --git a/core/src/main/java/org/elasticsearch/index/shard/IndexShardOperationPermits.java b/core/src/main/java/org/elasticsearch/index/shard/IndexShardOperationPermits.java index ac3459b78e9a3..3f6d443aa8009 100644 --- a/core/src/main/java/org/elasticsearch/index/shard/IndexShardOperationPermits.java +++ b/core/src/main/java/org/elasticsearch/index/shard/IndexShardOperationPermits.java @@ -183,7 +183,7 @@ private void releaseDelayedOperations() { * - blockOperations can be called on a recovery thread which can be expected to be interrupted when recovery is cancelled; * interruptions are bad here as permit acquisition will throw an interrupted exception which will be swallowed by * the threaded action listener if the queue of the thread pool on which it submits is full - * - if a permit is acquired and the queue of the thread pool which the the threaded action listener uses is full, the + * - if a permit is acquired and the queue of the thread pool which the threaded action listener uses is full, the * onFailure handler is executed on the calling thread; this should not be the recovery thread as it would delay the * recovery */ diff --git a/core/src/main/java/org/elasticsearch/script/ScriptService.java b/core/src/main/java/org/elasticsearch/script/ScriptService.java index 2998041d8a374..652ec3dda3d29 100644 --- a/core/src/main/java/org/elasticsearch/script/ScriptService.java +++ b/core/src/main/java/org/elasticsearch/script/ScriptService.java @@ -272,7 +272,7 @@ public FactoryType compile(Script script, ScriptContext The version is optional, but useful in certain cases. We can ensure that we are trying to percolate the document we just have indexed. A change may be made after we have indexed, and if that is the -case the then the search request would fail with a version conflict error. +case the search request would fail with a version conflict error. The search response returned is identical as in the previous example. diff --git a/docs/reference/setup/upgrade/upgrade-node.asciidoc b/docs/reference/setup/upgrade/upgrade-node.asciidoc index 67b877cebc6f0..db9d352e83184 100644 --- a/docs/reference/setup/upgrade/upgrade-node.asciidoc +++ b/docs/reference/setup/upgrade/upgrade-node.asciidoc @@ -9,7 +9,7 @@ To upgrade using a zip or compressed tarball: .. Extract the zip or tarball to a _new_ directory. This is critical if you are not using external `config` and `data` directories. -.. Set the the `ES_PATH_CONF` environment variable to specify the location of +.. Set the `ES_PATH_CONF` environment variable to specify the location of your external `config` directory and `jvm.options` file. If you are not using an external `config` directory, copy your old configuration over to the new installation. diff --git a/modules/tribe/src/test/java/org/elasticsearch/tribe/TribeIntegrationTests.java b/modules/tribe/src/test/java/org/elasticsearch/tribe/TribeIntegrationTests.java index cd86d7216a74a..9957ad6bae9ee 100644 --- a/modules/tribe/src/test/java/org/elasticsearch/tribe/TribeIntegrationTests.java +++ b/modules/tribe/src/test/java/org/elasticsearch/tribe/TribeIntegrationTests.java @@ -110,7 +110,7 @@ public class TribeIntegrationTests extends ESIntegTestCase { private static final Predicate CLUSTER2_ONLY = c -> c.getClusterName().equals(cluster2.getClusterName()); /** - * A predicate that is used to select the the two remote clusters + * A predicate that is used to select the two remote clusters **/ private static final Predicate ALL = c -> true; diff --git a/plugins/discovery-gce/src/main/java/org/elasticsearch/cloud/gce/GceInstancesService.java b/plugins/discovery-gce/src/main/java/org/elasticsearch/cloud/gce/GceInstancesService.java index 6f7313051fea2..4c90fd5c3731b 100644 --- a/plugins/discovery-gce/src/main/java/org/elasticsearch/cloud/gce/GceInstancesService.java +++ b/plugins/discovery-gce/src/main/java/org/elasticsearch/cloud/gce/GceInstancesService.java @@ -65,7 +65,7 @@ public interface GceInstancesService { /** * cloud.gce.max_wait: How long exponential backoff should retry before definitely failing. - * It's a total time since the the initial call is made. + * It's a total time since the initial call is made. * A negative value will retry indefinitely. Defaults to `-1s` (retry indefinitely). */ Setting MAX_WAIT_SETTING = diff --git a/plugins/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/GeoIpProcessorFactoryTests.java b/plugins/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/GeoIpProcessorFactoryTests.java index 3904b043a5255..d76056cac3563 100644 --- a/plugins/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/GeoIpProcessorFactoryTests.java +++ b/plugins/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/GeoIpProcessorFactoryTests.java @@ -231,7 +231,7 @@ public void testLazyLoading() throws Exception { Files.copy(new ByteArrayInputStream(StreamsUtils.copyToBytesFromClasspath("/GeoLite2-Country.mmdb.gz")), geoIpConfigDir.resolve("GeoLite2-Country.mmdb.gz")); - // Loading another database reader instances, because otherwise we can't test lazy loading as the the + // Loading another database reader instances, because otherwise we can't test lazy loading as the // database readers used at class level are reused between tests. (we want to keep that otherwise running this // test will take roughly 4 times more time) Map databaseReaders = diff --git a/qa/vagrant/src/test/resources/packaging/utils/utils.bash b/qa/vagrant/src/test/resources/packaging/utils/utils.bash index 58d49558b1be0..dc5238d03f46b 100644 --- a/qa/vagrant/src/test/resources/packaging/utils/utils.bash +++ b/qa/vagrant/src/test/resources/packaging/utils/utils.bash @@ -1,6 +1,6 @@ #!/bin/bash -# This file contains some utilities to test the the .deb/.rpm +# This file contains some utilities to test the .deb/.rpm # packages and the SysV/Systemd scripts. # WARNING: This testing file must be executed as root and can diff --git a/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java b/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java index 0979cfbfea2b7..c94e9aa46a689 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java +++ b/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java @@ -20,6 +20,7 @@ package org.elasticsearch.test.transport; import com.carrotsearch.randomizedtesting.SysGlobals; + import org.elasticsearch.Version; import org.elasticsearch.cluster.ClusterModule; import org.elasticsearch.cluster.node.DiscoveryNode; @@ -126,7 +127,7 @@ public static MockTransportService createNewService(Settings settings, Transport /** * Build the service. * - * @param clusterSettings if non null the the {@linkplain TransportService} will register with the {@link ClusterSettings} for settings + * @param clusterSettings if non null the {@linkplain TransportService} will register with the {@link ClusterSettings} for settings * updates for {@link #TRACE_LOG_EXCLUDE_SETTING} and {@link #TRACE_LOG_INCLUDE_SETTING}. */ public MockTransportService(Settings settings, Transport transport, ThreadPool threadPool, TransportInterceptor interceptor, @@ -139,7 +140,7 @@ public MockTransportService(Settings settings, Transport transport, ThreadPool t /** * Build the service. * - * @param clusterSettings if non null the the {@linkplain TransportService} will register with the {@link ClusterSettings} for settings + * @param clusterSettings if non null the {@linkplain TransportService} will register with the {@link ClusterSettings} for settings * updates for {@link #TRACE_LOG_EXCLUDE_SETTING} and {@link #TRACE_LOG_INCLUDE_SETTING}. */ public MockTransportService(Settings settings, Transport transport, ThreadPool threadPool, TransportInterceptor interceptor, @@ -345,7 +346,7 @@ public void addUnresponsiveRule(TransportAddress transportAddress, final TimeVal final long startTime = System.currentTimeMillis(); addDelegate(transportAddress, new ClearableTransport(original) { - private final Queue requestsToSendWhenCleared = new LinkedBlockingDeque(); + private final Queue requestsToSendWhenCleared = new LinkedBlockingDeque<>(); private boolean cleared = false; TimeValue getDelay() {