Managing autoscaling

The CDP CLI has two options for reviewing autoscaling activity.

cdp datahub list-scaling-activities
Returns all of the scaling activities (or only failed scaling activities) in the given duration, or activities that have a start time in the given time interval between start-time and end-time for a particular cluster. YARN recommendation and YARN recommendation time for all the activities are also included in the output.
list-scaling-activities
--cluster <value>
[--duration <value>]
[--start-time <value>]
[--end-time <value>]
[--only-failed-scaling-activities | --no-only-failed-scaling-activities]
[--max-items <value>]
[--starting-token <value>]
[--page-size <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton]
Table 1.
Parameter Description
--cluster Required. The cluster Name or CRN of the cluster for which you want to list all of the scaling activities.
--duration Value of the duration in minutes from the current point to current point minus the duration. The default value is 60 minutes.
--start-time Time in epoch milliseconds after which you want the activities.
--end-time Time in epoch milliseconds until which you want the activities.
--only-failed-scaling-activities | --no-only-failed-scaling-activities Determines if only the failed scaling activities for that particular cluster are returned.
--max-items Indicates the maximum number of scaling activities that can be present in a page. Also indicates next-token in the output, which can be used as starting-token to get the next set of scaling-activities.
--starting-token Number of the page from which you want all the pages. Default value is 0.
--page-size Number of entries you want to get in each API call for listing scaling activities. The default value is 100.

Sample output:

{
"operationId":"61ed5711-6a80-45b7-850c-b428b838145c",
"startTime":"2025-01-24T10:25:00.115000+00:00",
"yarnRecommendationTime":"2025-01-24T10:25:00.115000+00:00",
"yarnRecommendation":"Successfully polled YARN to fetch cluster metrics. YarnRecommendedScaleUpCount: '0', YarnRecommendedDecommission: [], DeterminedScaleUpCount (based on step-size and maxAllowedUpscale): '0', DeterminedDecommissionHosts (based on step-size and maxAllowedDownscale): []. ",
"scalingActivityReason":" Cannot trigger any scaling operation as there was no recommendation for scaling from yarn",
"activityStatus":"METRICS_COLLECTION_SUCCESS"
}
cdp datahub describe-scaling-activity
Returns the scaling activity corresponding to the cluster and operationId provided by the user.
describe-scaling-activity
--cluster <value>
--operation-id <value>
[--cli-input-json <value>]
[--generate-cli-skeleton]
Table 2.
Parameter Description
--cluster Required. The cluster name or CRN of the cluster for which you want to fetch the particular scaling activity.
--operation-id Required. The operation ID of the scaling activity that you want to fetch.