diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java index 9ceacf423dc..0b6081381ef 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java @@ -509,19 +509,6 @@ public class JobProvider { return searchRequest; } - private List handlePartitionMaxNormailizedProbabilitiesResponse(SearchResponse searchResponse) { - List results = new ArrayList<>(); - for (SearchHit hit : searchResponse.getHits().getHits()) { - BytesReference source = hit.getSourceRef(); - try (XContentParser parser = XContentFactory.xContent(source).createParser(NamedXContentRegistry.EMPTY, source)) { - results.add(PerPartitionMaxProbabilities.PARSER.apply(parser, null)); - } catch (IOException e) { - throw new ElasticsearchParseException("failed to parse PerPartitionMaxProbabilities", e); - } - } - return results; - } - /** * Returns a {@link BatchedDocumentsIterator} that allows querying * and iterating over a large number of buckets of the given job. @@ -593,19 +580,6 @@ public class JobProvider { records(jobId, from, size, recordFilter, sb, SECONDARY_SORT, descending, handler, errorHandler, client); } - /** - * Get a page of {@linkplain CategoryDefinition}s for the given jobId. - * Uses the internal client, so runs as the _xpack user - * @param jobId the job id - * @param from Skip the first N categories. This parameter is for paging - * @param size Take only this number of categories - */ - public void categoryDefinitionsViaInternalClient(String jobId, String categoryId, Integer from, Integer size, - Consumer> handler, - Consumer errorHandler) { - categoryDefinitions(jobId, categoryId, from, size, handler, errorHandler, client); - } - /** * Get a page of {@linkplain CategoryDefinition}s for the given jobId. * Uses a supplied client, so may run as the currently authenticated user @@ -658,16 +632,6 @@ public class JobProvider { }, e -> errorHandler.accept(mapAuthFailure(e, jobId, GetCategoriesAction.NAME)))); } - /** - * Search for anomaly records with the parameters in the - * {@link org.elasticsearch.xpack.ml.job.persistence.RecordsQueryBuilder.RecordsQuery} - * Uses the internal client, so runs as the _xpack user - */ - public void recordsViaInternalClient(String jobId, RecordsQueryBuilder.RecordsQuery query, Consumer> handler, - Consumer errorHandler) { - records(jobId, query, handler, errorHandler, client); - } - /** * Search for anomaly records with the parameters in the * {@link org.elasticsearch.xpack.ml.job.persistence.RecordsQueryBuilder.RecordsQuery} @@ -736,17 +700,6 @@ public class JobProvider { }, e -> errorHandler.accept(mapAuthFailure(e, jobId, GetRecordsAction.NAME)))); } - /** - * Return a page of influencers for the given job and within the given date range - * Uses the internal client, so runs as the _xpack user - * @param jobId The job ID for which influencers are requested - * @param query the query - */ - public void influencersViaInternalClient(String jobId, InfluencersQuery query, Consumer> handler, - Consumer errorHandler) { - influencers(jobId, query, handler, errorHandler, client); - } - /** * Return a page of influencers for the given job and within the given date range * Uses a supplied client, so may run as the currently authenticated user