Skip to content

Commit

Permalink
docs: add page for KafkaConnectRestartConnectors action
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed Nov 27, 2023
1 parent cdd31c2 commit 3761f98
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 6 deletions.
@@ -0,0 +1,117 @@
---
tags: [ "action", "apache kafka", "kafka connect" ]
title: "KafkaConnectRestartConnectors"
linkTitle: "KafkaConnectRestartConnectors"
weight: 20
description: >
Learn how to use the KafkaConnectRestartConnector action.
---

{{% pageinfo color="info" %}}
The `KafkaConnectRestartConnectors` action allows a user to restart all or just the
failed Connector and Task instances for one or multiple named connectors.
{{% /pageinfo %}}

## Usage (CLI)

```bash
Usage:

Execute the action.

jikkou action KafkaConnectRestartConnectors execute [-hV] [--include-tasks]
[--only-failed] [--connect-cluster=PARAM] [--logger-level=<level>]
[-o=<format>] [--connector-name=PARAM]...

DESCRIPTION:

The KafkaConnectRestartConnectors action a user to restart all or just the
failed Connector and Task instances for one or multiple named connectors.

OPTIONS:

--connect-cluster=PARAM
The name of the connect cluster.
--connector-name=PARAM
The connector's name.
-h, --help Show this help message and exit.
--include-tasks Specifies whether to restart the connector instance
and task instances (includeTasks=true) or just the
connector instance (includeTasks=false)
--logger-level=<level>
Specify the log level verbosity to be used while
running a command.
Valid level values are: TRACE, DEBUG, INFO, WARN,
ERROR.
For example, `--logger-level=INFO`
-o, --output=<format> Prints the output in the specified format. Allowed
values: JSON, YAML (default YAML).
--only-failed Specifies whether to restart just the instances with
a FAILED status (onlyFailed=true) or all instances
(onlyFailed=false)
-V, --version Print version information and exit.
```
### Examples
### Restart all connectors for all Kafka Connect clusters.
```bash
jikkou action kafkaconnectrestartconnectors execute
```
**(output)**
```text
---
kind: "ApiActionResultSet"
apiVersion: "core.jikkou.io/v1"
metadata:
labels: {}
annotations: {}
results:
- status: "SUCCEEDED"
data:
apiVersion: "kafka.jikkou.io/v1beta1"
kind: "KafkaConnector"
metadata:
name: "local-file-sink"
labels:
kafka.jikkou.io/connect-cluster: "my-connect-cluster"
annotations: {}
spec:
connectorClass: "FileStreamSink"
tasksMax: 1
config:
file: "/tmp/test.sink.txt"
topics: "connect-test"
state: "RUNNING"
status:
connectorStatus:
name: "local-file-sink"
connector:
state: "RUNNING"
workerId: "connect:8083"
tasks:
- id: 0
state: "RUNNING"
workerId: "connect:8083"
```
### Restart all connectors with a FAILED status on all Kafka Connect clusters.
```bash
jikkou action kafkaconnectrestartconnectors execute \
--only-failed
```
### Restart specific connector and tasks for on Kafka Connect cluster
```bash
jikkou action kafkaconnectrestartconnectors execute \
--cluster-name my-connect-cluster
--connector-name local-file-sink \
--include-tasks
```
15 changes: 15 additions & 0 deletions docs/content/en/docs/Providers/Kafka Connect/Actions/_index.md
@@ -0,0 +1,15 @@
---
title: "Actions"
linkTitle: "Actions"
weight: 80
description: >
Learn how to use the actions provided by the Extension Provider for Kafka Connect.
---

{{% pageinfo %}}
Here, you will find the list of actions provided by the Extension Provider for Kafka Connect.
{{% /pageinfo %}}

## Kafka Connect Action

More information:
2 changes: 1 addition & 1 deletion docs/content/en/docs/Providers/Kafka/Resources/_index.md
Expand Up @@ -3,7 +3,7 @@ title: "Resources"
linkTitle: "Resources"
weight: 2
description: >
Learn how to use the built-in resources provided by the extensions for Apache Kafka.
Learn how to use the built-in resources provided by the Extension Provider for Apache Kafka.
---

{{% pageinfo %}}
Expand Down
Expand Up @@ -3,7 +3,7 @@ title: "Transformations"
linkTitle: "Transformations"
weight: 2
description: >
Learn how to use the built-in transformation provided by the extensions for Apache Kafka.
Learn how to use the built-in transformation provided by the Extension Provider for Apache Kafka.
---

{{% pageinfo %}}
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/docs/Providers/Kafka/Validations/_index.md
Expand Up @@ -5,7 +5,7 @@ title: "Validations"
linkTitle: "Validations"
weight: 50
description: >
Learn how to use the built-in validations provided by the extensions for Apache Kafka.
Learn how to use the built-in validations provided by the Extension Provider for Apache Kafka.
---

Jikkou ships with the following built-in _validations_:
Expand Down
Expand Up @@ -64,7 +64,7 @@
*/
@Named(KafkaConnectRestartConnectorsAction.NAME)
@Title("Restart Kafka Connect connector instances and task instances")
@Description("The KafkaConnectRestartConnector action a user to restart all or just the failed Connector and Task instances for one or multiple named connectors.")
@Description("The KafkaConnectRestartConnectors action a user to restart all or just the failed Connector and Task instances for one or multiple named connectors.")
@ExtensionSpec(
options = {
@ExtensionOptionSpec(
Expand Down Expand Up @@ -101,10 +101,10 @@ public class KafkaConnectRestartConnectorsAction extends ContextualExtension imp

private static final Logger LOG = LoggerFactory.getLogger(KafkaConnectRestartConnectorsAction.class);

public static final String NAME = "KafkaConnectRestartConnector";
public static final String NAME = "KafkaConnectRestartConnectors";

// OPTIONS
public static final String CONNECTOR_NAME_CONFIG = "name";
public static final String CONNECTOR_NAME_CONFIG = "connector-name";
public static final String CONNECT_CLUSTER_CONFIG = "connect-cluster";
public static final String INCLUDE_TASKS_CONFIG = "include-tasks";
public static final String ONLY_FAILED_CONFIG = "only-failed";
Expand Down

0 comments on commit 3761f98

Please sign in to comment.