Skip to content

Commit a3340d6

Browse files
committed
Merge branch '6.x' into ccr-6.x
* 6.x: Client: Deprecate many argument performRequest (#30315) Mute ML upgrade test (#30458)
2 parents a7bf269 + 2837d8f commit a3340d6

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

client/rest/src/main/java/org/elasticsearch/client/RestClient.java

+16
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ public void performRequestAsync(Request request, ResponseListener responseListen
210210
* @throws IOException in case of a problem or the connection was aborted
211211
* @throws ClientProtocolException in case of an http protocol error
212212
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
213+
* @deprecated prefer {@link #performRequest(Request)}
213214
*/
215+
@Deprecated
214216
public Response performRequest(String method, String endpoint, Header... headers) throws IOException {
215217
Request request = new Request(method, endpoint);
216218
request.setHeaders(headers);
@@ -229,7 +231,9 @@ public Response performRequest(String method, String endpoint, Header... headers
229231
* @throws IOException in case of a problem or the connection was aborted
230232
* @throws ClientProtocolException in case of an http protocol error
231233
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
234+
* @deprecated prefer {@link #performRequest(Request)}
232235
*/
236+
@Deprecated
233237
public Response performRequest(String method, String endpoint, Map<String, String> params, Header... headers) throws IOException {
234238
Request request = new Request(method, endpoint);
235239
addParameters(request, params);
@@ -252,7 +256,9 @@ public Response performRequest(String method, String endpoint, Map<String, Strin
252256
* @throws IOException in case of a problem or the connection was aborted
253257
* @throws ClientProtocolException in case of an http protocol error
254258
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
259+
* @deprecated prefer {@link #performRequest(Request)}
255260
*/
261+
@Deprecated
256262
public Response performRequest(String method, String endpoint, Map<String, String> params,
257263
HttpEntity entity, Header... headers) throws IOException {
258264
Request request = new Request(method, endpoint);
@@ -289,7 +295,9 @@ public Response performRequest(String method, String endpoint, Map<String, Strin
289295
* @throws IOException in case of a problem or the connection was aborted
290296
* @throws ClientProtocolException in case of an http protocol error
291297
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
298+
* @deprecated prefer {@link #performRequest(Request)}
292299
*/
300+
@Deprecated
293301
public Response performRequest(String method, String endpoint, Map<String, String> params,
294302
HttpEntity entity, HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory,
295303
Header... headers) throws IOException {
@@ -310,7 +318,9 @@ public Response performRequest(String method, String endpoint, Map<String, Strin
310318
* @param endpoint the path of the request (without host and port)
311319
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
312320
* @param headers the optional request headers
321+
* @deprecated prefer {@link #performRequestAsync(Request, ResponseListener)}
313322
*/
323+
@Deprecated
314324
public void performRequestAsync(String method, String endpoint, ResponseListener responseListener, Header... headers) {
315325
Request request;
316326
try {
@@ -333,7 +343,9 @@ public void performRequestAsync(String method, String endpoint, ResponseListener
333343
* @param params the query_string parameters
334344
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
335345
* @param headers the optional request headers
346+
* @deprecated prefer {@link #performRequestAsync(Request, ResponseListener)}
336347
*/
348+
@Deprecated
337349
public void performRequestAsync(String method, String endpoint, Map<String, String> params,
338350
ResponseListener responseListener, Header... headers) {
339351
Request request;
@@ -361,7 +373,9 @@ public void performRequestAsync(String method, String endpoint, Map<String, Stri
361373
* @param entity the body of the request, null if not applicable
362374
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
363375
* @param headers the optional request headers
376+
* @deprecated prefer {@link #performRequestAsync(Request, ResponseListener)}
364377
*/
378+
@Deprecated
365379
public void performRequestAsync(String method, String endpoint, Map<String, String> params,
366380
HttpEntity entity, ResponseListener responseListener, Header... headers) {
367381
Request request;
@@ -394,7 +408,9 @@ public void performRequestAsync(String method, String endpoint, Map<String, Stri
394408
* connection on the client side.
395409
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
396410
* @param headers the optional request headers
411+
* @deprecated prefer {@link #performRequestAsync(Request, ResponseListener)}
397412
*/
413+
@Deprecated
398414
public void performRequestAsync(String method, String endpoint, Map<String, String> params,
399415
HttpEntity entity, HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory,
400416
ResponseListener responseListener, Header... headers) {

docs/CHANGELOG.asciidoc

+10-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[partintro]
55
--
6-
// To add a release, copy and paste the template text
6+
// To add a release, copy and paste the template text
77
// and add a link to the new section. Note that release subheads must
88
// be floated and sections cannot be empty.
99

@@ -296,8 +296,11 @@ are used.
296296
//[float]
297297
//=== Breaking Java Changes
298298

299-
//[float]
300-
//=== Deprecations
299+
[float]
300+
=== Deprecations
301+
302+
Deprecated multi-argument versions of the request methods in the RestClient.
303+
Prefer the "Request" object flavored methods. ({pull}30315[#30315])
301304

302305
//[float]
303306
//=== New Features
@@ -310,6 +313,10 @@ analysis module. ({pull}30397[#30397])
310313

311314
Highlighting::
312315
* Limit analyzed text for highlighting (improvements) {pull}28808[#28808] (issues: {issue}16764[#16764], {issue}27934[#27934])
316+
{ref-64}/breaking_64_api_changes.html#copy-source-settings-on-resize[Allow copying source settings on index resize operations] ({pull}30255[#30255])
317+
318+
Added new "Request" object flavored request methods in the RestClient. Prefer
319+
these instead of the multi-argument versions. ({pull}29623[#29623])
313320

314321
Recovery::
315322
* Require translogUUID when reading global checkpoint {pull}28587[#28587] (issue: {issue}28435[#28435])

x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/UpgradeClusterClientYamlTestSuiteIT.java

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
99
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
10+
11+
import org.apache.lucene.util.LuceneTestCase;
1012
import org.apache.lucene.util.TimeUnits;
1113
import org.elasticsearch.Version;
1214
import org.elasticsearch.client.Response;
@@ -32,6 +34,7 @@
3234
import static org.hamcrest.Matchers.is;
3335

3436
@TimeoutSuite(millis = 5 * TimeUnits.MINUTE) // to account for slow as hell VMs
37+
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/30456")
3538
public class UpgradeClusterClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
3639

3740
/**

0 commit comments

Comments
 (0)