You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "CharlieYan24 (via GitHub)" <gi...@apache.org> on 2023/02/12 14:01:10 UTC

[GitHub] [linkis] CharlieYan24 opened a new issue, #4206: [Bug] submit a HIVE job, job log contains 'java.lang.NullPointerException' error

CharlieYan24 opened a new issue, #4206:
URL: https://github.com/apache/linkis/issues/4206

   ### Search before asking
   
   - [X] I searched the [issues](https://github.com/apache/linkis/issues) and found no similar issues.
   
   
   ### Linkis Component
   
   linkis-engineconnn-plugin
   
   ### Steps to reproduce
   
   1.  run hive sql  'select count(*) from pokes where foo > 400 and foo < 450'  using java sdk. (运行HIVE语句:select count(*) from pokes where foo > 400 and foo < 450)
   2.  look history log of hive task ,there is an error message.  (运行日志中有错误日志)
   
   ```
   2023-02-12 21:10:49.010 INFO Your job is Scheduled. Please wait it to run.
   2023-02-12 21:10:49.010 INFO Job with jobId : 25 and execID : APPName_hadoop_hive_20 submitted 
   2023-02-12 21:10:49.010 INFO You have submitted a new job, script code (after variable substitution) is
   ************************************SCRIPT CODE************************************
   select count(*) from pokes where foo > 400 and foo < 450
   ************************************SCRIPT CODE************************************
   2023-02-12 21:10:49.010 INFO Your job is accepted,  jobID is APPName_hadoop_hive_20 and jobReqId is 25 in ServiceInstance(linkis-cg-entrance, dss-service:9104). Please wait it to be scheduled
   2023-02-12 21:10:49.010 INFO job is scheduled.
   2023-02-12 21:10:49.010 INFO Your job is being scheduled by orchestrator.
   2023-02-12 21:10:49.010 INFO Your job is Running now. Please wait it to complete.
   2023-02-12 21:10:49.010 INFO job is running.
   2023-02-12 21:10:49.010 INFO JobRequest (25) was submitted to Orchestrator.
   2023-02-12 21:10:49.010 INFO Background is starting a new engine for you,execId TaskID_25_otJobId_astJob_24_codeExec_24 mark id is mark_34, it may take several seconds, please wait
   2023-02-12 21:10:49.010 INFO Succeed to reuse ec : ServiceInstance(linkis-cg-engineconn, dss-service:35198)
   2023-02-12 21:10:49.010 INFO Task submit to ec: ServiceInstance(linkis-cg-engineconn, dss-service:35198) get engineConnExecId is: 11
   2023-02-12 21:10:49.010 INFO EngineConn local log path: ServiceInstance(linkis-cg-engineconn, dss-service:35198) /home/hadoop/linkis/tmp/hadoop/20230212/hive/005d76bd-802c-4bef-b492-c722bcf56394/logs
   HiveEngineExecutor_1 >> select count(*) from pokes where foo > 400 and foo < 450
   2023-02-12 21:10:49.962 WARN  [Linkis-Default-Scheduler-Thread-18] org.apache.linkis.engineplugin.hive.executor.HiveEngineConnExecutor 213 apply - obtain hive execute query plan failed, java.lang.NullPointerException: null
   	at org.apache.linkis.engineplugin.hive.executor.HiveEngineConnExecutor$$anonfun$org$apache$linkis$engineplugin$hive$executor$HiveEngineConnExecutor$$executeHQL$1.apply$mcV$sp(HiveEngineConnExecutor.scala:209) ~[linkis-engineplugin-hive-1.3.2-SNAPSHOT.jar:1.3.2-SNAPSHOT]
   	at org.apache.linkis.engineplugin.hive.executor.HiveEngineConnExecutor$$anonfun$org$apache$linkis$engineplugin$hive$executor$HiveEngineConnExecutor$$executeHQL$1.apply(HiveEngineConnExecutor.scala:207) ~[linkis-engineplugin-hive-1.3.2-SNAPSHOT.jar:1.3.2-SNAPSHOT]
   	at org.apache.linkis.engineplugin.hive.executor.HiveEngineConnExecutor$$anonfun$org$apache$linkis$engineplugin$hive$executor$HiveEngineConnExecutor$$executeHQL$1.apply(HiveEngineConnExecutor.scala:207) ~[linkis-engineplugin-hive-1.3.2-SNAPSHOT.jar:1.3.2-SNAPSHOT]
   	at org.apache.linkis.common.utils.Utils$.tryCatch(Utils.scala:48) ~[linkis-common-1.3.2-SNAPSHOT.jar:1.3.2-SNAPSHOT]
   	at org.apache.linkis.engineplugin.hive.executor.HiveEngineConnExecutor.org$apache$linkis$engineplugin$hive$executor$HiveEngineConnExecutor$$executeHQL(HiveEngineConnExecutor.scala:212) ~[linkis-engineplugin-hive-1.3.2-SNAPSHOT.jar:1.3.2-SNAPSHOT]
   ```
   
   
   ```
     private def executeHQL(realCode: String, driver: HiveDriverProxy): ExecuteResponse = {
       var needRetry: Boolean = true
       var tryCount: Int = 0
       var hasResult: Boolean = false
       var rows: Int = 0
       var columnCount: Int = 0
       while (needRetry) {
         needRetry = false
         driver.setTryCount(tryCount + 1)
         val startTime = System.currentTimeMillis()
         try {
           Utils.tryCatch {
             val queryPlan = driver.getPlan
    ...
   ```
   because we skip driver.compile() step , driver.getPlan method will throw NPE .
   
   
   ### Expected behavior
   
   log content is without exception message.(运行日志正常,没有异常)
   
   ### Your environment
   
   <!-- Please describe the linkis version you are using and basic environment information -->
   <!-- 请描述您使用的linkis版本和基本环境信息 -->
   - Linkis version used: 1.1.2
   - Environment name and version:
       - cdh-5.14.2
       - hdp-3.1.5
       - hive-2.1.1
       - spark-3.2.1
       - scala-2.12.2
       - jdk 1.8.0_121
       - ....
   
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [linkis] github-actions[bot] commented on issue #4206: [Bug] submit a HIVE job, job log contains 'java.lang.NullPointerException' error

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4206:
URL: https://github.com/apache/linkis/issues/4206#issuecomment-1427041207

   ## :blush:  Welcome to the Apache Linkis community!!
   We are glad that you are contributing by opening this issue.
   
   Please make sure to include all the relevant context.
   We will be here shortly.
   
   If you are interested in contributing to our website project, please let us know!
   You can check out our contributing guide on
    :point_right:  [How to Participate in Project Contribution](https://linkis.apache.org/community/how-to-contribute).
   
   
   ### Community
   
   |WeChat Assistant|WeChat Public Account|
   |-|-|
   |<img src="https://linkis.apache.org/Images/wedatasphere_contact_01.png" width="128"/>|<img src="https://linkis.apache.org/Images/gzh_01.png" width="128"/>|
   
   
   ### Mailing Lists
   |Name|Description|Subscribe|Unsubscribe|Archive|
   |:-----|:--------|:------|:-------|:-----|
   | [dev@linkis.apache.org](mailto:dev@linkis.apache.org) | community activity information | [subscribe](mailto:dev-subscribe@linkis.apache.org) | [unsubscribe](mailto:dev-unsubscribe@linkis.apache.org) | [archive](http://mail-archives.apache.org/mod_mbox/linkis-dev) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [linkis] CharlieYan24 closed issue #4206: [Bug] submit a HIVE job, job log contains 'java.lang.NullPointerException' error

Posted by "CharlieYan24 (via GitHub)" <gi...@apache.org>.
CharlieYan24 closed issue #4206: [Bug] submit a HIVE job, job log contains 'java.lang.NullPointerException' error
URL: https://github.com/apache/linkis/issues/4206


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org