[ 
https://issues.apache.org/jira/browse/DRILL-6793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16653272#comment-16653272
 ] 

ASF GitHub Bot commented on DRILL-6793:
---------------------------------------

vvysotskyi commented on a change in pull request #1506: DRILL-6793: 
FragmentExecutor cannot send its final state for the caseā€¦
URL: https://github.com/apache/drill/pull/1506#discussion_r225852711
 
 

 ##########
 File path: 
contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/MaprDBJsonRecordReader.java
 ##########
 @@ -530,8 +530,10 @@ public void close() {
 
   @Override
   public String toString() {
-    StringBuilder sb = new StringBuilder("MaprDBJsonRecordReader[Table=")
-        .append(table.getPath());
+    StringBuilder sb = new StringBuilder("MaprDBJsonRecordReader[Table=");
+    if (table != null) {
+      sb.append(table.getPath());
+    }
     if (reader != null) {
       sb.append(", Document ID=")
 
 Review comment:
   Also, please move `, `string here and below to the previous appenders.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> FragmentExecutor cannot send its final state for the case when RootExec root 
> wasn't initialized
> -----------------------------------------------------------------------------------------------
>
>                 Key: DRILL-6793
>                 URL: https://issues.apache.org/jira/browse/DRILL-6793
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.15.0
>            Reporter: Volodymyr Vysotskyi
>            Assignee: Bohdan Kazydub
>            Priority: Major
>             Fix For: 1.15.0
>
>
> *Problem description*
> For the case when the exception was thrown during [initializing {{RootExec 
> root}}|https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentExecutor.java#L264],
>  after that {{root.dumpBatches()}} is called in 
> {{FragmentExecutor.cleanup()}} method, so NPE will be thrown before releasing 
> the resources and sending the final state.
> {noformat}
> 20:11:22.910 [243f2a45-cd8a-b3f8-3d5d-36fdbe8fb446:frag:0:0] ERROR 
> o.a.d.exec.server.BootStrapContext - 
> org.apache.drill.exec.work.WorkManager$WorkerBee$2.run() leaked an exception.
> Exception in thread "243f2a45-cd8a-b3f8-3d5d-36fdbe8fb446:frag:0:0" 
> java.lang.NullPointerException
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:211)
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:330)
>       at 
> org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>       at java.lang.Thread.run(Thread.java:748)
> java.lang.NullPointerException: null
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:211)
>  ~[classes/:na]
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:330)
>  ~[classes/:na]
>       at 
> org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
>  ~[classes/:na]
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[na:1.8.0_181]
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  [na:1.8.0_181]
>       at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
> {noformat}
> *Simple reproduce*
> Throw the exception in the constructor of {{ParquetRecordReader}} and run any 
> parquet test, for example 
> {{TestParquetMetadataCache.testPartitionPruningWithMetadataCache_1()}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to