Skip to content
Permalink
Browse files

[Transform] Rename data frame plugin to transform: classes in xpack.c…

…ore (#46644) (#46734)

rename classes in xpack.core of transform plugin from "data frame transform" to "transform"
  • Loading branch information...
hendrikmuhs committed Sep 16, 2019
1 parent 16bed7f commit c8f52ec4ff5660d231dbe9bb252039a3e96d8b53
Showing with 1,861 additions and 1,861 deletions.
  1. +8 −8 ...c/test/java/org/elasticsearch/client/transform/transforms/hlrc/DataFrameIndexerPositionTests.java
  2. +10 −10 .../java/org/elasticsearch/client/transform/transforms/hlrc/DataFrameIndexerTransformStatsTests.java
  3. +8 −8 ...va/org/elasticsearch/client/transform/transforms/hlrc/DataFrameTransformCheckpointStatsTests.java
  4. +10 −10 .../org/elasticsearch/client/transform/transforms/hlrc/DataFrameTransformCheckpointingInfoTests.java
  5. +8 −8 ...test/java/org/elasticsearch/client/transform/transforms/hlrc/DataFrameTransformProgressTests.java
  6. +26 −26 ...rc/test/java/org/elasticsearch/client/transform/transforms/hlrc/DataFrameTransformStatsTests.java
  7. +4 −4 docs/reference/rest-api/info.asciidoc
  8. +31 −31 x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientPlugin.java
  9. +2 −2 x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackField.java
  10. +11 −11 ...lasticsearch/xpack/core/transform/{DataFrameFeatureSetUsage.java → TransformFeatureSetUsage.java}
  11. +2 −2 .../src/main/java/org/elasticsearch/xpack/core/transform/{DataFrameField.java → TransformField.java}
  12. +2 −2 ...ain/java/org/elasticsearch/xpack/core/transform/{DataFrameMessages.java → TransformMessages.java}
  13. +2 −2 .../xpack/core/transform/{DataFrameNamedXContentProvider.java → TransformNamedXContentProvider.java}
  14. +5 −5 ...ch/xpack/core/transform/action/{DeleteDataFrameTransformAction.java → DeleteTransformAction.java}
  15. +19 −19 ...search/xpack/core/transform/action/{GetDataFrameTransformsAction.java → GetTransformsAction.java}
  16. +18 −18 ...ck/core/transform/action/{GetDataFrameTransformsStatsAction.java → GetTransformsStatsAction.java}
  17. +14 −14 .../xpack/core/transform/action/{PreviewDataFrameTransformAction.java → PreviewTransformAction.java}
  18. +20 −20 ...icsearch/xpack/core/transform/action/{PutDataFrameTransformAction.java → PutTransformAction.java}
  19. +6 −6 ...arch/xpack/core/transform/action/{StartDataFrameTransformAction.java → StartTransformAction.java}
  20. +7 −7 ...ck/core/transform/action/{StartDataFrameTransformTaskAction.java → StartTransformTaskAction.java}
  21. +8 −8 ...search/xpack/core/transform/action/{StopDataFrameTransformAction.java → StopTransformAction.java}
  22. +18 −18 ...ch/xpack/core/transform/action/{UpdateDataFrameTransformAction.java → UpdateTransformAction.java}
  23. +6 −6 ...arch/xpack/core/transform/notifications/{DataFrameAuditMessage.java → TransformAuditMessage.java}
  24. +2 −2 x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/QueryConfig.java
  25. +2 −2 x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/SyncConfig.java
  26. +10 −10 ...k/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/TimeSyncConfig.java
  27. +15 −15 ...java/org/elasticsearch/xpack/core/transform/transforms/{DataFrameTransform.java → Transform.java}
  28. +24 −24 ...ch/xpack/core/transform/transforms/{DataFrameTransformCheckpoint.java → TransformCheckpoint.java}
  29. +28 −28 ...ore/transform/transforms/{DataFrameTransformCheckpointStats.java → TransformCheckpointStats.java}
  30. +24 −24 ...transform/transforms/{DataFrameTransformCheckpointingInfo.java → TransformCheckpointingInfo.java}
  31. +49 −49 ...sticsearch/xpack/core/transform/transforms/{DataFrameTransformConfig.java → TransformConfig.java}
  32. +26 −26 ...pack/core/transform/transforms/{DataFrameTransformConfigUpdate.java → TransformConfigUpdate.java}
  33. +7 −7 ...h/xpack/core/transform/transforms/{DataFrameIndexerPosition.java → TransformIndexerPosition.java}
  34. +10 −10 ...pack/core/transform/transforms/{DataFrameIndexerTransformStats.java → TransformIndexerStats.java}
  35. +9 −9 ...search/xpack/core/transform/transforms/{DataFrameTransformProgress.java → TransformProgress.java}
  36. +33 −33 ...lasticsearch/xpack/core/transform/transforms/{DataFrameTransformState.java → TransformState.java}
  37. +46 −46 ...lasticsearch/xpack/core/transform/transforms/{DataFrameTransformStats.java → TransformStats.java}
  38. +26 −26 ...arch/xpack/core/transform/transforms/{DataFrameTransformStoredDoc.java → TransformStoredDoc.java}
  39. +5 −5 ...arch/xpack/core/transform/transforms/{DataFrameTransformTaskState.java → TransformTaskState.java}
  40. +4 −4 ...core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/pivot/AggregationConfig.java
  41. +6 −6 ...lugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/pivot/GroupConfig.java
  42. +10 −10 ...lugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/pivot/PivotConfig.java
  43. +2 −2 ...java/org/elasticsearch/xpack/core/transform/utils/{DataFrameStrings.java → TransformStrings.java}
  44. +21 −21 ...core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java
  45. +7 −7 ...ch/xpack/core/transform/{DataFrameFeatureSetUsageTests.java → TransformFeatureSetUsageTests.java}
  46. +4 −4 ...rg/elasticsearch/xpack/core/transform/{DataFrameMessagesTests.java → TransformMessagesTests.java}
  47. +5 −5 ...rm/action/{AbstractSerializingDataFrameTestCase.java → AbstractSerializingTransformTestCase.java}
  48. +5 −5 ...n/{AbstractWireSerializingDataFrameTestCase.java → AbstractWireSerializingTransformTestCase.java}
  49. +2 −2 .../action/{StartDataFrameTransformActionRequestTests.java → DeleteTransformActionRequestTests.java}
  50. +2 −2 ...orm/action/{GetDataFrameTransformsActionRequestTests.java → GetTransformsActionRequestTests.java}
  51. +13 −13 ...m/action/{GetDataFrameTransformsActionResponseTests.java → GetTransformsActionResponseTests.java}
  52. +2 −2 .../{GetDataFrameTransformsStatsActionRequestTests.java → GetTransformsStatsActionRequestTests.java}
  53. +6 −6 ...GetDataFrameTransformsStatsActionResponseTests.java → GetTransformsStatsActionResponseTests.java}
  54. +6 −6 ...tion/{PreviewDataFrameTransformActionRequestTests.java → PreviewTransformActionRequestTests.java}
  55. +2 −2 .../{PreviewDataFrameTransformsActionResponseTests.java → PreviewTransformsActionResponseTests.java}
  56. +2 −2 ...wDataFrameTransformsActionResponseWireTests.java → PreviewTransformsActionResponseWireTests.java}
  57. +7 −7 ...sform/action/{PutDataFrameTransformActionRequestTests.java → PutTransformActionRequestTests.java}
  58. +0 −23 .../org/elasticsearch/xpack/core/transform/action/StartDataFrameTransformTaskActionRequestTests.java
  59. +0 −23 ...org/elasticsearch/xpack/core/transform/action/StartDataFrameTransformTaskActionResponseTests.java
  60. +2 −2 .../action/{DeleteDataFrameTransformActionRequestTests.java → StartTransformActionRequestTests.java}
  61. +2 −2 .../action/{StopDataFrameTransformActionResponseTests.java → StartTransformActionResponseTests.java}
  62. +23 −0 ...test/java/org/elasticsearch/xpack/core/transform/action/StartTransformTaskActionRequestTests.java
  63. +23 −0 ...est/java/org/elasticsearch/xpack/core/transform/action/StartTransformTaskActionResponseTests.java
  64. +4 −4 ...orm/action/{StopDataFrameTransformActionRequestTests.java → StopTransformActionRequestTests.java}
  65. +2 −2 .../action/{StartDataFrameTransformActionResponseTests.java → StopTransformActionResponseTests.java}
  66. +3 −3 ...action/{UpdateDataFrameTransformActionRequestTests.java → UpdateTransformActionRequestTests.java}
  67. +6 −6 ...on/{UpdateDataFrameTransformsActionResponseTests.java → UpdateTransformsActionResponseTests.java}
  68. +6 −6 .../core/transform/notifications/{DataFrameAuditMessageTests.java → TransformAuditMessageTests.java}
  69. +6 −6 ...ransforms/{AbstractSerializingDataFrameTestCase.java → AbstractSerializingTransformTestCase.java}
  70. +0 −37 ...ava/org/elasticsearch/xpack/core/transform/transforms/DataFrameTransformCheckpointStatsTests.java
  71. +1 −1 .../plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/transforms/DestConfigTests.java
  72. +1 −1 ...plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/transforms/QueryConfigTests.java
  73. +1 −1 ...lugin/core/src/test/java/org/elasticsearch/xpack/core/transform/transforms/SourceConfigTests.java
  74. +37 −0 ...rc/test/java/org/elasticsearch/xpack/core/transform/transforms/TransformCheckpointStatsTests.java
  75. +32 −32 ...ore/transform/transforms/{DataFrameTransformCheckpointTests.java → TransformCheckpointTests.java}
  76. +14 −14 ...transforms/{DataFrameTransformCheckpointingInfoTests.java → TransformCheckpointingInfoTests.java}
  77. +23 −23 .../xpack/core/transform/transforms/{DataFrameTransformConfigTests.java → TransformConfigTests.java}
  78. +23 −23 ...transform/transforms/{DataFrameTransformConfigUpdateTests.java → TransformConfigUpdateTests.java}
  79. +8 −8 ...re/transform/transforms/{DataFrameIndexerPositionTests.java → TransformIndexerPositionTests.java}
  80. +9 −9 ...transform/transforms/{DataFrameIndexerTransformStatsTests.java → TransformIndexerStatsTests.java}
  81. +22 −22 ...ck/core/transform/transforms/{DataFrameTransformProgressTests.java → TransformProgressTests.java}
  82. +10 −10 ...ch/xpack/core/transform/transforms/{DataFrameTransformStateTests.java → TransformStateTests.java}
  83. +11 −11 ...ch/xpack/core/transform/transforms/{DataFrameTransformStatsTests.java → TransformStatsTests.java}
  84. +13 −13 .../core/transform/transforms/{DataFrameTransformStoredDocTests.java → TransformStoredDocTests.java}
  85. +12 −12 .../core/transform/transforms/{DataFrameTransformTaskStateTests.java → TransformTaskStateTests.java}
  86. +9 −9 ...lasticsearch/xpack/core/transform/transforms/{DataFrameTransformTests.java → TransformTests.java}
  87. +2 −2 ...src/test/java/org/elasticsearch/xpack/core/transform/transforms/pivot/AggregationConfigTests.java
  88. +2 −2 .../core/src/test/java/org/elasticsearch/xpack/core/transform/transforms/pivot/PivotConfigTests.java
  89. +7 −7 ...lasticsearch/xpack/core/transform/utils/{DataFrameStringsTests.java → TransformStringsTests.java}
  90. +4 −4 ...ts/src/test/java/org/elasticsearch/xpack/dataframe/integration/DataFrameConfigurationIndexIT.java
  91. +3 −3 ...-tests/src/test/java/org/elasticsearch/xpack/dataframe/integration/DataFrameGetAndGetStatsIT.java
  92. +6 −6 ...node-tests/src/test/java/org/elasticsearch/xpack/dataframe/integration/DataFrameRestTestCase.java
  93. +5 −5 ...tests/src/test/java/org/elasticsearch/xpack/dataframe/integration/DataFrameTaskFailedStateIT.java
  94. +7 −7 ...rc/test/java/org/elasticsearch/xpack/dataframe/integration/DataFrameTransformInternalIndexIT.java
  95. +6 −6 ...sts/src/test/java/org/elasticsearch/xpack/dataframe/integration/DataFrameTransformProgressIT.java
  96. +18 −18 ...ngle-node-tests/src/test/java/org/elasticsearch/xpack/dataframe/integration/DataFrameUsageIT.java
  97. +20 −20 x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/DataFrame.java
  98. +36 −36 x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/DataFrameFeatureSet.java
  99. +2 −2 x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/action/DataFrameNodes.java
  100. +6 −6 ...c/main/java/org/elasticsearch/xpack/transform/action/TransportDeleteDataFrameTransformAction.java
  101. +15 −15 ...src/main/java/org/elasticsearch/xpack/transform/action/TransportGetDataFrameTransformsAction.java
  102. +33 −33 ...ain/java/org/elasticsearch/xpack/transform/action/TransportGetDataFrameTransformsStatsAction.java
  103. +18 −18 .../main/java/org/elasticsearch/xpack/transform/action/TransportPreviewDataFrameTransformAction.java
  104. +16 −16 .../src/main/java/org/elasticsearch/xpack/transform/action/TransportPutDataFrameTransformAction.java
  105. +45 −45 ...rc/main/java/org/elasticsearch/xpack/transform/action/TransportStartDataFrameTransformAction.java
  106. +15 −15 ...ain/java/org/elasticsearch/xpack/transform/action/TransportStartDataFrameTransformTaskAction.java
  107. +16 −16 ...src/main/java/org/elasticsearch/xpack/transform/action/TransportStopDataFrameTransformAction.java
  108. +20 −20 ...c/main/java/org/elasticsearch/xpack/transform/action/TransportUpdateDataFrameTransformAction.java
  109. +14 −14 ...ugin/transform/src/main/java/org/elasticsearch/xpack/transform/checkpoint/CheckpointProvider.java
  110. +8 −8 .../main/java/org/elasticsearch/xpack/transform/checkpoint/DataFrameTransformsCheckpointService.java
  111. +42 −42 ...ansform/src/main/java/org/elasticsearch/xpack/transform/checkpoint/DefaultCheckpointProvider.java
  112. +7 −7 ...sform/src/main/java/org/elasticsearch/xpack/transform/checkpoint/TimeBasedCheckpointProvider.java
  113. +3 −3 ...gin/transform/src/main/java/org/elasticsearch/xpack/transform/notifications/DataFrameAuditor.java
  114. +41 −41 ...transform/src/main/java/org/elasticsearch/xpack/transform/persistence/DataFrameInternalIndex.java
  115. +59 −59 ...src/main/java/org/elasticsearch/xpack/transform/persistence/DataFrameTransformsConfigManager.java
  116. +11 −11 .../plugin/transform/src/main/java/org/elasticsearch/xpack/transform/persistence/DataframeIndex.java
  117. +7 −7 ...c/main/java/org/elasticsearch/xpack/transform/rest/action/RestDeleteDataFrameTransformAction.java
  118. +8 −8 ...src/main/java/org/elasticsearch/xpack/transform/rest/action/RestGetDataFrameTransformsAction.java
  119. +8 −8 ...ain/java/org/elasticsearch/xpack/transform/rest/action/RestGetDataFrameTransformsStatsAction.java
  120. +5 −5 .../main/java/org/elasticsearch/xpack/transform/rest/action/RestPreviewDataFrameTransformAction.java
  121. +7 −7 .../src/main/java/org/elasticsearch/xpack/transform/rest/action/RestPutDataFrameTransformAction.java
  122. +8 −8 ...rc/main/java/org/elasticsearch/xpack/transform/rest/action/RestStartDataFrameTransformAction.java
  123. +11 −11 ...src/main/java/org/elasticsearch/xpack/transform/rest/action/RestStopDataFrameTransformAction.java
  124. +7 −7 ...c/main/java/org/elasticsearch/xpack/transform/rest/action/RestUpdateDataFrameTransformAction.java
  125. +32 −32 .../transform/src/main/java/org/elasticsearch/xpack/transform/transforms/ClientDataFrameIndexer.java
  126. +19 −19 ...orm/src/main/java/org/elasticsearch/xpack/transform/transforms/ClientDataFrameIndexerBuilder.java
  127. +42 −42 ...plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/DataFrameIndexer.java
  128. +29 −29 .../java/org/elasticsearch/xpack/transform/transforms/DataFrameTransformPersistentTasksExecutor.java
  129. +44 −44 .../transform/src/main/java/org/elasticsearch/xpack/transform/transforms/DataFrameTransformTask.java
  130. +16 −16 ...gin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/SourceDestValidator.java
  131. +7 −7 ...ansform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformProgressGatherer.java
  132. +4 −4 ...form/src/main/java/org/elasticsearch/xpack/transform/transforms/pivot/AggregationResultUtils.java
  133. +4 −4 x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/pivot/Pivot.java
  134. +4 −4 ...ck/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/DataFrameFeatureSetTests.java
  135. +4 −4 .../plugin/transform/src/test/java/org/elasticsearch/xpack/transform/action/DataFrameNodesTests.java
  136. +11 −11 ...est/java/org/elasticsearch/xpack/transform/action/TransportStopDataFrameTransformActionTests.java
  137. +28 −28 ...va/org/elasticsearch/xpack/transform/checkpoint/DataFrameTransformCheckpointServiceNodeTests.java
  138. +5 −5 ...rm/src/test/java/org/elasticsearch/xpack/transform/checkpoint/DefaultCheckpointProviderTests.java
  139. +39 −39 ...est/java/org/elasticsearch/xpack/transform/persistence/DataFrameTransformsConfigManagerTests.java
  140. +2 −2 ...in/transform/src/test/java/org/elasticsearch/xpack/transform/persistence/DataframeIndexTests.java
  141. +9 −9 ...sform/src/test/java/org/elasticsearch/xpack/transform/transforms/ClientDataFrameIndexerTests.java
  142. +16 −16 ...n/transform/src/test/java/org/elasticsearch/xpack/transform/transforms/DataFrameIndexerTests.java
  143. +9 −9 .../org/elasticsearch/xpack/transform/transforms/DataFrameTransformPersistentTasksExecutorTests.java
  144. +11 −11 ...ransform/src/test/java/org/elasticsearch/xpack/transform/transforms/SourceDestValidatorTests.java
  145. +8 −8 ...src/test/java/org/elasticsearch/xpack/transform/transforms/pivot/AggregationResultUtilsTests.java
@@ -22,31 +22,31 @@
import org.elasticsearch.client.AbstractResponseTestCase;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.xpack.core.transform.transforms.DataFrameIndexerPosition;
import org.elasticsearch.xpack.core.transform.transforms.TransformIndexerPosition;

import java.util.LinkedHashMap;
import java.util.Map;

import static org.hamcrest.Matchers.equalTo;

public class DataFrameIndexerPositionTests extends AbstractResponseTestCase<
DataFrameIndexerPosition,
TransformIndexerPosition,
org.elasticsearch.client.transform.transforms.DataFrameIndexerPosition> {

public static DataFrameIndexerPosition fromHlrc(
public static TransformIndexerPosition fromHlrc(
org.elasticsearch.client.transform.transforms.DataFrameIndexerPosition instance) {
if (instance == null) {
return null;
}
return new DataFrameIndexerPosition(instance.getIndexerPosition(), instance.getBucketsPosition());
return new TransformIndexerPosition(instance.getIndexerPosition(), instance.getBucketsPosition());
}

public static DataFrameIndexerPosition randomDataFrameIndexerPosition() {
return new DataFrameIndexerPosition(randomPositionMap(), randomPositionMap());
public static TransformIndexerPosition randomDataFrameIndexerPosition() {
return new TransformIndexerPosition(randomPositionMap(), randomPositionMap());
}

@Override
protected DataFrameIndexerPosition createServerTestInstance(XContentType xContentType) {
protected TransformIndexerPosition createServerTestInstance(XContentType xContentType) {
return randomDataFrameIndexerPosition();
}

@@ -56,7 +56,7 @@ protected DataFrameIndexerPosition createServerTestInstance(XContentType xConten
}

@Override
protected void assertInstances(DataFrameIndexerPosition serverTestInstance,
protected void assertInstances(TransformIndexerPosition serverTestInstance,
org.elasticsearch.client.transform.transforms.DataFrameIndexerPosition clientInstance) {
assertThat(serverTestInstance.getIndexerPosition(), equalTo(clientInstance.getIndexerPosition()));
assertThat(serverTestInstance.getBucketsPosition(), equalTo(clientInstance.getBucketsPosition()));
@@ -21,17 +21,17 @@

import org.elasticsearch.client.AbstractHlrcXContentTestCase;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.xpack.core.transform.transforms.DataFrameIndexerTransformStats;
import org.elasticsearch.xpack.core.transform.transforms.TransformIndexerStats;

import java.io.IOException;

public class DataFrameIndexerTransformStatsTests extends AbstractHlrcXContentTestCase<
DataFrameIndexerTransformStats,
TransformIndexerStats,
org.elasticsearch.client.transform.transforms.DataFrameIndexerTransformStats> {

public static DataFrameIndexerTransformStats fromHlrc(
public static TransformIndexerStats fromHlrc(
org.elasticsearch.client.transform.transforms.DataFrameIndexerTransformStats instance) {
return new DataFrameIndexerTransformStats(
return new TransformIndexerStats(
instance.getNumPages(),
instance.getNumDocuments(),
instance.getOutputDocuments(),
@@ -54,13 +54,13 @@ public static DataFrameIndexerTransformStats fromHlrc(
}

@Override
public DataFrameIndexerTransformStats convertHlrcToInternal(
public TransformIndexerStats convertHlrcToInternal(
org.elasticsearch.client.transform.transforms.DataFrameIndexerTransformStats instance) {
return fromHlrc(instance);
}

public static DataFrameIndexerTransformStats randomStats() {
return new DataFrameIndexerTransformStats(randomLongBetween(10L, 10000L),
public static TransformIndexerStats randomStats() {
return new TransformIndexerStats(randomLongBetween(10L, 10000L),
randomLongBetween(0L, 10000L), randomLongBetween(0L, 10000L), randomLongBetween(0L, 10000L), randomLongBetween(0L, 10000L),
randomLongBetween(0L, 10000L), randomLongBetween(0L, 10000L), randomLongBetween(0L, 10000L), randomLongBetween(0L, 10000L),
randomLongBetween(0L, 10000L),
@@ -70,13 +70,13 @@ public static DataFrameIndexerTransformStats randomStats() {
}

@Override
protected DataFrameIndexerTransformStats createTestInstance() {
protected TransformIndexerStats createTestInstance() {
return randomStats();
}

@Override
protected DataFrameIndexerTransformStats doParseInstance(XContentParser parser) throws IOException {
return DataFrameIndexerTransformStats.fromXContent(parser);
protected TransformIndexerStats doParseInstance(XContentParser parser) throws IOException {
return TransformIndexerStats.fromXContent(parser);
}

@Override
@@ -22,34 +22,34 @@
import org.elasticsearch.client.AbstractResponseTestCase;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.xpack.core.transform.transforms.DataFrameTransformCheckpointStats;
import org.elasticsearch.xpack.core.transform.transforms.TransformCheckpointStats;

import java.io.IOException;

import static org.hamcrest.Matchers.equalTo;

public class DataFrameTransformCheckpointStatsTests extends AbstractResponseTestCase<
DataFrameTransformCheckpointStats,
TransformCheckpointStats,
org.elasticsearch.client.transform.transforms.DataFrameTransformCheckpointStats> {

public static DataFrameTransformCheckpointStats fromHlrc(
public static TransformCheckpointStats fromHlrc(
org.elasticsearch.client.transform.transforms.DataFrameTransformCheckpointStats instance) {
return new DataFrameTransformCheckpointStats(instance.getCheckpoint(),
return new TransformCheckpointStats(instance.getCheckpoint(),
DataFrameIndexerPositionTests.fromHlrc(instance.getPosition()),
DataFrameTransformProgressTests.fromHlrc(instance.getCheckpointProgress()),
instance.getTimestampMillis(),
instance.getTimeUpperBoundMillis());
}

public static DataFrameTransformCheckpointStats randomDataFrameTransformCheckpointStats() {
return new DataFrameTransformCheckpointStats(randomLongBetween(1, 1_000_000),
public static TransformCheckpointStats randomDataFrameTransformCheckpointStats() {
return new TransformCheckpointStats(randomLongBetween(1, 1_000_000),
DataFrameIndexerPositionTests.randomDataFrameIndexerPosition(),
randomBoolean() ? null : DataFrameTransformProgressTests.randomDataFrameTransformProgress(),
randomLongBetween(1, 1_000_000), randomLongBetween(0, 1_000_000));
}

@Override
protected DataFrameTransformCheckpointStats createServerTestInstance(XContentType xContentType) {
protected TransformCheckpointStats createServerTestInstance(XContentType xContentType) {
return randomDataFrameTransformCheckpointStats();
}

@@ -60,7 +60,7 @@ protected DataFrameTransformCheckpointStats createServerTestInstance(XContentTyp
}

@Override
protected void assertInstances(DataFrameTransformCheckpointStats serverTestInstance,
protected void assertInstances(TransformCheckpointStats serverTestInstance,
org.elasticsearch.client.transform.transforms.DataFrameTransformCheckpointStats clientInstance) {
assertThat(serverTestInstance.getCheckpoint(), equalTo(clientInstance.getCheckpoint()));
assertThat(serverTestInstance.getPosition().getBucketsPosition(), equalTo(clientInstance.getPosition().getBucketsPosition()));
@@ -21,19 +21,19 @@

import org.elasticsearch.client.AbstractHlrcXContentTestCase;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.xpack.core.transform.transforms.DataFrameTransformCheckpointingInfo;
import org.elasticsearch.xpack.core.transform.transforms.TransformCheckpointingInfo;

import java.io.IOException;
import java.time.Instant;
import java.util.function.Predicate;

public class DataFrameTransformCheckpointingInfoTests extends AbstractHlrcXContentTestCase<
DataFrameTransformCheckpointingInfo,
TransformCheckpointingInfo,
org.elasticsearch.client.transform.transforms.DataFrameTransformCheckpointingInfo> {

public static DataFrameTransformCheckpointingInfo fromHlrc(
public static TransformCheckpointingInfo fromHlrc(
org.elasticsearch.client.transform.transforms.DataFrameTransformCheckpointingInfo instance) {
return new DataFrameTransformCheckpointingInfo(
return new TransformCheckpointingInfo(
DataFrameTransformCheckpointStatsTests.fromHlrc(instance.getLast()),
DataFrameTransformCheckpointStatsTests.fromHlrc(instance.getNext()),
instance.getOperationsBehind(),
@@ -46,27 +46,27 @@ public static DataFrameTransformCheckpointingInfo fromHlrc(
}

@Override
public DataFrameTransformCheckpointingInfo convertHlrcToInternal(
public TransformCheckpointingInfo convertHlrcToInternal(
org.elasticsearch.client.transform.transforms.DataFrameTransformCheckpointingInfo instance) {
return fromHlrc(instance);
}

public static DataFrameTransformCheckpointingInfo randomDataFrameTransformCheckpointingInfo() {
return new DataFrameTransformCheckpointingInfo(
public static TransformCheckpointingInfo randomDataFrameTransformCheckpointingInfo() {
return new TransformCheckpointingInfo(
DataFrameTransformCheckpointStatsTests.randomDataFrameTransformCheckpointStats(),
DataFrameTransformCheckpointStatsTests.randomDataFrameTransformCheckpointStats(),
randomNonNegativeLong(),
randomBoolean() ? null : Instant.ofEpochMilli(randomNonNegativeLong()));
}

@Override
protected DataFrameTransformCheckpointingInfo createTestInstance() {
protected TransformCheckpointingInfo createTestInstance() {
return randomDataFrameTransformCheckpointingInfo();
}

@Override
protected DataFrameTransformCheckpointingInfo doParseInstance(XContentParser parser) throws IOException {
return DataFrameTransformCheckpointingInfo.fromXContent(parser);
protected TransformCheckpointingInfo doParseInstance(XContentParser parser) throws IOException {
return TransformCheckpointingInfo.fromXContent(parser);
}

@Override
@@ -22,37 +22,37 @@
import org.elasticsearch.client.AbstractResponseTestCase;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.xpack.core.transform.transforms.DataFrameTransformProgress;
import org.elasticsearch.xpack.core.transform.transforms.TransformProgress;

import static org.hamcrest.Matchers.equalTo;

public class DataFrameTransformProgressTests extends AbstractResponseTestCase<
DataFrameTransformProgress,
TransformProgress,
org.elasticsearch.client.transform.transforms.DataFrameTransformProgress> {

public static DataFrameTransformProgress fromHlrc(
public static TransformProgress fromHlrc(
org.elasticsearch.client.transform.transforms.DataFrameTransformProgress instance) {
if (instance == null) {
return null;
}
return new DataFrameTransformProgress(instance.getTotalDocs(),
return new TransformProgress(instance.getTotalDocs(),
instance.getRemainingDocs(),
instance.getDocumentsProcessed(),
instance.getDocumentsIndexed());
}

public static DataFrameTransformProgress randomDataFrameTransformProgress() {
public static TransformProgress randomDataFrameTransformProgress() {
Long totalDocs = randomBoolean() ? null : randomNonNegativeLong();
Long docsRemaining = totalDocs != null ? randomLongBetween(0, totalDocs) : null;
return new DataFrameTransformProgress(
return new TransformProgress(
totalDocs,
docsRemaining,
totalDocs != null ? totalDocs - docsRemaining : randomNonNegativeLong(),
randomBoolean() ? null : randomNonNegativeLong());
}

@Override
protected DataFrameTransformProgress createServerTestInstance(XContentType xContentType) {
protected TransformProgress createServerTestInstance(XContentType xContentType) {
return randomDataFrameTransformProgress();
}

@@ -62,7 +62,7 @@ protected DataFrameTransformProgress createServerTestInstance(XContentType xCont
}

@Override
protected void assertInstances(DataFrameTransformProgress serverTestInstance,
protected void assertInstances(TransformProgress serverTestInstance,
org.elasticsearch.client.transform.transforms.DataFrameTransformProgress clientInstance) {
assertThat(serverTestInstance.getTotalDocs(), equalTo(clientInstance.getTotalDocs()));
assertThat(serverTestInstance.getDocumentsProcessed(), equalTo(clientInstance.getDocumentsProcessed()));

0 comments on commit c8f52ec

Please sign in to comment.
You can’t perform that action at this time.