|
@@ -1,15 +1,14 @@
|
|
|
/*
|
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
|
- * 2.0; you may not use this file except in compliance with the Elastic License
|
|
|
- * 2.0.
|
|
|
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
|
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
|
+ * Side Public License, v 1.
|
|
|
*/
|
|
|
-package org.elasticsearch.xpack.core.downsample;
|
|
|
+package org.elasticsearch.action.downsample;
|
|
|
|
|
|
-import org.elasticsearch.action.downsample.DownsampleConfig;
|
|
|
import org.elasticsearch.tasks.CancellableTask;
|
|
|
import org.elasticsearch.tasks.TaskId;
|
|
|
-import org.elasticsearch.xpack.core.rollup.RollupField;
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -18,10 +17,11 @@ import java.util.Map;
|
|
|
* which drives the indexing, and periodically updates it's parent PersistentTask with the indexing's current position.
|
|
|
*/
|
|
|
public class DownsampleTask extends CancellableTask {
|
|
|
+ private static final String ROLLUP_FIELD_NAME = "rollup";
|
|
|
private final String downsampleIndex;
|
|
|
private final DownsampleConfig config;
|
|
|
|
|
|
- DownsampleTask(
|
|
|
+ public DownsampleTask(
|
|
|
long id,
|
|
|
String type,
|
|
|
String action,
|
|
@@ -30,7 +30,7 @@ public class DownsampleTask extends CancellableTask {
|
|
|
DownsampleConfig config,
|
|
|
Map<String, String> headers
|
|
|
) {
|
|
|
- super(id, type, action, RollupField.NAME + "_" + downsampleIndex, parentTask, headers);
|
|
|
+ super(id, type, action, ROLLUP_FIELD_NAME + "_" + downsampleIndex, parentTask, headers);
|
|
|
this.downsampleIndex = downsampleIndex;
|
|
|
this.config = config;
|
|
|
}
|