giraph-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject git commit: updated refs/heads/trunk to 6dd7d14
Date Mon, 15 Jun 2015 16:48:33 GMT
Repository: giraph
Updated Branches:
  refs/heads/trunk 17355f558 -> 6dd7d1425


GIRAPH-1014: Decrease number of nifty threads created

Summary: By default, ThriftClientManager creates 2*numProcessors threads, making it harder
to look through jstack. We use them just for job progress reporting, so no need to have that
many.

Test Plan: Run a job, verified number of threads decreased

Reviewers: ikabiljo, sergey.edunov

Differential Revision: https://reviews.facebook.net/D40125


Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/6dd7d142
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/6dd7d142
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/6dd7d142

Branch: refs/heads/trunk
Commit: 6dd7d1425e2f67e6262a096120521e166fa0bb29
Parents: 17355f5
Author: Maja Kabiljo <majakabiljo@fb.com>
Authored: Fri Jun 12 19:06:12 2015 -0700
Committer: Maja Kabiljo <majakabiljo@fb.com>
Committed: Mon Jun 15 09:48:17 2015 -0700

----------------------------------------------------------------------
 .../giraph/graph/RetryableJobProgressTrackerClient.java | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/6dd7d142/giraph-core/src/main/java/org/apache/giraph/graph/RetryableJobProgressTrackerClient.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/graph/RetryableJobProgressTrackerClient.java
b/giraph-core/src/main/java/org/apache/giraph/graph/RetryableJobProgressTrackerClient.java
index f15a2e7..b4915f1 100644
--- a/giraph-core/src/main/java/org/apache/giraph/graph/RetryableJobProgressTrackerClient.java
+++ b/giraph-core/src/main/java/org/apache/giraph/graph/RetryableJobProgressTrackerClient.java
@@ -24,8 +24,14 @@ import org.apache.giraph.worker.WorkerProgress;
 import org.apache.log4j.Logger;
 
 import com.facebook.nifty.client.FramedClientConnector;
+import com.facebook.nifty.client.NettyClientConfigBuilder;
+import com.facebook.nifty.client.NiftyClient;
+import com.facebook.swift.codec.ThriftCodec;
+import com.facebook.swift.codec.ThriftCodecManager;
 import com.facebook.swift.service.RuntimeTTransportException;
+import com.facebook.swift.service.ThriftClientEventHandler;
 import com.facebook.swift.service.ThriftClientManager;
+import com.google.common.collect.ImmutableSet;
 import com.google.common.io.Closeables;
 
 import java.io.IOException;
@@ -65,7 +71,11 @@ public class RetryableJobProgressTrackerClient
    */
   private void resetConnection() throws ExecutionException,
       InterruptedException {
-    clientManager = new ThriftClientManager();
+    clientManager = new ThriftClientManager(
+        new ThriftCodecManager(new ThriftCodec[0]),
+        new NiftyClient(
+            new NettyClientConfigBuilder().setWorkerThreadCount(2).build()),
+        ImmutableSet.<ThriftClientEventHandler>of());
     FramedClientConnector connector =
         new FramedClientConnector(new InetSocketAddress(
             JOB_PROGRESS_SERVICE_HOST.get(conf),


Mime
View raw message