{"record":{"id":"90e10998cba7a59a","repo":"apache/dolphinscheduler","slug":"run-hivecli-task-error","errorCode":null,"errorMessage":"run hiveCli task error","messagePattern":"run hiveCli task error","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTask.java","lineNumber":106,"sourceCode":"    @Override\n    public void handle(TaskCallBack taskCallBack) throws TaskException {\n        try {\n            IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()\n                    .appendScript(buildCommand());\n            final TaskResponse taskResponse = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);\n            setExitStatusCode(taskResponse.getExitStatusCode());\n            setAppIds(taskResponse.getAppIds());\n            setProcessId(taskResponse.getProcessId());\n            setTaskOutputParams(shellCommandExecutor.getTaskOutputParams());\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            log.error(\"The current HiveCLI Task has been interrupted\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"The current HiveCLI Task has been interrupted\", e);\n        } catch (Exception e) {\n            log.error(\"hiveCli task failure\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"run hiveCli task error\", e);\n        }\n    }\n\n    @Override\n    public void submitApplication() throws TaskException {\n\n    }\n\n    @Override\n    public void trackApplicationStatus() throws TaskException {\n\n    }\n\n    protected String buildCommand() {\n\n        final List<String> args = new ArrayList<>();\n\n        final String type = hiveCliParameters.getHiveCliTaskExecutionType();","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTask.java#L88-L124","documentation":"A catch-all in HiveCliTask.handle: the shell command launching `beeline`/hive CLI failed for a non-interrupt reason — non-zero process exit (bad SQL, connection failure to HiveServer2, auth error), failure building the command, or an I/O error from ShellCommandExecutor. The process exit code and appIds are captured before rethrow, so the task instance records the real CLI outcome.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTask.java:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the task log for the beeline/hive CLI stderr — it names the SQL or connection error","Verify hive jdbc URL, username/password/kerberos settings in the task params","Check the hive resource file was downloaded correctly and the SQL script generated (see generateSqlScriptFile logs)","Fix the SQL syntax or table permissions and re-run"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}