kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kangkai...@apache.org
Subject kylin git commit: Revert "KYLIN-2619 Use newCachedThreadPool instead of newFixedThreadPool in Broadcaster"
Date Tue, 16 May 2017 01:47:24 GMT
Repository: kylin
Updated Branches:
  refs/heads/master 1c3ed36f7 -> 858d94751


Revert "KYLIN-2619 Use newCachedThreadPool instead of newFixedThreadPool in Broadcaster"

This reverts commit 1c3ed36f7dcf2152b17966bb69dd3211ce4e8aba.


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/858d9475
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/858d9475
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/858d9475

Branch: refs/heads/master
Commit: 858d947518b308c1a33b832ea8ef49144285c02e
Parents: 1c3ed36
Author: kangkaisen <kangkaisen@live.com>
Authored: Tue May 16 09:48:22 2017 +0800
Committer: kangkaisen <kangkaisen@live.com>
Committed: Tue May 16 09:48:22 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/common/restclient/RestClient.java   | 4 ----
 .../java/org/apache/kylin/metadata/cachesync/Broadcaster.java | 7 ++-----
 2 files changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/858d9475/core-common/src/main/java/org/apache/kylin/common/restclient/RestClient.java
----------------------------------------------------------------------
diff --git a/core-common/src/main/java/org/apache/kylin/common/restclient/RestClient.java
b/core-common/src/main/java/org/apache/kylin/common/restclient/RestClient.java
index 470386b..33a4e7a 100644
--- a/core-common/src/main/java/org/apache/kylin/common/restclient/RestClient.java
+++ b/core-common/src/main/java/org/apache/kylin/common/restclient/RestClient.java
@@ -287,8 +287,4 @@ public class RestClient {
         return result.toString();
     }
 
-    @Override
-    public String toString() {
-        return String.format("RestClient(%s:%d)", host, port);
-    }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/858d9475/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
b/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
index e787dfd..1394f7b 100644
--- a/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
+++ b/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
@@ -35,7 +35,6 @@ import org.apache.commons.lang.StringUtils;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.restclient.RestClient;
 import org.apache.kylin.common.util.DaemonThreadFactory;
-import org.apache.kylin.common.util.SetThreadName;
 import org.apache.kylin.metadata.project.ProjectManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -117,7 +116,7 @@ public class Broadcaster {
                 for (String node : config.getRestServers()) {
                     restClients.add(new RestClient(node));
                 }
-                final ExecutorService wipingCachePool = Executors.newCachedThreadPool(new
DaemonThreadFactory());
+                final ExecutorService wipingCachePool = Executors.newFixedThreadPool(restClients.size(),
new DaemonThreadFactory());
                 while (true) {
                     try {
                         final BroadcastEvent broadcastEvent = broadcastEvents.takeFirst();
@@ -126,10 +125,8 @@ public class Broadcaster {
                             wipingCachePool.execute(new Runnable() {
                                 @Override
                                 public void run() {
-                                    try (SetThreadName ignored = new SetThreadName("CacheWiper
%s %s", restClient, broadcastEvent)) {
-                                        logger.info("{} wipe cache {}", restClient, broadcastEvent);
+                                    try {
                                         restClient.wipeCache(broadcastEvent.getEntity(),
broadcastEvent.getEvent(), broadcastEvent.getCacheKey());
-                                        logger.info("{} wipe cache {} success", restClient,
broadcastEvent);
                                     } catch (IOException e) {
                                         logger.warn("Thread failed during wipe cache at "
+ broadcastEvent, e);
                                     }


Mime
View raw message