Skip to content

Feature Request: Optimize the implementation of obtaining the status of connectors #586

Closed

Description

@cobolbaby

public List<ConnectDefinition> getDefinitions(String clusterId, String connectId) {
Collection<String> unfiltered = this.kafkaModule
.getConnectRestClient(clusterId)
.get(connectId)
.getConnectors();
ArrayList<String> filtered = new ArrayList<String>();
for (String item : unfiltered) {
if (isMatchRegex(getConnectFilterRegex(), item)) {
filtered.add(item);
}
}
return filtered.stream()
.map(s -> getDefinition(clusterId, connectId, s))
.collect(Collectors.toList());

If possible, it is recommended to use the new interface to obtain the connector status in batches. The loop traversal method is time-consuming when dealing with hundreds of connectors.

Batch API:

curl -s "http://${CONNECT_URL}/connectors?expand=info&expand=status"

Activity

  1. added a commit that references this issue on Feb 3, 2021
    27e5ad1
  2. added a commit that references this issue on Feb 3, 2021
    55a0e80
  3. tchiotludo commented on Feb 3, 2021

    @tchiotludo
    Owner

    Thanks @cobolbaby I was not aware of this new method !!
    Done in dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions