rubberliu opened a new issue, #6896:
URL: https://github.com/apache/kyuubi/issues/6896

   
   ### Discussed in https://github.com/apache/kyuubi/discussions/6895
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **rubberliu** January 17, 2025</sup>
   I want to decode the body of HTTP request from beeline client in 
"transportMode=http", just like:
   `beeline -u 
"jdbc:hive2://xxx.xxx:<port>/;transportMode=http;httpPath=cliservice"`
   
   since the body has been encoded by thrift protocol, I use code:
   ```
   ByteBuf content = request.content().copy();
            byte[] data = new byte[content.readableBytes()];
            content.readBytes(data);
            logger.info("AuthenticationHandler extractUserPass: " +
            request.content().toString(CharsetUtil.UTF_8));
            TDeserializer deserializer = new TDeserializer(new 
TBinaryProtocol.Factory());
            org.apache.hive.service.rpc.thrift.TOpenSessionReq openSessionReq =
            new org.apache.hive.service.rpc.thrift.TOpenSessionReq();
            deserializer.deserialize(openSessionReq, data);
            openSessionReq.getConfiguration().forEach(
            (k, v) -> logger.info("AuthenticationHandler extractUserPass 
configuration: {}: {}", k, v));
            } catch (Exception e) {
            logger.error(e.getMessage(), e);
   ```
   but occur fail.
   
   How does **Kyuubi** source code parse the body encoded by thrift protocol 
from the client? </div>****


-- 
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-unsubscr...@kyuubi.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org
For additional commands, e-mail: notifications-h...@kyuubi.apache.org

Reply via email to