File tree Expand file tree Collapse file tree 4 files changed +9
-15
lines changed
qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration
src/main/java/org/elasticsearch/xpack/ml/rest/job
qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -544,9 +544,7 @@ public void testOutOfOrderData() throws Exception {
544544
545545 Request flushRequest = new Request ("POST" , MachineLearning .BASE_PATH + "anomaly_detectors/" + jobId + "/_flush" );
546546 flushRequest .setOptions (FLUSH_OPTIONS );
547- Response flushResponse = client ().performRequest (
548- flushRequest
549- );
547+ Response flushResponse = client ().performRequest (flushRequest );
550548 assertThat (entityAsMap (flushResponse ), hasEntry ("flushed" , true ));
551549
552550 closeJob (jobId );
@@ -586,9 +584,7 @@ public void testDeleteJob_TimingStatsDocumentIsDeleted() throws Exception {
586584
587585 Request flushRequest = new Request ("POST" , MachineLearning .BASE_PATH + "anomaly_detectors/" + jobId + "/_flush" );
588586 flushRequest .setOptions (FLUSH_OPTIONS );
589- Response flushResponse = client ().performRequest (
590- flushRequest
591- );
587+ Response flushResponse = client ().performRequest (flushRequest );
592588 assertThat (entityAsMap (flushResponse ), hasEntry ("flushed" , true ));
593589
594590 closeJob (jobId );
Original file line number Diff line number Diff line change @@ -36,9 +36,7 @@ public class RestFlushJobAction extends BaseRestHandler {
3636 public List <Route > routes () {
3737 final String msg = "Forcing any buffered data to be processed is deprecated, "
3838 + "in a future major version it will be compulsory to use a datafeed" ;
39- return List .of (
40- Route .builder (POST , BASE_PATH + "anomaly_detectors/{" + ID + "}/_flush" ).deprecateAndKeep (msg ).build ()
41- );
39+ return List .of (Route .builder (POST , BASE_PATH + "anomaly_detectors/{" + ID + "}/_flush" ).deprecateAndKeep (msg ).build ());
4240 }
4341
4442 @ Override
Original file line number Diff line number Diff line change 88
99import org .elasticsearch .action .ActionListener ;
1010import org .elasticsearch .client .internal .node .NodeClient ;
11- import org .elasticsearch .core .UpdateForV9 ;
1211import org .elasticsearch .rest .BaseRestHandler ;
1312import org .elasticsearch .rest .RestRequest ;
1413import org .elasticsearch .rest .RestStatus ;
@@ -31,9 +30,7 @@ public class RestPostDataAction extends BaseRestHandler {
3130 public List <Route > routes () {
3231 final String msg = "Posting data directly to anomaly detection jobs is deprecated, "
3332 + "since version 7.11.0, in a future major version it will be compulsory to use a datafeed" ;
34- return List .of (
35- Route .builder (POST , BASE_PATH + "anomaly_detectors/{" + Job .ID + "}/_data" ).deprecateAndKeep (msg ).build ()
36- );
33+ return List .of (Route .builder (POST , BASE_PATH + "anomaly_detectors/{" + Job .ID + "}/_data" ).deprecateAndKeep (msg ).build ());
3734 }
3835
3936 @ Override
Original file line number Diff line number Diff line change @@ -346,8 +346,11 @@ protected void flushJob(String jobId) throws IOException {
346346 } else if (warnings .size () > 1 ) {
347347 return true ;
348348 }
349- return warnings .get (0 ).equals ("Forcing any buffered data to be processed is deprecated, "
350- + "in a future major version it will be compulsory to use a datafeed" ) == false ;
349+ return warnings .get (0 )
350+ .equals (
351+ "Forcing any buffered data to be processed is deprecated, "
352+ + "in a future major version it will be compulsory to use a datafeed"
353+ ) == false ;
351354 }).build ();
352355 Request flushRequest = new Request ("POST" , "/_ml/anomaly_detectors/" + jobId + "/_flush" );
353356 flushRequest .setOptions (flushOptions );
You can’t perform that action at this time.
0 commit comments