From b83e14858a920a55681249eb0b3e3249724c39c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= <10398885+cbuescher@users.noreply.github.com> Date: Thu, 7 Dec 2017 16:39:23 +0100 Subject: [PATCH] Correcting some minor typos in comments --- .../action/search/TransportMultiSearchAction.java | 4 ++-- .../main/java/org/elasticsearch/indices/IndicesService.java | 2 +- .../java/org/elasticsearch/percolator/QueryAnalyzer.java | 2 +- .../org/elasticsearch/index/shard/IndexShardTestCase.java | 5 ++--- .../org/elasticsearch/test/disruption/LongGCDisruption.java | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/search/TransportMultiSearchAction.java b/core/src/main/java/org/elasticsearch/action/search/TransportMultiSearchAction.java index 371314b990c41..16d1deee1f9df 100644 --- a/core/src/main/java/org/elasticsearch/action/search/TransportMultiSearchAction.java +++ b/core/src/main/java/org/elasticsearch/action/search/TransportMultiSearchAction.java @@ -71,7 +71,7 @@ public TransportMultiSearchAction(Settings settings, ThreadPool threadPool, Tran @Override protected void doExecute(MultiSearchRequest request, ActionListener listener) { final long relativeStartTime = relativeTimeProvider.getAsLong(); - + ClusterState clusterState = clusterService.state(); clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ); @@ -130,7 +130,7 @@ void executeSearch( * of concurrent requests. At first glance, it appears that we should never poll from the queue and not obtain a request given * that we only poll here no more times than the number of requests. However, this is not the only consumer of this queue as * earlier requests that have already completed will poll from the queue too and they could complete before later polls are - * invoked here. Thus, it can be the case that we poll here and and the queue was empty. + * invoked here. Thus, it can be the case that we poll here and the queue was empty. */ return; } diff --git a/core/src/main/java/org/elasticsearch/indices/IndicesService.java b/core/src/main/java/org/elasticsearch/indices/IndicesService.java index e6f3007a799f9..314b46b4d08e0 100644 --- a/core/src/main/java/org/elasticsearch/indices/IndicesService.java +++ b/core/src/main/java/org/elasticsearch/indices/IndicesService.java @@ -1268,7 +1268,7 @@ public void clearIndexShardCache(ShardId shardId, boolean queryCache, boolean fi /** * Returns a function which given an index name, returns a predicate which fields must match in order to be returned by get mappings, * get index, get field mappings and field capabilities API. Useful to filter the fields that such API return. - * The predicate receives the the field name as input argument. In case multiple plugins register a field filter through + * The predicate receives the field name as input argument. In case multiple plugins register a field filter through * {@link org.elasticsearch.plugins.MapperPlugin#getFieldFilter()}, only fields that match all the registered filters will be * returned by get mappings, get index, get field mappings and field capabilities API. */ diff --git a/modules/percolator/src/main/java/org/elasticsearch/percolator/QueryAnalyzer.java b/modules/percolator/src/main/java/org/elasticsearch/percolator/QueryAnalyzer.java index 940f9ebab5a9a..284eca1b59abe 100644 --- a/modules/percolator/src/main/java/org/elasticsearch/percolator/QueryAnalyzer.java +++ b/modules/percolator/src/main/java/org/elasticsearch/percolator/QueryAnalyzer.java @@ -366,7 +366,7 @@ private static BiFunction booleanQuery() { // positives for percolator queries with range queries than term based queries. // The is because the way number fields are extracted from the document to be percolated. // Per field a single range is extracted and if a percolator query has two or more range queries - // on the same field than the the minimum should match can be higher than clauses in the CoveringQuery. + // on the same field, then the minimum should match can be higher than clauses in the CoveringQuery. // Therefore right now the minimum should match is incremented once per number field when processing // the percolator query at index time. if (seenRangeFields.add(t[0].range.fieldName)) { diff --git a/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java b/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java index 4c3e3fb7b482b..6e8eefa929780 100644 --- a/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java @@ -67,7 +67,6 @@ import org.elasticsearch.index.store.Store; import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService; -import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; import org.elasticsearch.indices.recovery.RecoveryFailedException; import org.elasticsearch.indices.recovery.RecoverySourceHandler; @@ -309,7 +308,7 @@ protected IndexShard newShard(ShardRouting routing, ShardPath shardPath, IndexMe } /** - * Takes an existing shard, closes it and and starts a new initialing shard at the same location + * Takes an existing shard, closes it and starts a new initialing shard at the same location * * @param listeners new listerns to use for the newly created shard */ @@ -321,7 +320,7 @@ protected IndexShard reinitShard(IndexShard current, IndexingOperationListener.. } /** - * Takes an existing shard, closes it and and starts a new initialing shard at the same location + * Takes an existing shard, closes it and starts a new initialing shard at the same location * * @param routing the shard routing to use for the newly created shard. * @param listeners new listerns to use for the newly created shard diff --git a/test/framework/src/main/java/org/elasticsearch/test/disruption/LongGCDisruption.java b/test/framework/src/main/java/org/elasticsearch/test/disruption/LongGCDisruption.java index deebb4f53c124..06dca1f643842 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/disruption/LongGCDisruption.java +++ b/test/framework/src/main/java/org/elasticsearch/test/disruption/LongGCDisruption.java @@ -72,7 +72,7 @@ public synchronized void startDisrupting() { assert isDisruptedNodeThread(currentThreadName) == false : "current thread match pattern. thread name: " + currentThreadName + ", node: " + disruptedNode; // we spawn a background thread to protect against deadlock which can happen - // if there are shared resources between caller thread and and suspended threads + // if there are shared resources between caller thread and suspended threads // see unsafeClasses to how to avoid that final AtomicReference suspendingError = new AtomicReference<>(); final Thread suspendingThread = new Thread(new AbstractRunnable() {