Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 81 additions & 5 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42859,6 +42859,9 @@ components:
description: Attributes of the SPA Recommendation resource. Contains recommendations
for both driver and executor components.
properties:
confidence_level:
format: double
type: number
driver:
$ref: '#/components/schemas/ComponentRecommendation'
executor:
Expand Down Expand Up @@ -86654,13 +86657,79 @@ paths:
x-unstable: '**Note**: This feature is in private beta. To request access, use
the request access form in the [Service Level Objectives](https://docs.datadoghq.com/service_management/service_level_objectives/#slo-csv-export)
docs.'
/api/v2/spa/recommendations/{service}/{shard}:
/api/v2/spa/recommendations/{service}:
get:
description: Retrieve resource recommendations for a Spark job. The caller (Spark
Gateway or DJM UI) provides a service name and shard identifier, and SPA returns
structured recommendations for driver and executor resources.
description: This endpoint is currently experimental and restricted to Datadog
internal use only. Retrieve resource recommendations for a Spark job. The
caller (Spark Gateway or DJM UI) provides a service name and SPA returns structured
recommendations for driver and executor resources. The version with a shard
should be preferred, where possible, as it gives more accurate results.
operationId: GetSPARecommendations
parameters:
- description: The recommendation service should not use its metrics cache.
in: query
name: bypass_cache
schema:
type: string
- description: The service name for a spark job
in: path
name: service
required: true
schema:
type: string
responses:
'200':
content:
application/json:
example:
data:
attributes:
driver:
estimation:
cpu:
max: 1500
p75: 1000
p95: 1200
ephemeral_storage: 896
heap: 6144
memory: 7168
overhead: 1024
executor:
estimation:
cpu:
max: 2000
p75: 1200
p95: 1500
ephemeral_storage: 512
heap: 3072
memory: 4096
overhead: 1024
id: dedupeactivecontexts:adp_dedupeactivecontexts_org2
type: recommendation
schema:
$ref: '#/components/schemas/RecommendationDocument'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- AuthZ: []
summary: Get SPA Recommendations
tags:
- Spa
x-unstable: '**Note**: This endpoint is in public beta and may change in the
future. It is not yet recommended for production use.'
/api/v2/spa/recommendations/{service}/{shard}:
get:
description: This endpoint is currently experimental and restricted to Datadog
internal use only. Retrieve resource recommendations for a Spark job. The
caller (Spark Gateway or DJM UI) provides a service name and shard identifier,
and SPA returns structured recommendations for driver and executor resources.
operationId: GetSPARecommendationsWithShard
parameters:
- description: The shard tag for a spark job, which differentiates jobs within
the same service that have different resource needs
in: path
Expand All @@ -86674,6 +86743,11 @@ paths:
required: true
schema:
type: string
- description: The recommendation service should not use its metrics cache.
in: query
name: bypass_cache
schema:
type: string
responses:
'200':
content:
Expand Down Expand Up @@ -86712,7 +86786,9 @@ paths:
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get SPA Recommendations
security:
- AuthZ: []
summary: Get SPA Recommendations with a shard parameter
tags:
- Spa
x-unstable: '**Note**: This endpoint is in public beta and may change in the
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/spa/GetSPARecommendations.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static void main(String[] args) {
SpaApi apiInstance = new SpaApi(defaultClient);

try {
RecommendationDocument result = apiInstance.getSPARecommendations("shard", "service");
RecommendationDocument result = apiInstance.getSPARecommendations("service");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SpaApi#getSPARecommendations");
Expand Down
26 changes: 26 additions & 0 deletions examples/v2/spa/GetSPARecommendationsWithShard.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Get SPA Recommendations with a shard parameter returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SpaApi;
import com.datadog.api.client.v2.model.RecommendationDocument;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getSPARecommendationsWithShard", true);
SpaApi apiInstance = new SpaApi(defaultClient);

try {
RecommendationDocument result =
apiInstance.getSPARecommendationsWithShard("shard", "service");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SpaApi#getSPARecommendationsWithShard");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
1 change: 1 addition & 0 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@ public class ApiClient {
put("v2.getSLOReport", false);
put("v2.getSLOReportJobStatus", false);
put("v2.getSPARecommendations", false);
put("v2.getSPARecommendationsWithShard", false);
put("v2.createSCAResolveVulnerableSymbols", false);
put("v2.createSCAResult", false);
put("v2.addMemberTeam", false);
Expand Down
Loading
Loading