Fix some EPOLL bugs and disable for now.

Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/45ce71ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/45ce71ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/45ce71ca

Branch: refs/heads/master
Commit: 45ce71ca0a530de55f35d9086f5326a135b22448
Parents: 0b296c8
Author: Jacques Nadeau <[email protected]>
Authored: Tue Jun 24 15:06:42 2014 -0700
Committer: Jacques Nadeau <[email protected]>
Committed: Wed Jun 25 09:10:13 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/rpc/BasicClient.java   |  6 +++---
 .../java/org/apache/drill/exec/rpc/BasicServer.java   |  6 +++---
 .../org/apache/drill/exec/rpc/TransportCheck.java     |  2 +-
 .../org/apache/drill/exec/service/ServiceEngine.java  |  4 ++--
 .../physical/impl/xsort/TestSimpleExternalSort.java   | 14 +++++++-------
 5 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/45ce71ca/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicClient.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicClient.java 
b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicClient.java
index 0b7fd0f..3dc90b9 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicClient.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicClient.java
@@ -87,9 +87,9 @@ public abstract class BasicClient<T extends EnumLite, R 
extends RemoteConnection
           }
         }); //
 
-    if(TransportCheck.SUPPORTS_EPOLL){
-      b.option(EpollChannelOption.SO_REUSEPORT, true); //
-    }
+//    if(TransportCheck.SUPPORTS_EPOLL){
+//      b.option(EpollChannelOption.SO_REUSEPORT, true); //
+//    }
   }
 
   public abstract ProtobufLengthDecoder getDecoder(BufferAllocator allocator);

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/45ce71ca/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicServer.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicServer.java 
b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicServer.java
index 82d37db..b08685b 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicServer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicServer.java
@@ -87,9 +87,9 @@ public abstract class BasicServer<T extends EnumLite, C 
extends RemoteConnection
           }
         });
 
-     if(TransportCheck.SUPPORTS_EPOLL){
-       b.option(EpollChannelOption.SO_REUSEPORT, true); //
-     }
+//     if(TransportCheck.SUPPORTS_EPOLL){
+//       b.option(EpollChannelOption.SO_REUSEPORT, true); //
+//     }
   }
 
   public OutOfMemoryHandler getOutOfMemoryHandler() {

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/45ce71ca/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/TransportCheck.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/TransportCheck.java 
b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/TransportCheck.java
index b326a1f..6401518 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/TransportCheck.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/TransportCheck.java
@@ -44,7 +44,7 @@ public class TransportCheck {
     String name = 
SystemPropertyUtil.get("os.name").toLowerCase(Locale.US).trim();
 
     if (!name.startsWith("linux") || 
SystemPropertyUtil.getBoolean("drill.exec.disable-linux-epoll", false) //
-//        /* disable epoll */  || true //
+        /* disable epoll */  || true //
         ) {
       SUPPORTS_EPOLL = false;
     }else{

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/45ce71ca/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java 
b/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java
index bd745d1..ce109d9 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/service/ServiceEngine.java
@@ -29,6 +29,7 @@ import org.apache.drill.exec.ExecConstants;
 import org.apache.drill.exec.exception.DrillbitStartupException;
 import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
 import org.apache.drill.exec.rpc.NamedThreadFactory;
+import org.apache.drill.exec.rpc.TransportCheck;
 import org.apache.drill.exec.rpc.control.Controller;
 import org.apache.drill.exec.rpc.control.ControllerImpl;
 import org.apache.drill.exec.rpc.control.WorkEventBus;
@@ -52,8 +53,7 @@ public class ServiceEngine implements Closeable{
   private final boolean allowPortHunting;
 
   public ServiceEngine(ControlMessageHandler controlMessageHandler, UserWorker 
userWorker, BootStrapContext context, WorkEventBus workBus, DataResponseHandler 
dataHandler, boolean allowPortHunting){
-    this.userServer = new UserServer(context.getAllocator(), new 
NioEventLoopGroup(context.getConfig().getInt(ExecConstants.USER_SERVER_RPC_THREADS),
-            new NamedThreadFactory("UserServer-")), userWorker);
+    this.userServer = new UserServer(context.getAllocator(), 
TransportCheck.createEventLoopGroup(context.getConfig().getInt(ExecConstants.USER_SERVER_RPC_THREADS),
 "UserServer-"), userWorker);
     this.controller = new ControllerImpl(context, controlMessageHandler, 
allowPortHunting);
     this.dataPool = new DataConnectionCreator(context, workBus, dataHandler, 
allowPortHunting);
     this.config = context.getConfig();

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/45ce71ca/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/xsort/TestSimpleExternalSort.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/xsort/TestSimpleExternalSort.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/xsort/TestSimpleExternalSort.java
index 47f0342..16b1f40 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/xsort/TestSimpleExternalSort.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/xsort/TestSimpleExternalSort.java
@@ -17,8 +17,10 @@
  */
 package org.apache.drill.exec.physical.impl.xsort;
 
-import com.google.common.base.Charsets;
-import com.google.common.io.Files;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
 
 import org.apache.drill.BaseTestQuery;
 import org.apache.drill.common.config.DrillConfig;
@@ -37,12 +39,10 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TestRule;
 
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
+import com.google.common.base.Charsets;
+import com.google.common.io.Files;
 
+@Ignore
 public class TestSimpleExternalSort extends BaseTestQuery {
   static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(TestSimpleExternalSort.class);
   DrillConfig c = DrillConfig.create();

Reply via email to