Merge branch 'pr/16649'
This PR fixes a bunch of typos across the code base.
This commit is contained in:
commit
9e473c98c6
|
@ -62,7 +62,7 @@ public class FieldStatsRequest extends BroadcastRequest<FieldStatsRequest> {
|
|||
|
||||
public void setIndexConstraints(IndexConstraint[] indexConstraints) {
|
||||
if (indexConstraints == null) {
|
||||
throw new NullPointerException("specified index_contraints can't be null");
|
||||
throw new NullPointerException("specified index_constraints can't be null");
|
||||
}
|
||||
this.indexConstraints = indexConstraints;
|
||||
}
|
||||
|
|
|
@ -366,7 +366,7 @@ public class IndexShardRoutingTable implements Iterable<ShardRouting> {
|
|||
}
|
||||
}
|
||||
if (ordered.isEmpty()) {
|
||||
throw new IllegalArgumentException("No data node with critera [" + nodeAttribute + "] found");
|
||||
throw new IllegalArgumentException("No data node with criteria [" + nodeAttribute + "] found");
|
||||
}
|
||||
return new PlainShardIterator(shardId, ordered);
|
||||
}
|
||||
|
|
|
@ -458,7 +458,7 @@ public class RoutingNodes implements Iterable<RoutingNode> {
|
|||
*/
|
||||
public void started(ShardRouting shard) {
|
||||
ensureMutable();
|
||||
assert !shard.active() : "expected an intializing shard " + shard;
|
||||
assert !shard.active() : "expected an initializing shard " + shard;
|
||||
if (shard.relocatingNodeId() == null) {
|
||||
// if this is not a target shard for relocation, we need to update statistics
|
||||
inactiveShardCount--;
|
||||
|
|
|
@ -715,7 +715,7 @@ public class BalancedShardsAllocator extends AbstractComponent implements Shards
|
|||
}
|
||||
}
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("No eligable node found to assign shard [{}] decision [{}]", shard, decision.type());
|
||||
logger.trace("No eligible node found to assign shard [{}] decision [{}]", shard, decision.type());
|
||||
}
|
||||
} else if (logger.isTraceEnabled()) {
|
||||
logger.trace("No Node found to assign shard [{}]", shard);
|
||||
|
|
|
@ -154,7 +154,7 @@ public final class IndexModule {
|
|||
*/
|
||||
public void addIndexStore(String type, BiFunction<IndexSettings, IndexStoreConfig, IndexStore> provider) {
|
||||
if (storeTypes.containsKey(type)) {
|
||||
throw new IllegalArgumentException("key [" + type +"] already registerd");
|
||||
throw new IllegalArgumentException("key [" + type +"] already registered");
|
||||
}
|
||||
storeTypes.put(type, provider);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class CommonGramsTokenFilterFactory extends AbstractTokenFilterFactory {
|
|||
this.words = Analysis.parseCommonWords(env, settings, null, ignoreCase);
|
||||
|
||||
if (this.words == null) {
|
||||
throw new IllegalArgumentException("mising or empty [common_words] or [common_words_path] configuration for common_grams token filter");
|
||||
throw new IllegalArgumentException("missing or empty [common_words] or [common_words_path] configuration for common_grams token filter");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ public class MultiMatchQueryBuilder extends AbstractQueryBuilder<MultiMatchQuery
|
|||
throw new IllegalArgumentException("[" + NAME + "] requires query value");
|
||||
}
|
||||
if (fields == null) {
|
||||
throw new IllegalArgumentException("[" + NAME + "] requires fields at initalization time");
|
||||
throw new IllegalArgumentException("[" + NAME + "] requires fields at initialization time");
|
||||
}
|
||||
this.value = value;
|
||||
this.fieldsBoosts = new TreeMap<>();
|
||||
|
|
|
@ -38,7 +38,7 @@ public abstract class BaseTranslogReader implements Comparable<BaseTranslogReade
|
|||
protected final long firstOperationOffset;
|
||||
|
||||
public BaseTranslogReader(long generation, FileChannel channel, Path path, long firstOperationOffset) {
|
||||
assert Translog.parseIdFromFileName(path) == generation : "generation missmatch. Path: " + Translog.parseIdFromFileName(path) + " but generation: " + generation;
|
||||
assert Translog.parseIdFromFileName(path) == generation : "generation mismatch. Path: " + Translog.parseIdFromFileName(path) + " but generation: " + generation;
|
||||
|
||||
this.generation = generation;
|
||||
this.path = path;
|
||||
|
|
|
@ -102,7 +102,7 @@ public class RestAnalyzeAction extends BaseRestHandler {
|
|||
public static void buildFromContent(BytesReference content, AnalyzeRequest analyzeRequest, ParseFieldMatcher parseFieldMatcher) {
|
||||
try (XContentParser parser = XContentHelper.createParser(content)) {
|
||||
if (parser.nextToken() != XContentParser.Token.START_OBJECT) {
|
||||
throw new IllegalArgumentException("Malforrmed content, must start with an object");
|
||||
throw new IllegalArgumentException("Malformed content, must start with an object");
|
||||
} else {
|
||||
XContentParser.Token token;
|
||||
String currentFieldName = null;
|
||||
|
|
|
@ -87,7 +87,7 @@ public class RestSearchScrollAction extends BaseRestHandler {
|
|||
public static void buildFromContent(BytesReference content, SearchScrollRequest searchScrollRequest) {
|
||||
try (XContentParser parser = XContentHelper.createParser(content)) {
|
||||
if (parser.nextToken() != XContentParser.Token.START_OBJECT) {
|
||||
throw new IllegalArgumentException("Malforrmed content, must start with an object");
|
||||
throw new IllegalArgumentException("Malformed content, must start with an object");
|
||||
} else {
|
||||
XContentParser.Token token;
|
||||
String currentFieldName = null;
|
||||
|
|
|
@ -199,7 +199,7 @@ public class AggregatorFactories {
|
|||
List<PipelineAggregatorBuilder<?>> orderedPipelineAggregators, List<PipelineAggregatorBuilder<?>> unmarkedBuilders,
|
||||
Set<PipelineAggregatorBuilder<?>> temporarilyMarked, PipelineAggregatorBuilder<?> builder) {
|
||||
if (temporarilyMarked.contains(builder)) {
|
||||
throw new IllegalArgumentException("Cyclical dependancy found with pipeline aggregator [" + builder.getName() + "]");
|
||||
throw new IllegalArgumentException("Cyclical dependency found with pipeline aggregator [" + builder.getName() + "]");
|
||||
} else if (unmarkedBuilders.contains(builder)) {
|
||||
temporarilyMarked.add(builder);
|
||||
String[] bucketsPaths = builder.getBucketsPaths();
|
||||
|
|
|
@ -228,7 +228,7 @@ public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFac
|
|||
metaData);
|
||||
}
|
||||
|
||||
throw new AggregationExecutionException("sigfnificant_terms aggregation cannot be applied to field ["
|
||||
throw new AggregationExecutionException("significant_terms aggregation cannot be applied to field ["
|
||||
+ config.fieldContext().field() + "]. It can only be applied to numeric or string fields.");
|
||||
}
|
||||
|
||||
|
|
|
@ -150,9 +150,9 @@ public class BulkRequestTests extends ESTestCase {
|
|||
BulkRequest bulkRequest = new BulkRequest();
|
||||
try {
|
||||
bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, null);
|
||||
fail("should have thrown an exception about the unknown paramater _foo");
|
||||
fail("should have thrown an exception about the unknown parameter _foo");
|
||||
} catch (IllegalArgumentException e) {
|
||||
assertThat("message contains error about the unknown paramater _foo: " + e.getMessage(),
|
||||
assertThat("message contains error about the unknown parameter _foo: " + e.getMessage(),
|
||||
e.getMessage().contains("Action/metadata line [3] contains an unknown parameter [_foo]"), equalTo(true));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -674,7 +674,7 @@ public class IndexNameExpressionResolverTests extends ESTestCase {
|
|||
} else {
|
||||
try {
|
||||
indexNameExpressionResolver.concreteIndices(context, "Foo*");
|
||||
fail("expecting exeption when result empty and allowNoIndicec=false");
|
||||
fail("expecting exception when result empty and allowNoIndicec=false");
|
||||
} catch (IndexNotFoundException e) {
|
||||
// expected exception
|
||||
}
|
||||
|
|
|
@ -713,7 +713,7 @@ public class ClusterRebalanceRoutingTests extends ESAllocationTestCase {
|
|||
assertThat(routingTable.index("test1").shard(i).primaryShard().state(), equalTo(INITIALIZING));
|
||||
}
|
||||
|
||||
logger.debug("now start initializing shards and expect exactly one rebalance from node1 to node 2 sicne index [test] is all on node1");
|
||||
logger.debug("now start initializing shards and expect exactly one rebalance from node1 to node 2 since index [test] is all on node1");
|
||||
|
||||
routingNodes = clusterState.getRoutingNodes();
|
||||
routingTable = strategy.applyStartedShards(clusterState, routingNodes.shardsWithState("test1", INITIALIZING)).routingTable();
|
||||
|
|
|
@ -181,7 +181,7 @@ public class RebalanceAfterActiveTests extends ESAllocationTestCase {
|
|||
}
|
||||
|
||||
|
||||
logger.info("complete relocation, thats it!");
|
||||
logger.info("complete relocation, that's it!");
|
||||
routingNodes = clusterState.getRoutingNodes();
|
||||
prevRoutingTable = routingTable;
|
||||
routingTable = strategy.applyStartedShards(clusterState, routingNodes.shardsWithState(INITIALIZING)).routingTable();
|
||||
|
|
|
@ -112,7 +112,7 @@ public class PendingClusterStatesQueueTests extends ESTestCase {
|
|||
for (ClusterStateContext context : queue.pendingStates) {
|
||||
final String pendingMaster = context.state.nodes().masterNodeId();
|
||||
assertThat("found a cluster state from [" + pendingMaster
|
||||
+ "], after a state from [" + processedMaster + "] was proccessed",
|
||||
+ "], after a state from [" + processedMaster + "] was processed",
|
||||
pendingMaster, equalTo(processedMaster));
|
||||
}
|
||||
// and check all committed contexts from another master were failed
|
||||
|
|
|
@ -156,7 +156,7 @@ public class SimpleDateMappingTests extends ESSingleNodeTestCase {
|
|||
.startObject()
|
||||
.field("date_field_en", "Wed, 06 Dec 2000 02:55:00 -0800")
|
||||
.field("date_field_de", "Mi, 06 Dez 2000 02:55:00 -0800")
|
||||
.field("date_field_default", "Wed, 06 Dec 2000 02:55:00 -0800") // check default - no exception is a successs!
|
||||
.field("date_field_default", "Wed, 06 Dec 2000 02:55:00 -0800") // check default - no exception is a success!
|
||||
.endObject()
|
||||
.bytes());
|
||||
assertNumericTokensEqual(doc, defaultMapper, "date_field_en", "date_field_de");
|
||||
|
|
|
@ -525,7 +525,7 @@ public class SimpleIndexTemplateIT extends ESIntegTestCase {
|
|||
|
||||
try {
|
||||
createIndex("test");
|
||||
fail("index creation should have failed due to alias with existing index name in mathching index template");
|
||||
fail("index creation should have failed due to alias with existing index name in matching index template");
|
||||
} catch(InvalidAliasNameException e) {
|
||||
assertThat(e.getMessage(), equalTo("Invalid alias name [index], an index exists with the same name as the alias"));
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ public class NettyTransportIT extends ESIntegTestCase {
|
|||
assertThat(clusterIndexHealths.getStatus(), is(ClusterHealthStatus.GREEN));
|
||||
try {
|
||||
transportClient.filterWithHeader(Collections.singletonMap("ERROR", "MY MESSAGE")).admin().cluster().prepareHealth().get();
|
||||
fail("Expected exception, but didnt happen");
|
||||
fail("Expected exception, but didn't happen");
|
||||
} catch (ElasticsearchException e) {
|
||||
assertThat(e.getMessage(), containsString("MY MESSAGE"));
|
||||
assertThat(channelProfileName, is(TransportSettings.DEFAULT_PROFILE));
|
||||
|
|
Loading…
Reference in New Issue