You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by lt...@apache.org on 2019/04/11 03:11:56 UTC

[incubator-iotdb] branch cluster_concurrent created (now 86e06bd)

This is an automated email from the ASF dual-hosted git repository.

lta pushed a change to branch cluster_concurrent
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at 86e06bd  add thread pool config

This branch includes the following new commits:

     new d080d5f  add thread pool config
     new 86e06bd  add thread pool config

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-iotdb] 02/02: add thread pool config

Posted by lt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lta pushed a commit to branch cluster_concurrent
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 86e06bdf2bf6b62211b0fe3cf8035f9c22f2f743
Author: lta <li...@163.com>
AuthorDate: Thu Apr 11 11:11:17 2019 +0800

    add thread pool config
---
 .../main/java/org/apache/iotdb/cluster/concurrent/ThreadName.java    | 5 +----
 .../java/org/apache/iotdb/cluster/concurrent/pool/QPTaskManager.java | 2 +-
 .../org/apache/iotdb/cluster/concurrent/pool/RaftTaskManager.java    | 4 ++--
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/ThreadName.java b/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/ThreadName.java
index a6306b2..b500c18 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/ThreadName.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/ThreadName.java
@@ -19,11 +19,8 @@
 package org.apache.iotdb.cluster.concurrent;
 
 public enum ThreadName {
-  /**
-   * QP tash thread
-   */
   QP_TASK("QP-Task-Thread"),
-  Raft_TASK("JDBC-Client");
+  RAFT_TASK("Raft-Task-Thread");
 
   private String name;
 
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/pool/QPTaskManager.java b/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/pool/QPTaskManager.java
index 9044cf7..1bef94d 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/pool/QPTaskManager.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/pool/QPTaskManager.java
@@ -55,7 +55,7 @@ public class QPTaskManager {
     }
     ClusterConfig config = ClusterDescriptor.getInstance().getConfig();
     this.threadCnt = config.getConcurrentQPTaskThread();
-    pool = IoTDBThreadPoolFactory.newFixedThreadPool(threadCnt, ThreadName.Raft_TASK.getName());
+    pool = IoTDBThreadPoolFactory.newFixedThreadPool(threadCnt, ThreadName.RAFT_TASK.getName());
   }
 
   /**
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/pool/RaftTaskManager.java b/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/pool/RaftTaskManager.java
index 2510ad4..2d4dbd6 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/pool/RaftTaskManager.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/concurrent/pool/RaftTaskManager.java
@@ -39,7 +39,7 @@ public class RaftTaskManager {
   private RaftTaskManager() {
     ClusterConfig config = ClusterDescriptor.getInstance().getConfig();
     this.threadCnt = config.getConcurrentRaftTaskThread();
-    pool = IoTDBThreadPoolFactory.newFixedThreadPool(threadCnt, ThreadName.Raft_TASK.getName());
+    pool = IoTDBThreadPoolFactory.newFixedThreadPool(threadCnt, ThreadName.RAFT_TASK.getName());
   }
 
   public static RaftTaskManager getInstance() {
@@ -55,7 +55,7 @@ public class RaftTaskManager {
     }
     ClusterConfig config = ClusterDescriptor.getInstance().getConfig();
     this.threadCnt = config.getConcurrentRaftTaskThread();
-    pool = IoTDBThreadPoolFactory.newFixedThreadPool(threadCnt, ThreadName.Raft_TASK.getName());
+    pool = IoTDBThreadPoolFactory.newFixedThreadPool(threadCnt, ThreadName.RAFT_TASK.getName());
   }
 
   /**


[incubator-iotdb] 01/02: add thread pool config

Posted by lt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lta pushed a commit to branch cluster_concurrent
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit d080d5fcd038404d9b7a5aa3c87e7948acb42f88
Author: lta <li...@163.com>
AuthorDate: Thu Apr 11 11:04:40 2019 +0800

    add thread pool config
---
 cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterConfig.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterConfig.java b/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterConfig.java
index 0482138..a5069c3 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterConfig.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterConfig.java
@@ -139,6 +139,7 @@ public class ClusterConfig {
 
   /**
    * Max time of blocking main thread for waiting for all RUNNING RAFT TASK THREADS AND TASKS IN THE QUEUE end.
+   * For raft tasks, due to consistency is need to be guaranteed, it must ensure that raft tasks finish.
    */
   private int closeRaftTaskBlockTimeout = Integer.MAX_VALUE;