drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [7/7] drill git commit: DRILL-2942: Enable access to epoll mode using system property -Ddrill.exec.enable-epoll=true.
Date Thu, 07 May 2015 08:56:43 GMT
DRILL-2942: Enable access to epoll mode using system property -Ddrill.exec.enable-epoll=true.


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

Branch: refs/heads/master
Commit: 6b98db386204ca40769aad9ef2c4c3ba89147668
Parents: e14d989
Author: Jacques Nadeau <jacques@apache.org>
Authored: Sat May 2 17:32:12 2015 -0700
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Thu May 7 00:12:26 2015 -0700

----------------------------------------------------------------------
 distribution/src/resources/drill-env.sh                  |  2 +-
 .../main/java/org/apache/drill/exec/ExecConstants.java   |  1 +
 .../java/org/apache/drill/exec/rpc/TransportCheck.java   | 11 +++++------
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/6b98db38/distribution/src/resources/drill-env.sh
----------------------------------------------------------------------
diff --git a/distribution/src/resources/drill-env.sh b/distribution/src/resources/drill-env.sh
index 2aede3f..345938e 100644
--- a/distribution/src/resources/drill-env.sh
+++ b/distribution/src/resources/drill-env.sh
@@ -16,7 +16,7 @@
 DRILL_MAX_DIRECT_MEMORY="8G"
 DRILL_HEAP="4G"
 
-export DRILL_JAVA_OPTS="-Xms$DRILL_HEAP -Xmx$DRILL_HEAP -XX:MaxDirectMemorySize=$DRILL_MAX_DIRECT_MEMORY
-XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=1G -ea"
+export DRILL_JAVA_OPTS="-Xms$DRILL_HEAP -Xmx$DRILL_HEAP -XX:MaxDirectMemorySize=$DRILL_MAX_DIRECT_MEMORY
-XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=1G -Ddrill.exec.enable-epoll=true -ea"
 
 # Class unloading is disabled by default in Java 7
 # http://hg.openjdk.java.net/jdk7u/jdk7u60/hotspot/file/tip/src/share/vm/runtime/globals.hpp#l1622

http://git-wip-us.apache.org/repos/asf/drill/blob/6b98db38/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
index fb764c7..1591079 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
@@ -87,6 +87,7 @@ public interface ExecConstants {
   public static final String ENABLE_FRAGMENT_MEMORY_LIMIT = "drill.exec.memory.enable_frag_limit";
   public static final String FRAGMENT_MEM_OVERCOMMIT_FACTOR = "drill.exec.memory.frag_mem_overcommit_factor";
 
+  public static final String USE_LINUX_EPOLL = "drill.exec.enable-epoll";
 
   public static final String CLIENT_SUPPORT_COMPLEX_TYPES = "drill.client.supports-complex-types";
 

http://git-wip-us.apache.org/repos/asf/drill/blob/6b98db38/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 6401518..34da53c 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
@@ -30,10 +30,11 @@ import io.netty.util.internal.SystemPropertyUtil;
 
 import java.util.Locale;
 
+import org.apache.drill.exec.ExecConstants;
+
 /**
  * TransportCheck decides whether or not to use the native EPOLL mechanism for communication.
  */
-@SuppressWarnings("unused")
 public class TransportCheck {
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TransportCheck.class);
 
@@ -43,12 +44,10 @@ 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 //
-        ) {
-      SUPPORTS_EPOLL = false;
-    }else{
+    if (name.startsWith("linux") && SystemPropertyUtil.getBoolean(ExecConstants.USE_LINUX_EPOLL,
false)) {
       SUPPORTS_EPOLL = true;
+    } else {
+      SUPPORTS_EPOLL = false;
     }
   }
 


Mime
View raw message