Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into feature/kerberos #31016

Merged
merged 58 commits into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
6e48066
Remove AllocatedPersistentTask.getState() (#30858)
tlrx May 29, 2018
89869a2
Improve allocation-disabling instructions (#30248)
DaveCTurner May 29, 2018
c137ad0
Replace several try-finally statements (#30880)
May 29, 2018
eaee530
Move list tasks under Tasks namespace (#30906)
javanna May 29, 2018
3c918d7
Deprecate accepting malformed requests in stored script API (#28939)
sohaibiftikhar May 29, 2018
bfa784e
Remove log traces in AzureStorageServiceImpl and fix test (#30924)
tlrx May 29, 2018
9e9abc3
Fix IndexTemplateMetaData parsing from xContent (#30917)
dnhatn May 29, 2018
6ce86a8
[DOCS] Reset edit links (#30909)
lcawl May 29, 2018
a8faf97
Limit the scope of BouncyCastle dependency (#30358)
jkakavas May 29, 2018
363f1e8
Upgrade to Lucene-7.4-snapshot-1cbadda4d3 (#30928)
dnhatn May 29, 2018
544822c
Moved keyword tokenizer to analysis-common module (#30642)
martijnvg May 29, 2018
ba8bb1d
[test] packaging test logging for suse distros
andyb-elastic May 29, 2018
ad0dc58
Fix location of AbstractHttpServerTransport (#30888)
Tim-Brooks May 29, 2018
4001097
[test] packaging: use shell when running commands (#30852)
andyb-elastic May 29, 2018
eb2e43b
[DOCS] Adds missing TLS settings for auditing (#30822)
lcawl May 29, 2018
116d083
stable filemode for zip distributions (#30854)
andyb-elastic May 30, 2018
a79c5bd
Minor clean-up in InternalRange. (#30886)
jtibshirani May 30, 2018
83a7ade
[DOCS] Remove reference to platinum Docker image (#30916)
May 30, 2018
bcfdcca
Use dedicated ML APIs in tests (#30941)
jasontedor May 30, 2018
913778b
Update the version checks around range bucket keys, now that the chan…
jtibshirani May 30, 2018
b5c997b
[DOCS] Fix watcher file location
lcawl May 30, 2018
a0af0e7
Rename methods in PersistentTasksService (#30837)
tlrx May 30, 2018
67905c8
Rename index_prefix to index_prefixes (#30932)
romseygeek May 30, 2018
e33d107
Add missing_bucket option in the composite agg (#29465)
jimczi May 30, 2018
ff8ce2c
Fsync state file before exposing it (#30929)
ywelsch May 30, 2018
6341d10
Fix AliasMetaData parsing (#30866)
olcbean May 30, 2018
3c21e46
Cross Cluster Search: do not use dedicated masters as gateways (#30926)
javanna May 30, 2018
f582418
Fix missing option serialization after backport
jimczi May 30, 2018
2c27c58
REST high-level client: add synced flush API (2) (#30650)
sohaibiftikhar May 30, 2018
7c5abc0
Fix synced flush docs
nik9000 May 30, 2018
1ea9f11
Change ScriptException status to 400 (bad request) (#30861)
May 30, 2018
532b91f
Fix composite agg serialization error
jimczi May 30, 2018
e852eb0
Revert accidentally pushed changes in NoriAnalysisTests
jimczi May 30, 2018
cdbbbaf
SQL: Remove log4j and joda from JDBC dependencies (#30938)
imotov May 30, 2018
94e1bdb
[DOCS] Fixes kibana security file location
lcawl May 30, 2018
96b4dae
[CI] Mute SamlAuthenticatorTests testIncorrectSigningKeyIsRejected
imotov May 30, 2018
b716b08
Add Verify Repository High Level REST API (#30934)
hub-cap May 30, 2018
facbb2b
Add “took” timing info to response for _msearch/template API (#30961)
markharwood May 30, 2018
b834254
Mute FlushIT tests
dnhatn May 30, 2018
1da26a4
[CI] Mute HttpSecretsIntegrationTests#testWebhookAction test
imotov May 30, 2018
0a5d46e
[Test] Prefer ArrayList over Vector (#30965)
May 30, 2018
735f232
Fix license on AcitveDirectorySIDUtil (#30972)
jasontedor May 30, 2018
8e4ab82
[CI] Mute Ml rolling upgrade tests
imotov May 31, 2018
c415743
Make AllocatedPersistentTask.isCompleted() protected (#30949)
tlrx May 31, 2018
0ff2c60
[CI] Mute Ml rolling upgrade test for mixed cluster too
droberts195 May 31, 2018
4777d8a
[Docs] Fix typo in Min Aggregation reference (#30899)
May 31, 2018
63f3a61
Refactor Sniffer and make it testable (#29638)
javanna May 31, 2018
0f5e570
Deprecates indexing and querying a context completion field without c…
jimczi May 31, 2018
46e8d97
Core: Remove RequestBuilder from Action (#30966)
rjernst May 31, 2018
532641e
Ensure intended key is selected in SamlAuthenticatorTests (#30993)
jkakavas May 31, 2018
3960a7a
[DOCS] Update readme for testing x-pack code snippets (#30696)
lcawl May 31, 2018
d826cb3
Remove version read/write logic in Verify Response (#30879)
hub-cap May 31, 2018
b225f5e
HLRest: Allow caller to set per request options (#30490)
nik9000 May 31, 2018
d9ab146
[DOCS] Clarify not all PKCS12 usable as truststores (#30750)
albertzaharovits May 31, 2018
4f66b9a
Transport client: Don't validate node in handshake (#30737)
Tim-Brooks May 31, 2018
cd0a375
Remove unused query methods from MappedFieldType. (#30987)
jtibshirani May 31, 2018
3004b9e
Reuse expiration date of trial licenses (#30950)
jkakavas May 31, 2018
283d1bb
Watcher: Give test a little more time
nik9000 May 31, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ Before submitting your changes, run the test suite to make sure that nothing is
./gradlew check
```

If your changes affect only the documentation, run:

```sh
./gradlew -p docs check
```
For more information about testing code examples in the documentation, see
https://github.com/elastic/elasticsearch/blob/master/docs/README.asciidoc

### Project layout

This repository is split into many top level directories. The most important
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
elasticsearch = 7.0.0-alpha1
lucene = 7.4.0-snapshot-cc2ee23050
lucene = 7.4.0-snapshot-1cbadda4d3

# optional dependencies
spatial4j = 0.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private static final class TransportBulkRequestExecutor implements BulkRequestEx

@Override
public boolean bulkIndex(List<String> bulkData) {
NoopBulkRequestBuilder builder = NoopBulkAction.INSTANCE.newRequestBuilder(client);
NoopBulkRequestBuilder builder = new NoopBulkRequestBuilder(client,NoopBulkAction.INSTANCE);
for (String bulkItem : bulkData) {
builder.add(new IndexRequest(indexName, typeName).source(bulkItem.getBytes(StandardCharsets.UTF_8), XContentType.JSON));
}
Expand Down Expand Up @@ -108,7 +108,7 @@ private TransportSearchRequestExecutor(TransportClient client, String indexName)
@Override
public boolean search(String source) {
final SearchResponse response;
NoopSearchRequestBuilder builder = NoopSearchAction.INSTANCE.newRequestBuilder(client);
NoopSearchRequestBuilder builder = new NoopSearchRequestBuilder(client, NoopSearchAction.INSTANCE);
try {
builder.setIndices(indexName);
builder.setQuery(QueryBuilders.wrapperQuery(source));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
import org.elasticsearch.action.Action;
import org.elasticsearch.action.bulk.BulkRequest;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.client.ElasticsearchClient;

public class NoopBulkAction extends Action<BulkRequest, BulkResponse, NoopBulkRequestBuilder> {
public class NoopBulkAction extends Action<BulkRequest, BulkResponse> {
public static final String NAME = "mock:data/write/bulk";

public static final NoopBulkAction INSTANCE = new NoopBulkAction();
Expand All @@ -32,11 +31,6 @@ private NoopBulkAction() {
super(NAME);
}

@Override
public NoopBulkRequestBuilder newRequestBuilder(ElasticsearchClient client) {
return new NoopBulkRequestBuilder(client, this);
}

@Override
public BulkResponse newResponse() {
return new BulkResponse(null, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentType;

public class NoopBulkRequestBuilder extends ActionRequestBuilder<BulkRequest, BulkResponse, NoopBulkRequestBuilder>
public class NoopBulkRequestBuilder extends ActionRequestBuilder<BulkRequest, BulkResponse>
implements WriteRequestBuilder<NoopBulkRequestBuilder> {

public NoopBulkRequestBuilder(ElasticsearchClient client, NoopBulkAction action) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,15 @@
import org.elasticsearch.action.Action;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.ElasticsearchClient;

public class NoopSearchAction extends Action<SearchRequest, SearchResponse, NoopSearchRequestBuilder> {
public class NoopSearchAction extends Action<SearchRequest, SearchResponse> {
public static final NoopSearchAction INSTANCE = new NoopSearchAction();
public static final String NAME = "mock:data/read/search";

public NoopSearchAction() {
super(NAME);
}

@Override
public NoopSearchRequestBuilder newRequestBuilder(ElasticsearchClient client) {
return new NoopSearchRequestBuilder(client, this);
}

@Override
public SearchResponse newResponse() {
return new SearchResponse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import java.util.Arrays;
import java.util.List;

public class NoopSearchRequestBuilder extends ActionRequestBuilder<SearchRequest, SearchResponse, NoopSearchRequestBuilder> {
public class NoopSearchRequestBuilder extends ActionRequestBuilder<SearchRequest, SearchResponse> {

public NoopSearchRequestBuilder(ElasticsearchClient client, NoopSearchAction action) {
super(client, action, new SearchRequest());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

import org.apache.http.Header;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksRequest;
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest;
import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse;
import org.elasticsearch.action.ingest.PutPipelineRequest;
Expand Down Expand Up @@ -68,28 +66,6 @@ public void putSettingsAsync(ClusterUpdateSettingsRequest clusterUpdateSettingsR
ClusterUpdateSettingsResponse::fromXContent, listener, emptySet(), headers);
}

/**
* Get current tasks using the Task Management API
* <p>
* See
* <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html"> Task Management API on elastic.co</a>
*/
public ListTasksResponse listTasks(ListTasksRequest request, Header... headers) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(request, RequestConverters::listTasks, ListTasksResponse::fromXContent,
emptySet(), headers);
}

/**
* Asynchronously get current tasks using the Task Management API
* <p>
* See
* <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html"> Task Management API on elastic.co</a>
*/
public void listTasksAsync(ListTasksRequest request, ActionListener<ListTasksResponse> listener, Header... headers) {
restHighLevelClient.performRequestAsyncAndParseEntity(request, RequestConverters::listTasks, ListTasksResponse::fromXContent,
listener, emptySet(), headers);
}

/**
* Add a pipeline or update an existing pipeline in the cluster
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse;
import org.elasticsearch.action.admin.indices.flush.FlushRequest;
import org.elasticsearch.action.admin.indices.flush.FlushResponse;
import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest;
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequest;
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeResponse;
import org.elasticsearch.action.admin.indices.get.GetIndexRequest;
Expand Down Expand Up @@ -269,6 +270,28 @@ public void flushAsync(FlushRequest flushRequest, ActionListener<FlushResponse>
listener, emptySet(), headers);
}

/** Initiate a synced flush manually using the synced flush API
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html">
* Synced flush API on elastic.co</a>
*/
public SyncedFlushResponse flushSynced(SyncedFlushRequest syncedFlushRequest, Header... headers) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(syncedFlushRequest, RequestConverters::flushSynced,
SyncedFlushResponse::fromXContent, emptySet(), headers);
}

/**
* Asynchronously initiate a synced flush manually using the synced flush API
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html">
* Synced flush API on elastic.co</a>
*/
public void flushSyncedAsync(SyncedFlushRequest syncedFlushRequest, ActionListener<SyncedFlushResponse> listener, Header... headers) {
restHighLevelClient.performRequestAsyncAndParseEntity(syncedFlushRequest, RequestConverters::flushSynced,
SyncedFlushResponse::fromXContent, listener, emptySet(), headers);
}


/**
* Retrieve the settings of one or more indices
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest;
import org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesRequest;
import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest;
import org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest;
import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest;
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest;
Expand All @@ -41,6 +42,7 @@
import org.elasticsearch.action.admin.indices.create.CreateIndexRequest;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.action.admin.indices.flush.FlushRequest;
import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest;
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequest;
import org.elasticsearch.action.admin.indices.get.GetIndexRequest;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest;
Expand Down Expand Up @@ -211,6 +213,14 @@ static Request flush(FlushRequest flushRequest) {
return request;
}

static Request flushSynced(SyncedFlushRequest syncedFlushRequest) {
String[] indices = syncedFlushRequest.indices() == null ? Strings.EMPTY_ARRAY : syncedFlushRequest.indices();
Request request = new Request(HttpPost.METHOD_NAME, endpoint(indices, "_flush/synced"));
Params parameters = new Params(request);
parameters.withIndicesOptions(syncedFlushRequest.indicesOptions());
return request;
}

static Request forceMerge(ForceMergeRequest forceMergeRequest) {
String[] indices = forceMergeRequest.indices() == null ? Strings.EMPTY_ARRAY : forceMergeRequest.indices();
Request request = new Request(HttpPost.METHOD_NAME, endpoint(indices, "_forcemerge"));
Expand Down Expand Up @@ -738,6 +748,19 @@ static Request deleteRepository(DeleteRepositoryRequest deleteRepositoryRequest)
return request;
}

static Request verifyRepository(VerifyRepositoryRequest verifyRepositoryRequest) {
String endpoint = new EndpointBuilder().addPathPartAsIs("_snapshot")
.addPathPart(verifyRepositoryRequest.name())
.addPathPartAsIs("_verify")
.build();
Request request = new Request(HttpPost.METHOD_NAME, endpoint);

Params parameters = new Params(request);
parameters.withMasterTimeout(verifyRepositoryRequest.masterNodeTimeout());
parameters.withTimeout(verifyRepositoryRequest.timeout());
return request;
}

static Request putTemplate(PutIndexTemplateRequest putIndexTemplateRequest) throws IOException {
String endpoint = new EndpointBuilder().addPathPartAsIs("_template").addPathPart(putIndexTemplateRequest.name()).build();
Request request = new Request(HttpPut.METHOD_NAME, endpoint);
Expand Down
Loading