Skip to content

Commit c555a44

Browse files
committed
Merge branch 'master' into security_authz_engine
2 parents 1362ab6 + ecf0de3 commit c555a44

File tree

234 files changed

+8108
-2778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+8108
-2778
lines changed

buildSrc/src/main/resources/checkstyle_suppressions.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@
4646
<suppress files="client[/\\]rest-high-level[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]client[/\\]documentation[/\\]WatcherDocumentationIT.java" id="SnippetLength" />
4747
<suppress files="modules[/\\]reindex[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]client[/\\]documentation[/\\]ReindexDocumentationIT.java" id="SnippetLength" />
4848

49-
<!-- Hopefully temporary suppression of LineLength on files that don't pass it. We should remove these when we the
50-
files start to pass. -->
51-
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]node[/\\]Node.java" checks="LineLength" />
52-
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]aliases[/\\]IndexAliasesIT.java" checks="LineLength" />
53-
5449
<!-- Gradle requires inputs to be seriablizable -->
5550
<suppress files="buildSrc[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]gradle[/\\]precommit[/\\]TestingConventionRule.java" checks="RegexpSinglelineJava" />
5651
</suppressions>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1
1+
5.1.1

client/rest-high-level/src/main/java/org/elasticsearch/client/watcher/PutWatchResponse.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,15 @@
2020

2121
import org.elasticsearch.common.ParseField;
2222
import org.elasticsearch.common.xcontent.ObjectParser;
23-
import org.elasticsearch.common.xcontent.ToXContentObject;
24-
import org.elasticsearch.common.xcontent.XContentBuilder;
2523
import org.elasticsearch.common.xcontent.XContentParser;
2624

2725
import java.io.IOException;
2826
import java.util.Objects;
2927

30-
public class PutWatchResponse implements ToXContentObject {
28+
public class PutWatchResponse {
3129

3230
private static final ObjectParser<PutWatchResponse, Void> PARSER
33-
= new ObjectParser<>("x_pack_put_watch_response", PutWatchResponse::new);
31+
= new ObjectParser<>("x_pack_put_watch_response", true, PutWatchResponse::new);
3432

3533
static {
3634
PARSER.declareString(PutWatchResponse::setId, new ParseField("_id"));
@@ -90,15 +88,6 @@ public int hashCode() {
9088
return Objects.hash(id, version, created);
9189
}
9290

93-
@Override
94-
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
95-
return builder.startObject()
96-
.field("_id", id)
97-
.field("_version", version)
98-
.field("created", created)
99-
.endObject();
100-
}
101-
10291
public static PutWatchResponse fromXContent(XContentParser parser) throws IOException {
10392
return PARSER.parse(parser, null);
10493
}

client/rest-high-level/src/test/java/org/elasticsearch/client/watcher/PutWatchResponseTests.java

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,37 @@
1818
*/
1919
package org.elasticsearch.client.watcher;
2020

21-
import org.elasticsearch.common.xcontent.XContentParser;
22-
import org.elasticsearch.test.AbstractXContentTestCase;
21+
import org.elasticsearch.common.xcontent.XContentBuilder;
22+
import org.elasticsearch.test.ESTestCase;
2323

2424
import java.io.IOException;
2525

26-
public class PutWatchResponseTests extends AbstractXContentTestCase<PutWatchResponse> {
26+
import static org.elasticsearch.test.AbstractXContentTestCase.xContentTester;
2727

28-
@Override
29-
protected PutWatchResponse createTestInstance() {
30-
String id = randomAlphaOfLength(10);
31-
long version = randomLongBetween(1, 10);
32-
boolean created = randomBoolean();
33-
return new PutWatchResponse(id, version, created);
28+
public class PutWatchResponseTests extends ESTestCase {
29+
30+
public void testFromXContent() throws IOException {
31+
xContentTester(this::createParser,
32+
PutWatchResponseTests::createTestInstance,
33+
PutWatchResponseTests::toXContent,
34+
PutWatchResponse::fromXContent)
35+
.supportsUnknownFields(true)
36+
.assertToXContentEquivalence(false)
37+
.test();
3438
}
3539

36-
@Override
37-
protected PutWatchResponse doParseInstance(XContentParser parser) throws IOException {
38-
return PutWatchResponse.fromXContent(parser);
40+
private static XContentBuilder toXContent(PutWatchResponse response, XContentBuilder builder) throws IOException {
41+
return builder.startObject()
42+
.field("_id", response.getId())
43+
.field("_version", response.getVersion())
44+
.field("created", response.isCreated())
45+
.endObject();
3946
}
4047

41-
@Override
42-
protected boolean supportsUnknownFields() {
43-
return false;
48+
private static PutWatchResponse createTestInstance() {
49+
String id = randomAlphaOfLength(10);
50+
long version = randomLongBetween(1, 10);
51+
boolean created = randomBoolean();
52+
return new PutWatchResponse(id, version, created);
4453
}
4554
}

distribution/packages/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void addProcessFilesTask(String type, boolean oss) {
7272
MavenFilteringHack.filter(it, expansionsForDistribution(type, oss))
7373
}
7474

75-
into('config') {
75+
into('etc/elasticsearch') {
7676
with configFiles(type, oss)
7777
}
7878
MavenFilteringHack.filter(it, expansionsForDistribution(type, oss))
@@ -173,19 +173,20 @@ Closure commonPackageConfig(String type, boolean oss) {
173173
configurationFile '/etc/elasticsearch/users'
174174
configurationFile '/etc/elasticsearch/users_roles'
175175
}
176-
into('/etc/elasticsearch') {
177-
dirMode 0750
176+
into('/etc') {
177+
dirMode 02750
178178
fileMode 0660
179179
permissionGroup 'elasticsearch'
180180
includeEmptyDirs true
181181
createDirectoryEntry true
182182
fileType CONFIG | NOREPLACE
183-
from "${packagingFiles}/config"
183+
from "${packagingFiles}/etc"
184184
}
185185
String envFile = expansionsForDistribution(type, false)['path.env']
186186
configurationFile envFile
187187
into(new File(envFile).getParent()) {
188188
fileType CONFIG | NOREPLACE
189+
permissionGroup 'elasticsearch'
189190
fileMode 0660
190191
from "${packagingFiles}/env/elasticsearch"
191192
}
@@ -229,8 +230,8 @@ Closure commonPackageConfig(String type, boolean oss) {
229230
}
230231
}
231232
copyEmptyDir('/var/run/elasticsearch', 'elasticsearch', 'elasticsearch', 0755)
232-
copyEmptyDir('/var/log/elasticsearch', 'elasticsearch', 'elasticsearch', 0750)
233-
copyEmptyDir('/var/lib/elasticsearch', 'elasticsearch', 'elasticsearch', 0750)
233+
copyEmptyDir('/var/log/elasticsearch', 'elasticsearch', 'elasticsearch', 02750)
234+
copyEmptyDir('/var/lib/elasticsearch', 'elasticsearch', 'elasticsearch', 02750)
234235
copyEmptyDir('/usr/share/elasticsearch/plugins', 'root', 'root', 0755)
235236

236237
// the oss package conflicts with the default distribution and vice versa

distribution/packages/src/common/scripts/postinst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,6 @@ elif [ "$RESTART_ON_UPGRADE" = "true" ]; then
9393
echo " OK"
9494
fi
9595

96-
chown -R elasticsearch:elasticsearch /var/lib/elasticsearch
97-
chown -R elasticsearch:elasticsearch /var/log/elasticsearch
98-
chown -R root:elasticsearch /etc/elasticsearch
99-
chmod g+s /etc/elasticsearch
100-
chmod 0750 /etc/elasticsearch
101-
102-
if [ -f ${path.env} ]; then
103-
chown root:elasticsearch ${path.env}
104-
fi
105-
10696
# the equivalent code for rpm is in posttrans
10797
if [ "$PACKAGE" = "deb" -a ! -f /etc/elasticsearch/elasticsearch.keystore ]; then
10898
/usr/share/elasticsearch/bin/elasticsearch-keystore create

docs/reference/ccr/getting-started.asciidoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ remote cluster.
151151
alias `leader`
152152
<2> This shows the number of nodes in the remote cluster the local cluster is
153153
connected to.
154+
155+
Alternatively, you can manage remote clusters on the
156+
*Management / Elasticsearch / Remote Clusters* page in {kib}:
157+
158+
[role="screenshot"]
159+
image::ml/images/remote-clusters.jpg["The Remote Clusters page in {kib}"]
160+
154161

155162
[float]
156163
[[ccr-getting-started-leader-index]]
@@ -325,3 +332,9 @@ DELETE /_ccr/auto_follow/beats
325332
// TEST[continued]
326333
327334
//////////////////////////
335+
336+
Alternatively, you can manage auto-follow patterns on the
337+
*Management / Elasticsearch / Cross Cluster Replication* page in {kib}:
338+
339+
[role="screenshot"]
340+
image::ml/images/auto-follow-patterns.jpg["The Auto-follow patterns page in {kib}"]
167 KB
Loading
119 KB
Loading

docs/reference/setup.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,5 @@ include::setup/bootstrap-checks.asciidoc[]
5858
include::setup/starting.asciidoc[]
5959

6060
include::setup/stopping.asciidoc[]
61+
62+
include::setup/add-nodes.asciidoc[]

0 commit comments

Comments
 (0)