Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Transform] Rename data frame plugin to transform: classes in xpack.core #46644

Merged
merged 5 commits into from Sep 15, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

fix usage IT

  • Loading branch information...
hendrikmuhs committed Sep 12, 2019
commit 49c298a6fffb184233cc93f6416afde7e88ce453
@@ -34,20 +34,20 @@ public void testUsage() throws Exception {
Response usageResponse = client().performRequest(new Request("GET", "_xpack/usage"));

Map<?, ?> usageAsMap = entityAsMap(usageResponse);
assertTrue((boolean) XContentMapValues.extractValue("data_frame.available", usageAsMap));
assertTrue((boolean) XContentMapValues.extractValue("data_frame.enabled", usageAsMap));
assertTrue((boolean) XContentMapValues.extractValue("transform.available", usageAsMap));
assertTrue((boolean) XContentMapValues.extractValue("transform.enabled", usageAsMap));
// no transforms, no stats
assertEquals(null, XContentMapValues.extractValue("data_frame.transforms", usageAsMap));
assertEquals(null, XContentMapValues.extractValue("data_frame.stats", usageAsMap));
assertEquals(null, XContentMapValues.extractValue("transform.transforms", usageAsMap));
assertEquals(null, XContentMapValues.extractValue("transform.stats", usageAsMap));

// create transforms
createPivotReviewsTransform("test_usage", "pivot_reviews", null);
createPivotReviewsTransform("test_usage_no_stats", "pivot_reviews_no_stats", null);
createContinuousPivotReviewsTransform("test_usage_continuous", "pivot_reviews_continuous", null);
usageResponse = client().performRequest(new Request("GET", "_xpack/usage"));
usageAsMap = entityAsMap(usageResponse);
assertEquals(3, XContentMapValues.extractValue("data_frame.transforms._all", usageAsMap));
assertEquals(3, XContentMapValues.extractValue("data_frame.transforms.stopped", usageAsMap));
assertEquals(3, XContentMapValues.extractValue("transform.transforms._all", usageAsMap));
assertEquals(3, XContentMapValues.extractValue("transform.transforms.stopped", usageAsMap));

startAndWaitForTransform("test_usage", "pivot_reviews");
stopDataFrameTransform("test_usage", false);
@@ -82,17 +82,17 @@ public void testUsage() throws Exception {
Response response = client().performRequest(new Request("GET", "_xpack/usage"));
Map<String, Object> statsMap = entityAsMap(response);
// we should see some stats
assertEquals(3, XContentMapValues.extractValue("data_frame.transforms._all", statsMap));
assertEquals(2, XContentMapValues.extractValue("data_frame.transforms.stopped", statsMap));
assertEquals(1, XContentMapValues.extractValue("data_frame.transforms.started", statsMap));
assertEquals(3, XContentMapValues.extractValue("transform.transforms._all", statsMap));
assertEquals(2, XContentMapValues.extractValue("transform.transforms.stopped", statsMap));
assertEquals(1, XContentMapValues.extractValue("transform.transforms.started", statsMap));
for(String statName : PROVIDED_STATS) {
if (statName.equals(TransformIndexerStats.INDEX_TIME_IN_MS.getPreferredName())
||statName.equals(TransformIndexerStats.SEARCH_TIME_IN_MS.getPreferredName())) {
continue;
}
assertEquals("Incorrect stat " + statName,
expectedStats.get(statName) * 2,
XContentMapValues.extractValue("data_frame.stats." + statName, statsMap));
XContentMapValues.extractValue("transform.stats." + statName, statsMap));
}
// Refresh the index so that statistics are searchable
refreshIndex(DataFrameInternalIndex.LATEST_INDEX_VERSIONED_NAME);
@@ -104,7 +104,7 @@ public void testUsage() throws Exception {
usageResponse = client().performRequest(new Request("GET", "_xpack/usage"));
usageAsMap = entityAsMap(usageResponse);

assertEquals(3, XContentMapValues.extractValue("data_frame.transforms._all", usageAsMap));
assertEquals(3, XContentMapValues.extractValue("data_frame.transforms.stopped", usageAsMap));
assertEquals(3, XContentMapValues.extractValue("transform.transforms._all", usageAsMap));
assertEquals(3, XContentMapValues.extractValue("transform.transforms.stopped", usageAsMap));
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.