This commit is contained in:
parent
2079f1cbeb
commit
098f540f9d
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.ResourceNotFoundException;
|
import org.elasticsearch.ResourceNotFoundException;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
|
@ -50,6 +52,8 @@ import java.util.stream.Collectors;
|
||||||
public class TransportCloseJobAction extends TransportTasksAction<TransportOpenJobAction.JobTask, CloseJobAction.Request,
|
public class TransportCloseJobAction extends TransportTasksAction<TransportOpenJobAction.JobTask, CloseJobAction.Request,
|
||||||
CloseJobAction.Response, CloseJobAction.Response> {
|
CloseJobAction.Response, CloseJobAction.Response> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportCloseJobAction.class);
|
||||||
|
|
||||||
private final ThreadPool threadPool;
|
private final ThreadPool threadPool;
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final ClusterService clusterService;
|
private final ClusterService clusterService;
|
||||||
|
|
|
@ -65,7 +65,7 @@ import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||||
public class TransportDeleteDataFrameAnalyticsAction
|
public class TransportDeleteDataFrameAnalyticsAction
|
||||||
extends TransportMasterNodeAction<DeleteDataFrameAnalyticsAction.Request, AcknowledgedResponse> {
|
extends TransportMasterNodeAction<DeleteDataFrameAnalyticsAction.Request, AcknowledgedResponse> {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger(TransportDeleteDataFrameAnalyticsAction.class);
|
private static final Logger logger = LogManager.getLogger(TransportDeleteDataFrameAnalyticsAction.class);
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final MlMemoryTracker memoryTracker;
|
private final MlMemoryTracker memoryTracker;
|
||||||
|
@ -124,13 +124,13 @@ public class TransportDeleteDataFrameAnalyticsAction
|
||||||
ActionListener<BulkByScrollResponse> deleteStateHandler = ActionListener.wrap(
|
ActionListener<BulkByScrollResponse> deleteStateHandler = ActionListener.wrap(
|
||||||
bulkByScrollResponse -> {
|
bulkByScrollResponse -> {
|
||||||
if (bulkByScrollResponse.isTimedOut()) {
|
if (bulkByScrollResponse.isTimedOut()) {
|
||||||
LOGGER.warn("[{}] DeleteByQuery for state timed out", id);
|
logger.warn("[{}] DeleteByQuery for state timed out", id);
|
||||||
}
|
}
|
||||||
if (bulkByScrollResponse.getBulkFailures().isEmpty() == false) {
|
if (bulkByScrollResponse.getBulkFailures().isEmpty() == false) {
|
||||||
LOGGER.warn("[{}] {} failures and {} conflicts encountered while runnint DeleteByQuery for state", id,
|
logger.warn("[{}] {} failures and {} conflicts encountered while runnint DeleteByQuery for state", id,
|
||||||
bulkByScrollResponse.getBulkFailures().size(), bulkByScrollResponse.getVersionConflicts());
|
bulkByScrollResponse.getBulkFailures().size(), bulkByScrollResponse.getVersionConflicts());
|
||||||
for (BulkItemResponse.Failure failure : bulkByScrollResponse.getBulkFailures()) {
|
for (BulkItemResponse.Failure failure : bulkByScrollResponse.getBulkFailures()) {
|
||||||
LOGGER.warn("[{}] DBQ failure: {}", id, failure);
|
logger.warn("[{}] DBQ failure: {}", id, failure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deleteConfig(parentTaskClient, id, listener);
|
deleteConfig(parentTaskClient, id, listener);
|
||||||
|
@ -159,7 +159,7 @@ public class TransportDeleteDataFrameAnalyticsAction
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert deleteResponse.getResult() == DocWriteResponse.Result.DELETED;
|
assert deleteResponse.getResult() == DocWriteResponse.Result.DELETED;
|
||||||
LOGGER.info("[{}] Deleted", id);
|
logger.info("[{}] Deleted", id);
|
||||||
auditor.info(id, Messages.DATA_FRAME_ANALYTICS_AUDIT_DELETED);
|
auditor.info(id, Messages.DATA_FRAME_ANALYTICS_AUDIT_DELETED);
|
||||||
listener.onResponse(new AcknowledgedResponse(true));
|
listener.onResponse(new AcknowledgedResponse(true));
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.action.support.HandledTransportAction;
|
import org.elasticsearch.action.support.HandledTransportAction;
|
||||||
|
@ -37,6 +39,8 @@ import java.util.function.Supplier;
|
||||||
public class TransportDeleteExpiredDataAction extends HandledTransportAction<DeleteExpiredDataAction.Request,
|
public class TransportDeleteExpiredDataAction extends HandledTransportAction<DeleteExpiredDataAction.Request,
|
||||||
DeleteExpiredDataAction.Response> {
|
DeleteExpiredDataAction.Response> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportDeleteExpiredDataAction.class);
|
||||||
|
|
||||||
// TODO: make configurable in the request
|
// TODO: make configurable in the request
|
||||||
static final Duration MAX_DURATION = Duration.ofHours(8);
|
static final Duration MAX_DURATION = Duration.ofHours(8);
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.ElasticsearchStatusException;
|
import org.elasticsearch.ElasticsearchStatusException;
|
||||||
import org.elasticsearch.ResourceNotFoundException;
|
import org.elasticsearch.ResourceNotFoundException;
|
||||||
|
@ -66,6 +68,8 @@ import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||||
|
|
||||||
public class TransportDeleteForecastAction extends HandledTransportAction<DeleteForecastAction.Request, AcknowledgedResponse> {
|
public class TransportDeleteForecastAction extends HandledTransportAction<DeleteForecastAction.Request, AcknowledgedResponse> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportDeleteForecastAction.class);
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private static final int MAX_FORECAST_TO_SEARCH = 10_000;
|
private static final int MAX_FORECAST_TO_SEARCH = 10_000;
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.ResourceNotFoundException;
|
import org.elasticsearch.ResourceNotFoundException;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
|
@ -29,6 +31,8 @@ import java.util.List;
|
||||||
public class TransportDeleteModelSnapshotAction extends HandledTransportAction<DeleteModelSnapshotAction.Request,
|
public class TransportDeleteModelSnapshotAction extends HandledTransportAction<DeleteModelSnapshotAction.Request,
|
||||||
AcknowledgedResponse> {
|
AcknowledgedResponse> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportDeleteModelSnapshotAction.class);
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final JobManager jobManager;
|
private final JobManager jobManager;
|
||||||
private final JobResultsProvider jobResultsProvider;
|
private final JobResultsProvider jobResultsProvider;
|
||||||
|
|
|
@ -46,7 +46,7 @@ import java.util.Set;
|
||||||
public class TransportDeleteTrainedModelAction
|
public class TransportDeleteTrainedModelAction
|
||||||
extends TransportMasterNodeAction<DeleteTrainedModelAction.Request, AcknowledgedResponse> {
|
extends TransportMasterNodeAction<DeleteTrainedModelAction.Request, AcknowledgedResponse> {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger(TransportDeleteTrainedModelAction.class);
|
private static final Logger logger = LogManager.getLogger(TransportDeleteTrainedModelAction.class);
|
||||||
|
|
||||||
private final TrainedModelProvider trainedModelProvider;
|
private final TrainedModelProvider trainedModelProvider;
|
||||||
private final InferenceAuditor auditor;
|
private final InferenceAuditor auditor;
|
||||||
|
@ -118,7 +118,7 @@ public class TransportDeleteTrainedModelAction
|
||||||
.map(InferenceProcessor::getModelId)
|
.map(InferenceProcessor::getModelId)
|
||||||
.forEach(allReferencedModelKeys::add);
|
.forEach(allReferencedModelKeys::add);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOGGER.warn(new ParameterizedMessage("failed to load pipeline [{}]", pipelineId), ex);
|
logger.warn(new ParameterizedMessage("failed to load pipeline [{}]", pipelineId), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return allReferencedModelKeys;
|
return allReferencedModelKeys;
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class TransportGetDataFrameAnalyticsStatsAction
|
||||||
extends TransportTasksAction<DataFrameAnalyticsTask, GetDataFrameAnalyticsStatsAction.Request,
|
extends TransportTasksAction<DataFrameAnalyticsTask, GetDataFrameAnalyticsStatsAction.Request,
|
||||||
GetDataFrameAnalyticsStatsAction.Response, QueryPage<Stats>> {
|
GetDataFrameAnalyticsStatsAction.Response, QueryPage<Stats>> {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger(TransportGetDataFrameAnalyticsStatsAction.class);
|
private static final Logger logger = LogManager.getLogger(TransportGetDataFrameAnalyticsStatsAction.class);
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ public class TransportGetDataFrameAnalyticsStatsAction
|
||||||
@Override
|
@Override
|
||||||
protected void taskOperation(GetDataFrameAnalyticsStatsAction.Request request, DataFrameAnalyticsTask task,
|
protected void taskOperation(GetDataFrameAnalyticsStatsAction.Request request, DataFrameAnalyticsTask task,
|
||||||
ActionListener<QueryPage<Stats>> listener) {
|
ActionListener<QueryPage<Stats>> listener) {
|
||||||
LOGGER.debug("Get stats for running task [{}]", task.getParams().getId());
|
logger.debug("Get stats for running task [{}]", task.getParams().getId());
|
||||||
|
|
||||||
ActionListener<List<PhaseProgress>> progressListener = ActionListener.wrap(
|
ActionListener<List<PhaseProgress>> progressListener = ActionListener.wrap(
|
||||||
progress -> {
|
progress -> {
|
||||||
|
@ -118,7 +118,7 @@ public class TransportGetDataFrameAnalyticsStatsAction
|
||||||
@Override
|
@Override
|
||||||
protected void doExecute(Task task, GetDataFrameAnalyticsStatsAction.Request request,
|
protected void doExecute(Task task, GetDataFrameAnalyticsStatsAction.Request request,
|
||||||
ActionListener<GetDataFrameAnalyticsStatsAction.Response> listener) {
|
ActionListener<GetDataFrameAnalyticsStatsAction.Response> listener) {
|
||||||
LOGGER.debug("Get stats for data frame analytics [{}]", request.getId());
|
logger.debug("Get stats for data frame analytics [{}]", request.getId());
|
||||||
|
|
||||||
ActionListener<GetDataFrameAnalyticsAction.Response> getResponseListener = ActionListener.wrap(
|
ActionListener<GetDataFrameAnalyticsAction.Response> getResponseListener = ActionListener.wrap(
|
||||||
getResponse -> {
|
getResponse -> {
|
||||||
|
@ -221,7 +221,7 @@ public class TransportGetDataFrameAnalyticsStatsAction
|
||||||
StoredProgress storedProgress = StoredProgress.PARSER.apply(parser, null);
|
StoredProgress storedProgress = StoredProgress.PARSER.apply(parser, null);
|
||||||
return storedProgress;
|
return storedProgress;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error(new ParameterizedMessage("failed to parse progress from doc with it [{}]", hit.getId()), e);
|
logger.error(new ParameterizedMessage("failed to parse progress from doc with it [{}]", hit.getId()), e);
|
||||||
return new StoredProgress(Collections.emptyList());
|
return new StoredProgress(Collections.emptyList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.FailedNodeException;
|
import org.elasticsearch.action.FailedNodeException;
|
||||||
import org.elasticsearch.action.TaskOperationFailure;
|
import org.elasticsearch.action.TaskOperationFailure;
|
||||||
|
@ -50,6 +52,8 @@ import java.util.stream.Collectors;
|
||||||
public class TransportGetJobsStatsAction extends TransportTasksAction<TransportOpenJobAction.JobTask, GetJobsStatsAction.Request,
|
public class TransportGetJobsStatsAction extends TransportTasksAction<TransportOpenJobAction.JobTask, GetJobsStatsAction.Request,
|
||||||
GetJobsStatsAction.Response, QueryPage<JobStats>> {
|
GetJobsStatsAction.Response, QueryPage<JobStats>> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportGetJobsStatsAction.class);
|
||||||
|
|
||||||
private final ClusterService clusterService;
|
private final ClusterService clusterService;
|
||||||
private final AutodetectProcessManager processManager;
|
private final AutodetectProcessManager processManager;
|
||||||
private final JobResultsProvider jobResultsProvider;
|
private final JobResultsProvider jobResultsProvider;
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.action.support.HandledTransportAction;
|
import org.elasticsearch.action.support.HandledTransportAction;
|
||||||
|
@ -22,6 +24,8 @@ import java.util.stream.Collectors;
|
||||||
public class TransportGetModelSnapshotsAction extends HandledTransportAction<GetModelSnapshotsAction.Request,
|
public class TransportGetModelSnapshotsAction extends HandledTransportAction<GetModelSnapshotsAction.Request,
|
||||||
GetModelSnapshotsAction.Response> {
|
GetModelSnapshotsAction.Response> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportGetModelSnapshotsAction.class);
|
||||||
|
|
||||||
private final JobResultsProvider jobResultsProvider;
|
private final JobResultsProvider jobResultsProvider;
|
||||||
private final JobManager jobManager;
|
private final JobManager jobManager;
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.search.SearchRequest;
|
import org.elasticsearch.action.search.SearchRequest;
|
||||||
import org.elasticsearch.action.search.SearchResponse;
|
import org.elasticsearch.action.search.SearchResponse;
|
||||||
|
@ -54,6 +56,8 @@ import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||||
public class TransportGetOverallBucketsAction extends HandledTransportAction<GetOverallBucketsAction.Request,
|
public class TransportGetOverallBucketsAction extends HandledTransportAction<GetOverallBucketsAction.Request,
|
||||||
GetOverallBucketsAction.Response> {
|
GetOverallBucketsAction.Response> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportGetOverallBucketsAction.class);
|
||||||
|
|
||||||
private static final String EARLIEST_TIME = "earliest_time";
|
private static final String EARLIEST_TIME = "earliest_time";
|
||||||
private static final String LATEST_TIME = "latest_time";
|
private static final String LATEST_TIME = "latest_time";
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||||
|
@ -24,6 +26,8 @@ import org.elasticsearch.xpack.ml.notifications.AnomalyDetectionAuditor;
|
||||||
|
|
||||||
public class TransportKillProcessAction extends TransportJobTaskAction<KillProcessAction.Request, KillProcessAction.Response> {
|
public class TransportKillProcessAction extends TransportJobTaskAction<KillProcessAction.Request, KillProcessAction.Response> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportKillProcessAction.class);
|
||||||
|
|
||||||
private final AnomalyDetectionAuditor auditor;
|
private final AnomalyDetectionAuditor auditor;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.action.support.HandledTransportAction;
|
import org.elasticsearch.action.support.HandledTransportAction;
|
||||||
|
@ -34,6 +36,8 @@ import java.util.concurrent.TimeoutException;
|
||||||
|
|
||||||
public class TransportMlInfoAction extends HandledTransportAction<MlInfoAction.Request, MlInfoAction.Response> {
|
public class TransportMlInfoAction extends HandledTransportAction<MlInfoAction.Request, MlInfoAction.Response> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportMlInfoAction.class);
|
||||||
|
|
||||||
private final ClusterService clusterService;
|
private final ClusterService clusterService;
|
||||||
private final NamedXContentRegistry xContentRegistry;
|
private final NamedXContentRegistry xContentRegistry;
|
||||||
private final Map<String, Object> nativeCodeInfo;
|
private final Map<String, Object> nativeCodeInfo;
|
||||||
|
|
|
@ -92,7 +92,7 @@ import static org.elasticsearch.xpack.ml.MachineLearning.MAX_OPEN_JOBS_PER_NODE;
|
||||||
public class TransportStartDataFrameAnalyticsAction
|
public class TransportStartDataFrameAnalyticsAction
|
||||||
extends TransportMasterNodeAction<StartDataFrameAnalyticsAction.Request, AcknowledgedResponse> {
|
extends TransportMasterNodeAction<StartDataFrameAnalyticsAction.Request, AcknowledgedResponse> {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger(TransportStartDataFrameAnalyticsAction.class);
|
private static final Logger logger = LogManager.getLogger(TransportStartDataFrameAnalyticsAction.class);
|
||||||
|
|
||||||
private final XPackLicenseState licenseState;
|
private final XPackLicenseState licenseState;
|
||||||
private final Client client;
|
private final Client client;
|
||||||
|
@ -253,7 +253,7 @@ public class TransportStartDataFrameAnalyticsAction
|
||||||
toValidateMappingsListener.onResponse(startContext);
|
toValidateMappingsListener.onResponse(startContext);
|
||||||
break;
|
break;
|
||||||
case FINISHED:
|
case FINISHED:
|
||||||
LOGGER.info("[{}] Job has already finished", startContext.config.getId());
|
logger.info("[{}] Job has already finished", startContext.config.getId());
|
||||||
finalListener.onFailure(ExceptionsHelper.badRequestException(
|
finalListener.onFailure(ExceptionsHelper.badRequestException(
|
||||||
"Cannot start because the job has already finished"));
|
"Cannot start because the job has already finished"));
|
||||||
break;
|
break;
|
||||||
|
@ -477,7 +477,7 @@ public class TransportStartDataFrameAnalyticsAction
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Exception e) {
|
public void onFailure(Exception e) {
|
||||||
LOGGER.error("[" + persistentTask.getParams().getId() + "] Failed to cancel persistent task that could " +
|
logger.error("[" + persistentTask.getParams().getId() + "] Failed to cancel persistent task that could " +
|
||||||
"not be assigned due to [" + exception.getMessage() + "]", e);
|
"not be assigned due to [" + exception.getMessage() + "]", e);
|
||||||
listener.onFailure(exception);
|
listener.onFailure(exception);
|
||||||
}
|
}
|
||||||
|
@ -553,7 +553,7 @@ public class TransportStartDataFrameAnalyticsAction
|
||||||
if (unavailableIndices.size() != 0) {
|
if (unavailableIndices.size() != 0) {
|
||||||
String reason = "Not opening data frame analytics job [" + id +
|
String reason = "Not opening data frame analytics job [" + id +
|
||||||
"], because not all primary shards are active for the following indices [" + String.join(",", unavailableIndices) + "]";
|
"], because not all primary shards are active for the following indices [" + String.join(",", unavailableIndices) + "]";
|
||||||
LOGGER.debug(reason);
|
logger.debug(reason);
|
||||||
return new PersistentTasksCustomMetaData.Assignment(null, reason);
|
return new PersistentTasksCustomMetaData.Assignment(null, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -563,7 +563,7 @@ public class TransportStartDataFrameAnalyticsAction
|
||||||
if (scheduledRefresh) {
|
if (scheduledRefresh) {
|
||||||
String reason = "Not opening data frame analytics job [" + id +
|
String reason = "Not opening data frame analytics job [" + id +
|
||||||
"] because job memory requirements are stale - refresh requested";
|
"] because job memory requirements are stale - refresh requested";
|
||||||
LOGGER.debug(reason);
|
logger.debug(reason);
|
||||||
return new PersistentTasksCustomMetaData.Assignment(null, reason);
|
return new PersistentTasksCustomMetaData.Assignment(null, reason);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -579,7 +579,7 @@ public class TransportStartDataFrameAnalyticsAction
|
||||||
@Override
|
@Override
|
||||||
protected void nodeOperation(AllocatedPersistentTask task, StartDataFrameAnalyticsAction.TaskParams params,
|
protected void nodeOperation(AllocatedPersistentTask task, StartDataFrameAnalyticsAction.TaskParams params,
|
||||||
PersistentTaskState state) {
|
PersistentTaskState state) {
|
||||||
LOGGER.info("[{}] Starting data frame analytics", params.getId());
|
logger.info("[{}] Starting data frame analytics", params.getId());
|
||||||
DataFrameAnalyticsTaskState analyticsTaskState = (DataFrameAnalyticsTaskState) state;
|
DataFrameAnalyticsTaskState analyticsTaskState = (DataFrameAnalyticsTaskState) state;
|
||||||
|
|
||||||
// If we are "stopping" there is nothing to do
|
// If we are "stopping" there is nothing to do
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.ResourceNotFoundException;
|
import org.elasticsearch.ResourceNotFoundException;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
|
@ -45,6 +47,8 @@ import java.util.stream.Stream;
|
||||||
public class TransportStopDatafeedAction extends TransportTasksAction<TransportStartDatafeedAction.DatafeedTask, StopDatafeedAction.Request,
|
public class TransportStopDatafeedAction extends TransportTasksAction<TransportStartDatafeedAction.DatafeedTask, StopDatafeedAction.Request,
|
||||||
StopDatafeedAction.Response, StopDatafeedAction.Response> {
|
StopDatafeedAction.Response, StopDatafeedAction.Response> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportStopDatafeedAction.class);
|
||||||
|
|
||||||
private final ThreadPool threadPool;
|
private final ThreadPool threadPool;
|
||||||
private final PersistentTasksService persistentTasksService;
|
private final PersistentTasksService persistentTasksService;
|
||||||
private final DatafeedConfigProvider datafeedConfigProvider;
|
private final DatafeedConfigProvider datafeedConfigProvider;
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.ml.action;
|
package org.elasticsearch.xpack.ml.action;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.ResourceNotFoundException;
|
import org.elasticsearch.ResourceNotFoundException;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.bulk.BulkAction;
|
import org.elasticsearch.action.bulk.BulkAction;
|
||||||
|
@ -36,6 +38,8 @@ import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||||
public class TransportUpdateModelSnapshotAction extends HandledTransportAction<UpdateModelSnapshotAction.Request,
|
public class TransportUpdateModelSnapshotAction extends HandledTransportAction<UpdateModelSnapshotAction.Request,
|
||||||
UpdateModelSnapshotAction.Response> {
|
UpdateModelSnapshotAction.Response> {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TransportUpdateModelSnapshotAction.class);
|
||||||
|
|
||||||
private final JobResultsProvider jobResultsProvider;
|
private final JobResultsProvider jobResultsProvider;
|
||||||
private final Client client;
|
private final Client client;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue