[7.x][ML] Add debug logging for outlier detection stop and restart integ test (#55169) (#55202)

To understand the failures in #55068

Backport of #55169
This commit is contained in:
Dimitris Athanasiou 2020-04-15 10:40:38 +03:00 committed by GitHub
parent 2910d01179
commit 4000138105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.support.WriteRequest; import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit; import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.XContentType;
@ -28,6 +29,7 @@ import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsSource;
import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsState; import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsState;
import org.elasticsearch.xpack.core.ml.dataframe.analyses.OutlierDetection; import org.elasticsearch.xpack.core.ml.dataframe.analyses.OutlierDetection;
import org.junit.After; import org.junit.After;
import org.junit.Before;
import java.util.Map; import java.util.Map;
@ -45,9 +47,25 @@ import static org.hamcrest.Matchers.startsWith;
public class RunDataFrameAnalyticsIT extends MlNativeDataFrameAnalyticsIntegTestCase { public class RunDataFrameAnalyticsIT extends MlNativeDataFrameAnalyticsIntegTestCase {
@Before
public void enableLogging() {
client().admin().cluster()
.prepareUpdateSettings()
.setTransientSettings(Settings.builder()
.put("logger.org.elasticsearch.xpack.ml.action", "DEBUG")
.put("logger.org.elasticsearch.xpack.ml.dataframe", "DEBUG"))
.get();
}
@After @After
public void cleanup() { public void cleanup() {
cleanUp(); cleanUp();
client().admin().cluster()
.prepareUpdateSettings()
.setTransientSettings(Settings.builder()
.putNull("logger.org.elasticsearch.xpack.ml.action")
.putNull("logger.org.elasticsearch.xpack.ml.dataframe"))
.get();
} }
public void testOutlierDetectionWithFewDocuments() throws Exception { public void testOutlierDetectionWithFewDocuments() throws Exception {