Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3045

Drill is not partition pruning due to internal off-heap memory limit for planning phase

    XMLWordPrintableJSON

Details

    Description

      The symptom is: we are running simple query of the form "select x from t where dir0='xyz and dir1='2015-01-01';" partition pruning works for a while and then it stops working.
      Query does run (since we don't fail the query in the case when we failed to prune) and return correct results.

      drillbit.log

      015-04-19 15:54:22,027 [2acc305b-8f77-09af-1376-f6475c6a23c3:foreman] WARN  o.a.d.exec.memory.BufferAllocator - Unable to allocate buffer of size 5000 due to memory limit. Current allocation: 16776840
      java.lang.Exception: null
      	at org.apache.drill.exec.memory.TopLevelAllocator$ChildAllocator.buffer(TopLevelAllocator.java:220) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.memory.TopLevelAllocator$ChildAllocator.buffer(TopLevelAllocator.java:231) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.vector.VarCharVector.allocateNew(VarCharVector.java:333) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.vector.NullableVarCharVector.allocateNew(NullableVarCharVector.java:185) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.logical.partition.PruneScanRule.doOnMatch(PruneScanRule.java:187) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.logical.partition.PruneScanRule$2.onMatch(PruneScanRule.java:110) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.eigenbase.relopt.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:223) [optiq-core-0.9-drill-r20.jar:na]
      	at org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:661) [optiq-core-0.9-drill-r20.jar:na]
      	at net.hydromatic.optiq.tools.Programs$RuleSetProgram.run(Programs.java:165) [optiq-core-0.9-drill-r20.jar:na]
      	at net.hydromatic.optiq.prepare.PlannerImpl.transform(PlannerImpl.java:275) [optiq-core-0.9-drill-r20.jar:na]
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:206) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.handlers.ExplainHandler.getPlan(ExplainHandler.java:61) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:773) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:204) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
      	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
      2015-04-19 15:54:22,027 [2acc305b-8f77-09af-1376-f6475c6a23c3:foreman] WARN  o.a.d.e.p.l.partition.PruneScanRule - Exception while trying to prune partition.
      java.lang.NullPointerException: null
      	at org.apache.drill.exec.vector.VarCharVector.allocateNew(VarCharVector.java:334) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.vector.NullableVarCharVector.allocateNew(NullableVarCharVector.java:185) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.logical.partition.PruneScanRule.doOnMatch(PruneScanRule.java:187) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.logical.partition.PruneScanRule$2.onMatch(PruneScanRule.java:110) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.eigenbase.relopt.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:223) [optiq-core-0.9-drill-r20.jar:na]
      	at org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:661) [optiq-core-0.9-drill-r20.jar:na]
      	at net.hydromatic.optiq.tools.Programs$RuleSetProgram.run(Programs.java:165) [optiq-core-0.9-drill-r20.jar:na]
      	at net.hydromatic.optiq.prepare.PlannerImpl.transform(PlannerImpl.java:275) [optiq-core-0.9-drill-r20.jar:na]
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:206) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.handlers.ExplainHandler.getPlan(ExplainHandler.java:61) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:773) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:204) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
      	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
      

      Attachments

        1. DRILL-3045.patch
          6 kB
          Mehant Baid

        Activity

          People

            mehant Mehant Baid
            vicky Victoria Markman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: