[ https://issues.apache.org/jira/browse/HIVE-28579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitriy Fingerman resolved HIVE-28579. -------------------------------------- Fix Version/s: 4.1.0 Resolution: Fixed Thanks [~ayushsaxena] and [~dkuzmenko] for review! > Add query id to HiveSQLException > -------------------------------- > > Key: HIVE-28579 > URL: https://issues.apache.org/jira/browse/HIVE-28579 > Project: Hive > Issue Type: Improvement > Security Level: Public(Viewable by anyone) > Reporter: Dmitriy Fingerman > Assignee: Dmitriy Fingerman > Priority: Major > Labels: pull-request-available > Fix For: 4.1.0 > > Attachments: Screenshot 2024-10-23 at 5.54.03 PM.png > > > +*Background:*+ > Hive operational log is a query log that contains messages for a specific > query id and is intended for Hive clients. > When operational log is enabled, it shows query id, exception stack traces > and other messages in Hue and Beeline (see screenshot attached). Hive clients > fetch the operational log using Hive-specific jdbc method > *HiveStatement.getQueryLog.* > The following settings control operational log behavior: > * {*}Hive.server2.logging.operation.enabled{*}: true/false (true by default) > * {*}hive.server2.logging.operation.level{*}: > * > ** {{ NONE: Ignore any logging}} > ** {{ EXECUTION: Log completion of tasks}} > ** {{ PERFORMANCE: Execution + Performance logs}} > ** {{ VERBOSE: All logs}} > * Log level can be changed on session level. > * The default log level is {{{}EXECUTION{}}}, which displays exception stack > traces which is not good as a default for non-technical users. > +*Problem Description:*+ > Currently, when '{*}hive.server2.async.exec.async.compile{*}' {*}= > '{*}{*}true{*}' and an exception happens, an operational log is not displayed > in Beeline and Hue (because stmtHandle is empty) and only exception message > is displayed. Query id is not displayed. > When *'hive.server2.async.exec.async.compile' = 'false'* and operational log > level != 'NONE'{*},{*} operational log is displayed with query id and > exception stack trace and also exception message is displayed. > End-users should know Query ID, because using one they can find stack traces > and other info in HiveServer2 log when operational log is disabled. > +*Proposed Solution:*+ > Add query id to HiveSQLException's message so that when operational log is > disabled user will be able to get more info about exception from hiveserver2 > log. -- This message was sent by Atlassian Jira (v8.20.10#820010)