如何删除 Debezium 连接器。我正在关注本教程 https://debezium.io/documentation/reference/tutorial.html,我看到了注册连接器的方法,但无法弄清楚如何删除/更新连接器。
curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '{ "name": "inventory-connector", "config": { "connector.class": "io.debezium.connector.mysql.MySqlConnector", "tasks.max": "1", "database.hostname": "mysql", "database.port": "3306", "database.user": "debezium", "database.password": "dbz", "database.server.id": "184054", "database.server.name": "dbserver1", "database.include.list": "inventory", "database.history.kafka.bootstrap.servers": "kafka:9092", "database.history.kafka.topic": "dbhistory.inventory" } }'
Run Code Online (Sandbox Code Playgroud)
您还可以给我指出提到删除和更新连接器的文档页面吗?
我正在尝试了解 ExecutorService newFixedThreadPool 的行为。我将工作分配给 executorService 并希望它由多个线程完成。
场景很简单。
我初始化大小为 5 的线程池。然后我将工作分配给执行程序服务。但我看到只有一个线程正在处理这项工作。
难道它不应该由池中多个可用线程来处理吗?代码:
ExecutorService executorService = Executors.newFixedThreadPool(5);
executorService.execute(new Runnable() {
public void run() {
int k =0;
while (k++<5){
System.out.println("Active Thread "+Thread.currentThread().getName());
}
}
});
Run Code Online (Sandbox Code Playgroud)
这是完整的代码 jdoodle.com/a/bRP
我得到的输出是
Active Thread pool-1-thread-1
Active Thread pool-1-thread-1
Active Thread pool-1-thread-1
Active Thread pool-1-thread-1
Active Thread pool-1-thread-1
Run Code Online (Sandbox Code Playgroud)
我期望的输出是:
更多线程参与工作。
编辑
本质上我想使用 ExecutorService 复制此行为
package Threading;
public class ThreadDeleteme {
public static void main(String[] args) {
Work w = new Work();
Thread t1 = new Thread(w);
t1.setName("Thread …Run Code Online (Sandbox Code Playgroud)