Skip to content

Commit

Permalink
Merge remote-tracking branch 'elastic/master' into async-bulk-action
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed Mar 22, 2019
2 parents 8df5f96 + 2c825fd commit b47e5f7
Show file tree
Hide file tree
Showing 396 changed files with 12,284 additions and 8,664 deletions.
2 changes: 1 addition & 1 deletion .ci/java-versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# build and test Elasticsearch for this branch. Valid Java versions
# are 'java' or 'openjdk' followed by the major release number.

ES_BUILD_JAVA=java11
ES_BUILD_JAVA=openjdk12
ES_RUNTIME_JAVA=java8
GRADLE_TASK=build

1 change: 0 additions & 1 deletion .ci/matrix-build-javas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
# or 'openjdk' followed by the major release number.

ES_BUILD_JAVA:
- java11
- openjdk12
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ Contributing to the Elasticsearch codebase

**Repository:** [https://github.com/elastic/elasticsearch](https://github.com/elastic/elasticsearch)

JDK 11 is required to build Elasticsearch. You must have a JDK 11 installation
JDK 12 is required to build Elasticsearch. You must have a JDK 12 installation
with the environment variable `JAVA_HOME` referencing the path to Java home for
your JDK 11 installation. By default, tests use the same runtime as `JAVA_HOME`.
your JDK 12 installation. By default, tests use the same runtime as `JAVA_HOME`.
However, since Elasticsearch supports JDK 8, the build supports compiling with
JDK 11 and testing on a JDK 8 runtime; to do this, set `RUNTIME_JAVA_HOME`
JDK 12 and testing on a JDK 8 runtime; to do this, set `RUNTIME_JAVA_HOME`
pointing to the Java home of a JDK 8 installation. Note that this mechanism can
be used to test against other JDKs as well, this is not only limited to JDK 8.

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ class ClusterFormationTasks {
String elasticsearchVersion
if (i < config.numBwcNodes) {
elasticsearchVersion = config.bwcVersion.toString()
if (project.bwcVersions.unreleased.contains(config.bwcVersion)) {
if (project.bwcVersions.unreleased.contains(config.bwcVersion) &&
(project.version != elasticsearchVersion)) {
elasticsearchVersion += "-SNAPSHOT"
}
distro = bwcDistro
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/resources/minimumCompilerVersion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11
1.12
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public void testConcatenationWithUnique() throws IOException {
file2.getParentFile().mkdirs();
file1.createNewFile();
file2.createNewFile();
Files.write(file1.toPath(), "Hello\nHello".getBytes());
Files.write(file2.toPath(), "Hello\nनमस्ते".getBytes());
Files.write(file1.toPath(), ("Hello" + System.lineSeparator() + "Hello").getBytes(StandardCharsets.UTF_8));
Files.write(file2.toPath(), ("Hello" + System.lineSeparator() + "नमस्ते").getBytes(StandardCharsets.UTF_8));

concatFilesTask.setFiles(project.fileTree(file1.getParentFile().getParentFile()));

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
elasticsearch = 8.0.0
lucene = 8.0.0

bundled_jdk = 11.0.2+9
bundled_jdk = 12+33

# optional dependencies
spatial4j = 0.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.client.core.AcknowledgedResponse;
import org.elasticsearch.client.dataframe.DeleteDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.PreviewDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.PreviewDataFrameTransformResponse;
import org.elasticsearch.client.dataframe.PutDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.StartDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.StartDataFrameTransformResponse;
import org.elasticsearch.client.dataframe.StopDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.StopDataFrameTransformResponse;

import java.io.IOException;
import java.util.Collections;
Expand Down Expand Up @@ -115,4 +121,124 @@ public void deleteDataFrameTransformAsync(DeleteDataFrameTransformRequest reques
listener,
Collections.emptySet());
}

/**
* Preview the result of a data frame transform
* <p>
* For additional info
* see <a href="https://www.TODO.com">Preview Data Frame transform documentation</a>
*
* @param request The preview data frame transform request
* @param options Additional request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @return A response containing the results of the applied transform
* @throws IOException when there is a serialization issue sending the request or receiving the response
*/
public PreviewDataFrameTransformResponse previewDataFrameTransform(PreviewDataFrameTransformRequest request, RequestOptions options)
throws IOException {
return restHighLevelClient.performRequestAndParseEntity(request,
DataFrameRequestConverters::previewDataFrameTransform,
options,
PreviewDataFrameTransformResponse::fromXContent,
Collections.emptySet());
}

/**
* Preview the result of a data frame transform asynchronously and notifies listener on completion
* <p>
* For additional info
* see <a href="https://www.TODO.com">Preview Data Frame transform documentation</a>
*
* @param request The preview data frame transform request
* @param options Additional request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @param listener Listener to be notified upon request completion
*/
public void previewDataFrameTransformAsync(PreviewDataFrameTransformRequest request, RequestOptions options,
ActionListener<PreviewDataFrameTransformResponse> listener) {
restHighLevelClient.performRequestAsyncAndParseEntity(request,
DataFrameRequestConverters::previewDataFrameTransform,
options,
PreviewDataFrameTransformResponse::fromXContent,
listener,
Collections.emptySet());
}

/**
* Start a data frame transform
* <p>
* For additional info
* see <a href="https://www.TODO.com">Start Data Frame transform documentation</a>
*
* @param request The start data frame transform request
* @param options Additional request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @return A response object indicating request success
* @throws IOException when there is a serialization issue sending the request or receiving the response
*/
public StartDataFrameTransformResponse startDataFrameTransform(StartDataFrameTransformRequest request, RequestOptions options)
throws IOException {
return restHighLevelClient.performRequestAndParseEntity(request,
DataFrameRequestConverters::startDataFrameTransform,
options,
StartDataFrameTransformResponse::fromXContent,
Collections.emptySet());
}

/**
* Start a data frame transform asynchronously and notifies listener on completion
* <p>
* For additional info
* see <a href="https://www.TODO.com">Start Data Frame transform documentation</a>
*
* @param request The start data frame transform request
* @param options Additional request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @param listener Listener to be notified upon request completion
*/
public void startDataFrameTransformAsync(StartDataFrameTransformRequest request, RequestOptions options,
ActionListener<StartDataFrameTransformResponse> listener) {
restHighLevelClient.performRequestAsyncAndParseEntity(request,
DataFrameRequestConverters::startDataFrameTransform,
options,
StartDataFrameTransformResponse::fromXContent,
listener,
Collections.emptySet());
}

/**
* Stop a data frame transform
* <p>
* For additional info
* see <a href="https://www.TODO.com">Stop Data Frame transform documentation</a>
*
* @param request The stop data frame transform request
* @param options Additional request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @return A response object indicating request success
* @throws IOException when there is a serialization issue sending the request or receiving the response
*/
public StopDataFrameTransformResponse stopDataFrameTransform(StopDataFrameTransformRequest request, RequestOptions options)
throws IOException {
return restHighLevelClient.performRequestAndParseEntity(request,
DataFrameRequestConverters::stopDataFrameTransform,
options,
StopDataFrameTransformResponse::fromXContent,
Collections.emptySet());
}

/**
* Stop a data frame transform asynchronously and notifies listener on completion
* <p>
* For additional info
* see <a href="https://www.TODO.com">Stop Data Frame transform documentation</a>
*
* @param request The stop data frame transform request
* @param options Additional request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @param listener Listener to be notified upon request completion
*/
public void stopDataFrameTransformAsync(StopDataFrameTransformRequest request, RequestOptions options,
ActionListener<StopDataFrameTransformResponse> listener) {
restHighLevelClient.performRequestAsyncAndParseEntity(request,
DataFrameRequestConverters::stopDataFrameTransform,
options,
StopDataFrameTransformResponse::fromXContent,
listener,
Collections.emptySet());
}
}
Loading

0 comments on commit b47e5f7

Please sign in to comment.