[ https://issues.apache.org/jira/browse/SPARK-28311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-28311: ------------------------------------ Assignee: Apache Spark > Spark Thrift Server protocol version compatibility setup too late > ------------------------------------------------------------------ > > Key: SPARK-28311 > URL: https://issues.apache.org/jira/browse/SPARK-28311 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 1.6.0, 2.3.0, 2.4.0 > Reporter: angerszhu > Assignee: Apache Spark > Priority: Minor > > {code:java} > SessionHandle getSessionHandle(TOpenSessionReq req, TOpenSessionResp res) > throws HiveSQLException, LoginException, IOException { > String userName = getUserName(req); > String ipAddress = getIpAddress(); > TProtocolVersion protocol = getMinVersion(CLIService.SERVER_VERSION, > req.getClient_protocol()); > SessionHandle sessionHandle; > if (cliService.getHiveConf().getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS) > && > (userName != null)) { > String delegationTokenStr = getDelegationToken(userName); > sessionHandle = cliService.openSessionWithImpersonation(protocol, > userName, > req.getPassword(), ipAddress, req.getConfiguration(), > delegationTokenStr); > } else { > sessionHandle = cliService.openSession(protocol, userName, > req.getPassword(), > ipAddress, req.getConfiguration()); > } > res.setServerProtocolVersion(protocol); > return sessionHandle; > } > {code} > When we use V7 to connect V8 , getMinVersion will get adapted protocol > version. but #setServerProtocolVersion() is too late, isf it have error when > openSession, it will return origin V8 protocol version, it's not reasonable > {code:java} > res.setServerProtocolVersion(protocol);{code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org