Skip to content

Commit

Permalink
Merge branch 'master' into rebuild-version-map
Browse files Browse the repository at this point in the history
  • Loading branch information
dnhatn committed Jun 13, 2019
2 parents 42c8233 + 816f12f commit 4a4fe69
Show file tree
Hide file tree
Showing 106 changed files with 1,389 additions and 681 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.elasticsearch.cluster.ClusterModule;
import org.elasticsearch.cluster.EmptyClusterInfoService;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodeRole;
import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.FailedShard;
Expand Down Expand Up @@ -92,7 +93,7 @@ public static AllocationDeciders defaultAllocationDeciders(Settings settings, Cl

public static DiscoveryNode newNode(String nodeId, Map<String, String> attributes) {
return new DiscoveryNode("", nodeId, new TransportAddress(TransportAddress.META_ADDRESS,
portGenerator.incrementAndGet()), attributes, Sets.newHashSet(DiscoveryNode.Role.MASTER,
DiscoveryNode.Role.DATA), Version.CURRENT);
portGenerator.incrementAndGet()), attributes, Sets.newHashSet(DiscoveryNodeRole.MASTER_ROLE,
DiscoveryNodeRole.DATA_ROLE), Version.CURRENT);
}
}
35 changes: 29 additions & 6 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,26 @@ if (JavaVersion.current() < JavaVersion.VERSION_11) {
}

// Keep compatibility with Java 8 for external users of build-tools that haven't migrated to Java 11
targetCompatibility = '8'
sourceCompatibility = '8'
targetCompatibility = '11'
sourceCompatibility = '11'

sourceSets {
// We have a few classes that need to be compiled for older java versions
minimumRuntime { }
}

compileMinimumRuntimeJava {
targetCompatibility = 8
sourceCompatibility = 8
}

jar {
from sourceSets.minimumRuntime.output
}

javadoc {
source sourceSets.minimumRuntime.allSource
}

/*****************************************************************************
* Dependencies used by the entire build *
Expand All @@ -79,6 +97,11 @@ repositories {
}

dependencies {
if (project.ext.has("isEclipse") == false || project.ext.isEclipse == false) {
// eclipse is confused if this is set explicitly
compile sourceSets.minimumRuntime.output
}

compile localGroovy()

compile 'commons-codec:commons-codec:1.12'
Expand All @@ -96,6 +119,9 @@ dependencies {
testCompile "junit:junit:${props.getProperty('junit')}"
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${props.getProperty('randomizedrunner')}"
testCompile 'com.github.tomakehurst:wiremock-jre8-standalone:2.23.2'
minimumRuntimeCompile "junit:junit:${props.getProperty('junit')}"
minimumRuntimeCompile localGroovy()
minimumRuntimeCompile gradleApi()
}

/*****************************************************************************
Expand Down Expand Up @@ -123,17 +149,14 @@ if (project != rootProject) {
apply plugin: 'nebula.maven-base-publish'
apply plugin: 'nebula.maven-scm'

// we need to apply these again to override the build plugin
targetCompatibility = "10"
sourceCompatibility = "10"

// groovydoc succeeds, but has some weird internal exception...
groovydoc.enabled = false

// build-tools is not ready for primetime with these...
dependencyLicenses.enabled = false
dependenciesInfo.enabled = false
forbiddenApisMain.enabled = false
forbiddenApisMinimumRuntime.enabled = false
forbiddenApisTest.enabled = false
jarHell.enabled = false
thirdPartyAudit.enabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.function.Consumer;
import java.util.function.Function;
Expand Down Expand Up @@ -79,7 +78,13 @@ public void setSpoolOutput(boolean spoolOutput) {
};
} else {
out = new ByteArrayOutputStream();
outputLogger = logger -> logger.error(((ByteArrayOutputStream) out).toString(StandardCharsets.UTF_8));
outputLogger = logger -> {
try {
logger.error(((ByteArrayOutputStream) out).toString("UTF-8"));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
};
}
setStandardOutput(out);
setErrorOutput(out);
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cat/nodes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Might look like:
[source,txt]
--------------------------------------------------
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
127.0.0.1 65 99 42 3.07 mdi * mJw06l1
127.0.0.1 65 99 42 3.07 dim * mJw06l1
--------------------------------------------------
// TESTRESPONSE[s/3.07/(\\d+\\.\\d+( \\d+\\.\\d+ (\\d+\\.\\d+)?)?)?/]
// TESTRESPONSE[s/65 99 42/\\d+ \\d+ \\d+/]
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ And the response:
[source,txt]
--------------------------------------------------
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
127.0.0.1 10 5 5 4.46 mdi * PB2SGZY
127.0.0.1 10 5 5 4.46 dim * PB2SGZY
--------------------------------------------------
// TESTRESPONSE[s/10 5 5 4.46/\\d+ \\d+ \\d+ (\\d+\\.\\d+)? (\\d+\\.\\d+)? (\\d+\.\\d+)?/]
// TESTRESPONSE[s/[*]/[*]/ s/PB2SGZY/.+/ non_json]
Expand Down
6 changes: 6 additions & 0 deletions docs/reference/ml/apis/get-ml-info.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ This is a possible response:
}
},
"upgrade_mode": false,
"native_code" : {
"version": "7.0.0",
"build_hash": "99a07c016d5a73"
},
"limits" : { }
}
----
// TESTRESPONSE[s/"upgrade_mode": false/"upgrade_mode": $body.upgrade_mode/]
// TESTRESPONSE[s/"version": "7.0.0",/"version": "$body.native_code.version",/]
// TESTRESPONSE[s/"build_hash": "99a07c016d5a73"/"build_hash": "$body.native_code.build_hash"/]
2 changes: 1 addition & 1 deletion docs/reference/ml/configuring.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
If you want to use {ml-features}, there must be at least one {ml} node in
your cluster and all master-eligible nodes must have {ml} enabled. By default,
all nodes are {ml} nodes. For more information about these settings, see
{ref}/modules-node.html#modules-node-xpack[{ml} nodes].
{ref}/modules-node.html#ml-node[{ml} nodes].

To use the {ml-features} to analyze your data, you must create a job and
send your data to that job.
Expand Down
116 changes: 0 additions & 116 deletions docs/reference/modules/ml-node.asciidoc

This file was deleted.

Loading

0 comments on commit 4a4fe69

Please sign in to comment.