move ILM client objects from protocol to client (#33532)
This commit is contained in:
parent
f83641346f
commit
e0b99d7ab3
|
@ -25,12 +25,12 @@ import org.elasticsearch.client.indexlifecycle.DeleteLifecyclePolicyRequest;
|
|||
import org.elasticsearch.client.indexlifecycle.LifecycleManagementStatusRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.LifecycleManagementStatusResponse;
|
||||
import org.elasticsearch.client.indexlifecycle.PutLifecyclePolicyRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleResponse;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyResponse;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.StartILMRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.StopILMRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.ExplainLifecycleResponse;
|
||||
import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyResponse;
|
||||
import org.elasticsearch.client.indexlifecycle.StartILMRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.StopILMRequest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
|
|
@ -112,10 +112,10 @@ import org.elasticsearch.index.reindex.ReindexRequest;
|
|||
import org.elasticsearch.index.reindex.UpdateByQueryRequest;
|
||||
import org.elasticsearch.protocol.xpack.XPackInfoRequest;
|
||||
import org.elasticsearch.protocol.xpack.XPackUsageRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.StartILMRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.StopILMRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.StartILMRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.StopILMRequest;
|
||||
import org.elasticsearch.protocol.xpack.migration.IndexUpgradeInfoRequest;
|
||||
import org.elasticsearch.protocol.xpack.watcher.DeleteWatchRequest;
|
||||
import org.elasticsearch.protocol.xpack.watcher.PutWatchRequest;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.support.master.info.ClusterInfoRequest;
|
||||
|
@ -29,7 +29,7 @@ import java.util.Objects;
|
|||
|
||||
/**
|
||||
* The request object used by the Explain Lifecycle API.
|
||||
*
|
||||
*
|
||||
* Multiple indices may be queried in the same request using the
|
||||
* {@link #indices(String...)} method
|
||||
*/
|
||||
|
@ -71,4 +71,4 @@ public class ExplainLifecycleRequest extends ClusterInfoRequest<ExplainLifecycle
|
|||
return "ExplainLifecycleRequest [indices()=" + Arrays.toString(indices()) + ", indicesOptions()=" + indicesOptions() + "]";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.common.ParseField;
|
||||
|
@ -39,7 +39,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
/**
|
||||
* The response object returned by the Explain Lifecycle API.
|
||||
*
|
||||
*
|
||||
* Since the API can be run over multiple indices the response provides a map of
|
||||
* index to the explanation of the lifecycle status for that index.
|
||||
*/
|
||||
|
@ -132,4 +132,4 @@ public class ExplainLifecycleResponse extends ActionResponse implements ToXConte
|
|||
return Strings.toString(this, true, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.common.ParseField;
|
||||
import org.elasticsearch.common.Strings;
|
||||
|
@ -56,18 +56,18 @@ public class IndexLifecycleExplainResponse implements ToXContentObject, Writeabl
|
|||
public static final ConstructingObjectParser<IndexLifecycleExplainResponse, Void> PARSER = new ConstructingObjectParser<>(
|
||||
"index_lifecycle_explain_response",
|
||||
a -> new IndexLifecycleExplainResponse(
|
||||
(String) a[0],
|
||||
(boolean) a[1],
|
||||
(String) a[2],
|
||||
(boolean) (a[3] == null ? false: a[3]),
|
||||
(long) (a[4] == null ? -1L: a[4]),
|
||||
(String) a[0],
|
||||
(boolean) a[1],
|
||||
(String) a[2],
|
||||
(boolean) (a[3] == null ? false: a[3]),
|
||||
(long) (a[4] == null ? -1L: a[4]),
|
||||
(String) a[5],
|
||||
(String) a[6],
|
||||
(String) a[7],
|
||||
(String) a[8],
|
||||
(long) (a[9] == null ? -1L: a[9]),
|
||||
(long) (a[10] == null ? -1L: a[10]),
|
||||
(long) (a[11] == null ? -1L: a[11]),
|
||||
(String) a[6],
|
||||
(String) a[7],
|
||||
(String) a[8],
|
||||
(long) (a[9] == null ? -1L: a[9]),
|
||||
(long) (a[10] == null ? -1L: a[10]),
|
||||
(long) (a[11] == null ? -1L: a[11]),
|
||||
(BytesReference) a[12]));
|
||||
static {
|
||||
PARSER.declareString(ConstructingObjectParser.constructorArg(), INDEX_FIELD);
|
||||
|
@ -158,7 +158,7 @@ public class IndexLifecycleExplainResponse implements ToXContentObject, Writeabl
|
|||
actionTime = in.readZLong();
|
||||
stepTime = in.readZLong();
|
||||
stepInfo = in.readOptionalBytesReference();
|
||||
|
||||
|
||||
} else {
|
||||
policyName = null;
|
||||
skip = false;
|
||||
|
@ -196,7 +196,7 @@ public class IndexLifecycleExplainResponse implements ToXContentObject, Writeabl
|
|||
public String getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
public boolean managedByILM() {
|
||||
return managedByILM;
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ public class IndexLifecycleExplainResponse implements ToXContentObject, Writeabl
|
|||
public String getPolicyName() {
|
||||
return policyName;
|
||||
}
|
||||
|
||||
|
||||
public boolean skip() {
|
||||
return skip;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ public class IndexLifecycleExplainResponse implements ToXContentObject, Writeabl
|
|||
public String getFailedStep() {
|
||||
return failedStep;
|
||||
}
|
||||
|
||||
|
||||
public BytesReference getStepInfo() {
|
||||
return stepInfo;
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.common.ParseField;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedRequest;
|
||||
|
@ -47,4 +47,4 @@ public class StartILMRequest extends AcknowledgedRequest<StartILMRequest> {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedRequest;
|
||||
|
@ -47,4 +47,4 @@ public class StopILMRequest extends AcknowledgedRequest<StopILMRequest> {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -37,13 +37,13 @@ import org.elasticsearch.client.indexlifecycle.RolloverAction;
|
|||
import org.elasticsearch.client.indexlifecycle.ShrinkAction;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleResponse;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.IndexLifecycleExplainResponse;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyResponse;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.StartILMRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.StopILMRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.ExplainLifecycleResponse;
|
||||
import org.elasticsearch.client.indexlifecycle.IndexLifecycleExplainResponse;
|
||||
import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyResponse;
|
||||
import org.elasticsearch.client.indexlifecycle.StartILMRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.StopILMRequest;
|
||||
import org.hamcrest.Matchers;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
|
@ -128,10 +128,10 @@ import org.elasticsearch.index.reindex.ReindexRequest;
|
|||
import org.elasticsearch.index.reindex.RemoteInfo;
|
||||
import org.elasticsearch.index.reindex.UpdateByQueryRequest;
|
||||
import org.elasticsearch.protocol.xpack.XPackInfoRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.StartILMRequest;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.StopILMRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.StartILMRequest;
|
||||
import org.elasticsearch.client.indexlifecycle.StopILMRequest;
|
||||
import org.elasticsearch.protocol.xpack.migration.IndexUpgradeInfoRequest;
|
||||
import org.elasticsearch.protocol.xpack.watcher.DeleteWatchRequest;
|
||||
import org.elasticsearch.protocol.xpack.watcher.PutWatchRequest;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.io.stream.Writeable.Reader;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.test.AbstractStreamableXContentTestCase;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.test.AbstractStreamableTestCase;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.test.AbstractStreamableXContentTestCase;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.test.AbstractStreamableTestCase;
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.protocol.xpack.indexlifecycle;
|
||||
package org.elasticsearch.client.indexlifecycle;
|
||||
|
||||
import org.elasticsearch.test.AbstractStreamableTestCase;
|
||||
|
Loading…
Reference in New Issue