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

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

Github user arina-ielchiieva commented on the issue:

    https://github.com/apache/drill/pull/902
  
    @paul-rogers, thansk for the code review. 
    
    Here is short description, hope it would be helpful:
    The main change is in `MapRDBSubScan` class. The problem was that mapr-db 
plugin was trying to get format plugin from the default list of format plugins 
(which is created at Drill start up) but since table function uses custom 
format it was getting null value. For this case we need to get format plugin 
from `StoragePluginRegistry` which will create format plugin if it is absent in 
the list of default ones. For example, the same approach is used in 
`EasySubScan` class which is used for text plugin.



> Fix NPE when mapr-db plugin is used in table function
> -----------------------------------------------------
>
>                 Key: DRILL-5714
>                 URL: https://issues.apache.org/jira/browse/DRILL-5714
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - MapRDB
>    Affects Versions: 1.11.0
>            Reporter: Arina Ielchiieva
>            Assignee: Arina Ielchiieva
>             Fix For: 1.12.0
>
>
> Query:
> {noformat}
> select * from table(mapr.`/tmp/test`(type=>'maprdb', allTextMode=>true))
> {noformat}
> Error:
> {noformat}
> 2017-08-03 13:13:56,527 [267cde6b-6327-11b4-a4f3-f59a8d82ae17:frag:0:0] ERROR 
> o.a.d.e.w.fragment.FragmentExecutor - SYSTEM ERROR: NullPointerException
> Fragment 0:0
> [Error Id: 07937ad2-90ce-43e3-b9c1-2540e1df05fa on master:31010]
> org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: 
> NullPointerException
> Fragment 0:0
> [Error Id: 07937ad2-90ce-43e3-b9c1-2540e1df05fa on master:31010]
>       at 
> org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:550)
>  ~[drill-common-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:295)
>  [drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:160)
>  [drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:264)
>  [drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
>  [drill-common-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_95]
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_95]
>       at java.lang.Thread.run(Thread.java:745) [na:1.7.0_95]
> Caused by: org.apache.drill.common.exceptions.ExecutionSetupException: 
> java.lang.NullPointerException
>       at 
> org.apache.drill.exec.store.mapr.db.MapRDBScanBatchCreator.getBatch(MapRDBScanBatchCreator.java:52)
>  ~[drill-format-mapr-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.store.mapr.db.MapRDBScanBatchCreator.getBatch(MapRDBScanBatchCreator.java:36)
>  ~[drill-format-mapr-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:156)
>  ~[drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:179)
>  ~[drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:136)
>  ~[drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:179)
>  ~[drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.physical.impl.ImplCreator.getRootExec(ImplCreator.java:109)
>  ~[drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.physical.impl.ImplCreator.getExec(ImplCreator.java:87) 
> ~[drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:207)
>  [drill-java-exec-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       ... 4 common frames omitted
> Caused by: java.lang.NullPointerException: null
>       at 
> org.apache.drill.exec.store.mapr.db.MapRDBScanBatchCreator.getBatch(MapRDBScanBatchCreator.java:46)
>  ~[drill-format-mapr-1.11.0-SNAPSHOT.jar:1.11.0-SNAPSHOT]
>       ... 12 common frames omitted
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to