diff --git a/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/servlet/parameters/RemoveDisksParameters.java b/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/servlet/parameters/RemoveDisksParameters.java index 9f03fff39..9144efd52 100644 --- a/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/servlet/parameters/RemoveDisksParameters.java +++ b/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/servlet/parameters/RemoveDisksParameters.java @@ -18,6 +18,7 @@ import static com.linkedin.kafka.cruisecontrol.servlet.parameters.ParameterUtils.REASON_PARAM; import static com.linkedin.kafka.cruisecontrol.servlet.parameters.ParameterUtils.STOP_ONGOING_EXECUTION_PARAM; import static com.linkedin.kafka.cruisecontrol.servlet.parameters.ParameterUtils.JSON_PARAM; +import static com.linkedin.kafka.cruisecontrol.servlet.parameters.ParameterUtils.VERBOSE_PARAM; public class RemoveDisksParameters extends GoalBasedOptimizationParameters { protected static final SortedSet CASE_INSENSITIVE_PARAMETER_NAMES; @@ -26,12 +27,14 @@ public class RemoveDisksParameters extends GoalBasedOptimizationParameters { validParameterNames.add(BROKER_ID_AND_LOGDIRS_PARAM); validParameterNames.add(DRY_RUN_PARAM); validParameterNames.add(REASON_PARAM); + validParameterNames.add(VERBOSE_PARAM); validParameterNames.add(STOP_ONGOING_EXECUTION_PARAM); validParameterNames.add(JSON_PARAM); CASE_INSENSITIVE_PARAMETER_NAMES = Collections.unmodifiableSortedSet(validParameterNames); } private boolean _dryRun; private String _reason; + private boolean _verbose; private boolean _stopOngoingExecution; private Map> _logdirByBrokerId; @@ -44,6 +47,7 @@ protected void initParameters() throws UnsupportedEncodingException { super.initParameters(); _logdirByBrokerId = ParameterUtils.brokerIdAndLogdirs(_requestContext); _dryRun = ParameterUtils.getDryRun(_requestContext); + _verbose = ParameterUtils.isVerbose(_requestContext); boolean requestReasonRequired = _config.getBoolean(ExecutorConfig.REQUEST_REASON_REQUIRED_CONFIG); _reason = ParameterUtils.reason(_requestContext, requestReasonRequired && !_dryRun); _stopOngoingExecution = ParameterUtils.stopOngoingExecution(_requestContext); @@ -68,6 +72,9 @@ public SortedSet caseInsensitiveParameterNames() { public String reason() { return _reason; } + public boolean verbose() { + return super.isVerbose(); + } public boolean dryRun() { return _dryRun; } diff --git a/cruise-control/src/main/resources/yaml/endpoints/removeDisks.yaml b/cruise-control/src/main/resources/yaml/endpoints/removeDisks.yaml index c61a3ca52..c04c08680 100644 --- a/cruise-control/src/main/resources/yaml/endpoints/removeDisks.yaml +++ b/cruise-control/src/main/resources/yaml/endpoints/removeDisks.yaml @@ -15,6 +15,12 @@ RemoveDisksEndpoint: schema: type: boolean default: false + - name: verbose + in: query + description: Return detailed state information. + schema: + type: boolean + default: false - name: reason in: query description: Reason for request.