Skip to content

Commit 7725689

Browse files
christophstroblsothawo
authored andcommitted
DATAES-635 - Create branch 4.0.x and integrate the changes from the existing 4.x branch.
1 parent 84380ce commit 7725689

File tree

13 files changed

+189
-17
lines changed

13 files changed

+189
-17
lines changed

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
33

4-
<modelVersion>4.0.0</modelVersion>
4+
<modelVersion>4.0.0</modelVersion>
55

6-
<groupId>org.springframework.data</groupId>
7-
<artifactId>spring-data-elasticsearch</artifactId>
8-
<version>3.3.0.BUILD-SNAPSHOT</version>
6+
<groupId>org.springframework.data</groupId>
7+
<artifactId>spring-data-elasticsearch</artifactId>
8+
<version>4.0.0.BUILD-SNAPSHOT</version>
99

1010
<parent>
1111
<groupId>org.springframework.data.build</groupId>

src/main/java/org/springframework/data/elasticsearch/client/RestClientFactoryBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
/**
3232
* RestClientFactoryBean
33-
*
33+
*
3434
* @author Don Wellington
3535
*/
3636
@Slf4j

src/main/java/org/springframework/data/elasticsearch/client/TransportClientFactoryBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ public void afterPropertiesSet() throws Exception {
8383
protected void buildClient() throws Exception {
8484

8585
client = new PreBuiltTransportClient(settings());
86-
86+
8787
clusterNodes.stream() //
8888
.peek(it -> logger.info("Adding transport node : " + it.toString())) //
8989
.forEach(client::addTransportAddress);
90-
90+
9191
client.connectedNodes();
9292
}
9393

src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultWebClientProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class DefaultWebClientProvider implements WebClientProvider {
5555

5656
/**
5757
* Create new {@link DefaultWebClientProvider} with empty {@link HttpHeaders} and no-op {@literal error listener}.
58-
*
58+
*
5959
* @param scheme must not be {@literal null}.
6060
* @param connector can be {@literal null}.
6161
* @param errorListener must not be {@literal null}.

src/main/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClient.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import org.elasticsearch.index.reindex.BulkByScrollResponse;
4646
import org.elasticsearch.index.reindex.DeleteByQueryRequest;
4747
import org.elasticsearch.search.SearchHit;
48-
4948
import org.springframework.data.elasticsearch.client.ClientConfiguration;
5049
import org.springframework.data.elasticsearch.client.ElasticsearchHost;
5150
import org.springframework.http.HttpHeaders;

src/main/java/org/springframework/data/elasticsearch/core/EsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
/**
1919
* EsClient interface. Specify what client an ElasticSearchTemplate will return from getClient().
20-
*
20+
*
2121
* @author Don Wellington
2222
* @param <C>
2323
*/
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
http\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-1.0.xsd
22
http\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-3.2.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-3.2.xsd
3-
http\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-3.2.xsd
3+
http\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-4.0.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-4.0.xsd
4+
http\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-4.0.xsd
45
https\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-1.0.xsd
56
https\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-3.2.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-3.2.xsd
6-
https\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-3.2.xsd
7+
https\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-4.0.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-4.0.xsd
8+
https\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-4.0.xsd
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://www.springframework.org/schema/data/elasticsearch"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
xmlns:beans="http://www.springframework.org/schema/beans"
5+
xmlns:tool="http://www.springframework.org/schema/tool"
6+
xmlns:repository="http://www.springframework.org/schema/data/repository"
7+
targetNamespace="http://www.springframework.org/schema/data/elasticsearch"
8+
elementFormDefault="qualified"
9+
attributeFormDefault="unqualified">
10+
11+
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
12+
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
13+
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
14+
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd"/>
15+
16+
<xsd:element name="repositories">
17+
<xsd:complexType>
18+
<xsd:complexContent>
19+
<xsd:extension base="repository:repositories">
20+
<xsd:attributeGroup ref="repository:repository-attributes"/>
21+
<xsd:attribute name="elasticsearch-template-ref" type="elasticsearchTemplateRef"
22+
default="elasticsearchTemplate"/>
23+
</xsd:extension>
24+
</xsd:complexContent>
25+
</xsd:complexType>
26+
</xsd:element>
27+
28+
<xsd:simpleType name="elasticsearchTemplateRef">
29+
<xsd:annotation>
30+
<xsd:appinfo>
31+
<tool:annotation kind="ref">
32+
<tool:assignable-to type="org.springframework.data.elasticsearch.core.ElasticsearchTemplate"/>
33+
</tool:annotation>
34+
</xsd:appinfo>
35+
</xsd:annotation>
36+
<xsd:union memberTypes="xsd:string"/>
37+
</xsd:simpleType>
38+
39+
<xsd:element name="node-client">
40+
<xsd:annotation>
41+
<xsd:documentation/>
42+
<xsd:appinfo>
43+
<tool:assignable-to type="org.elasticsearch.client.Client"/>
44+
</xsd:appinfo>
45+
</xsd:annotation>
46+
<xsd:complexType>
47+
<xsd:complexContent>
48+
<xsd:extension base="beans:identifiedType">
49+
<xsd:attribute name="local" type="xsd:boolean" default="false">
50+
<xsd:annotation>
51+
<xsd:documentation>
52+
<![CDATA[local here means local on the JVM (well, actually class loader) level, meaning that two local servers started within the same JVM will discover themselves and form a cluster]]>
53+
</xsd:documentation>
54+
</xsd:annotation>
55+
</xsd:attribute>
56+
<xsd:attribute name="cluster-name" type="xsd:string" default="elasticsearch">
57+
<xsd:annotation>
58+
<xsd:documentation>
59+
<![CDATA[Name of the cluster in which this instance of node client will connect to]]>
60+
</xsd:documentation>
61+
</xsd:annotation>
62+
</xsd:attribute>
63+
<xsd:attribute name="http-enabled" type="xsd:boolean" default="true">
64+
<xsd:annotation>
65+
<xsd:documentation>
66+
<![CDATA[ to enable or disable http port ]]>
67+
</xsd:documentation>
68+
</xsd:annotation>
69+
</xsd:attribute>
70+
<xsd:attribute name="path-data" type="xsd:string" default="">
71+
<xsd:annotation>
72+
<xsd:documentation>
73+
<![CDATA[ path to the data folder for node client ]]>
74+
</xsd:documentation>
75+
</xsd:annotation>
76+
</xsd:attribute>
77+
<xsd:attribute name="path-home" type="xsd:string" default="">
78+
<xsd:annotation>
79+
<xsd:documentation>
80+
<![CDATA[ path to the home folder for node client ]]>
81+
</xsd:documentation>
82+
</xsd:annotation>
83+
</xsd:attribute>
84+
<xsd:attribute name="path-configuration" type="xsd:string" default="">
85+
<xsd:annotation>
86+
<xsd:documentation>
87+
<![CDATA[ path to configuration file for node client ]]>
88+
</xsd:documentation>
89+
</xsd:annotation>
90+
</xsd:attribute>
91+
</xsd:extension>
92+
</xsd:complexContent>
93+
</xsd:complexType>
94+
</xsd:element>
95+
<xsd:element name="transport-client">
96+
<xsd:annotation>
97+
<xsd:documentation/>
98+
<xsd:appinfo>
99+
<tool:assignable-to type="org.elasticsearch.client.Client"/>
100+
</xsd:appinfo>
101+
</xsd:annotation>
102+
<xsd:complexType>
103+
<xsd:complexContent>
104+
<xsd:extension base="beans:identifiedType">
105+
<xsd:attribute name="cluster-nodes" type="xsd:string" default="127.0.0.1:9300">
106+
<xsd:annotation>
107+
<xsd:documentation>
108+
<![CDATA[The comma delimited list of host:port entries to use for elasticsearch cluster.]]>
109+
</xsd:documentation>
110+
</xsd:annotation>
111+
</xsd:attribute>
112+
<xsd:attribute name="cluster-name" type="xsd:string" default="elasticsearch">
113+
<xsd:annotation>
114+
<xsd:documentation>
115+
<![CDATA[Name of the cluster in which this instance of node client will connect to]]>
116+
</xsd:documentation>
117+
</xsd:annotation>
118+
</xsd:attribute>
119+
<xsd:attribute name="client-transport-sniff" type="xsd:boolean" default="true">
120+
<xsd:annotation>
121+
<xsd:documentation>
122+
<![CDATA[The client allows to sniff the rest of the cluster, and add those into its list of machines to use.]]>
123+
</xsd:documentation>
124+
</xsd:annotation>
125+
</xsd:attribute>
126+
<xsd:attribute name="client-transport-ignore-cluster-name" type="xsd:boolean" default="false">
127+
<xsd:annotation>
128+
<xsd:documentation>
129+
<![CDATA[Set to true to ignore cluster name validation of connected nodes. (since 0.19.4)]]>
130+
</xsd:documentation>
131+
</xsd:annotation>
132+
</xsd:attribute>
133+
<xsd:attribute name="client-transport-ping-timeout" type="xsd:string" default="5s">
134+
<xsd:annotation>
135+
<xsd:documentation>
136+
<![CDATA[The time to wait for a ping response from a node. Defaults to 5s.]]>
137+
</xsd:documentation>
138+
</xsd:annotation>
139+
</xsd:attribute>
140+
<xsd:attribute name="client-transport-nodes-sampler-interval" type="xsd:string" default="5s">
141+
<xsd:annotation>
142+
<xsd:documentation>
143+
<![CDATA[How often to sample / ping the nodes listed and connected. Defaults to 5s.]]>
144+
</xsd:documentation>
145+
</xsd:annotation>
146+
</xsd:attribute>
147+
</xsd:extension>
148+
</xsd:complexContent>
149+
</xsd:complexType>
150+
</xsd:element>
151+
<xsd:element name="rest-client">
152+
<xsd:annotation>
153+
<xsd:documentation/>
154+
<xsd:appinfo>
155+
<tool:assignable-to type="org.elasticsearch.client.RestHighLevelClient"/>
156+
</xsd:appinfo>
157+
</xsd:annotation>
158+
<xsd:complexType>
159+
<xsd:complexContent>
160+
<xsd:extension base="beans:identifiedType">
161+
<xsd:attribute name="hosts" type="xsd:string" default="http://127.0.0.1:9200">
162+
<xsd:annotation>
163+
<xsd:documentation>
164+
<![CDATA[The comma delimited list of host:port entries to use for elasticsearch cluster.]]>
165+
</xsd:documentation>
166+
</xsd:annotation>
167+
</xsd:attribute>
168+
</xsd:extension>
169+
</xsd:complexContent>
170+
</xsd:complexType>
171+
</xsd:element>
172+
</xsd:schema>

src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveMockClientTestsUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
import org.mockito.ArgumentCaptor;
4141
import org.mockito.Mockito;
42-
4342
import org.springframework.core.io.ClassPathResource;
4443
import org.springframework.core.io.Resource;
4544
import org.springframework.data.elasticsearch.client.ElasticsearchHost;

src/test/resources/test-home-dir/modules/lang-expression/plugin-security.policy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* not use this file except in compliance with the License.
88
* You may obtain a copy of the License at
99
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* https://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing,
1313
* software distributed under the License is distributed on an

src/test/resources/test-home-dir/modules/lang-painless/plugin-security.policy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* not use this file except in compliance with the License.
88
* You may obtain a copy of the License at
99
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* https://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing,
1313
* software distributed under the License is distributed on an

src/test/resources/test-home-dir/modules/reindex/plugin-security.policy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* not use this file except in compliance with the License.
88
* You may obtain a copy of the License at
99
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* https://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing,
1313
* software distributed under the License is distributed on an

src/test/resources/test-home-dir/modules/repository-url/plugin-security.policy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* not use this file except in compliance with the License.
88
* You may obtain a copy of the License at
99
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* https://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing,
1313
* software distributed under the License is distributed on an

0 commit comments

Comments
 (0)