drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [01/10] drill git commit: DRILL-2537: Set a maximum source code size of 2mb for scalar replacement.
Date Thu, 26 Mar 2015 06:26:40 GMT
Repository: drill
Updated Branches:
  refs/heads/0.8.0 [created] 462e50ce9


DRILL-2537: Set a maximum source code size of 2mb for scalar replacement.


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

Branch: refs/heads/0.8.0
Commit: 1efdbf522749ec0c1ad77d1295af2259873ab81d
Parents: f1b59ed
Author: Jacques Nadeau <jacques@apache.org>
Authored: Tue Mar 24 10:46:43 2015 -0700
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Tue Mar 24 10:46:43 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/compile/ClassTransformer.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/1efdbf52/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
index d4d74dd..3c93599 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
@@ -42,6 +42,8 @@ import com.google.common.collect.Sets;
 public class ClassTransformer {
   private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ClassTransformer.class);
 
+  private static final int MAX_SCALAR_REPLACE_CODE_SIZE = 2*1024*1024; // 2meg
+
   private final ByteCodeLoader byteCodeLoader = new ByteCodeLoader();
   private final OptionManager optionManager;
 
@@ -257,7 +259,7 @@ public class ClassTransformer {
          *  we're using TRY.
          */
         MergedClassResult result = null;
-        boolean scalarReplace = scalarReplacementOption != ScalarReplacementOption.OFF;
+        boolean scalarReplace = scalarReplacementOption != ScalarReplacementOption.OFF &&
entireClass.length() < MAX_SCALAR_REPLACE_CODE_SIZE;
         while(true) {
           try {
             result = MergeAdapter.getMergedClass(nextSet, precompiledBytes, generatedNode,
scalarReplace);


Mime
View raw message