use of io.confluent.ksql.api.client.ConnectorDescription in project ksql by confluentinc.
the class ClientImpl method describeConnector.
@Override
public CompletableFuture<ConnectorDescription> describeConnector(final String name) {
final CompletableFuture<ConnectorDescription> cf = new CompletableFuture<>();
makePostRequest(KSQL_ENDPOINT, new JsonObject().put("ksql", "describe connector " + name + ";").put("sessionVariables", sessionVariables), cf, response -> handleSingleEntityResponse(response, cf, ConnectorCommandResponseHandler::handleDescribeConnectorsResponse));
return cf;
}
use of io.confluent.ksql.api.client.ConnectorDescription in project ksql by confluentinc.
the class ClientIntegrationTest method shouldDescribeConnector.
@Test
public void shouldDescribeConnector() throws Exception {
// Given:
givenConnectorExists();
// When:
final ConnectorDescription connector = client.describeConnector(TEST_CONNECTOR).get();
// Then:
assertThat(connector.type(), is(SOURCE_TYPE));
assertThat(connector.state(), is("RUNNING"));
assertThat(connector.topics().size(), is(0));
assertThat(connector.sources().size(), is(0));
assertThat(connector.className(), is(MOCK_SOURCE_CLASS));
}
Aggregations