we use thrift java server and can get the client ip and port:
https://github.com/amutu/tdw/blob/master/qe/service/src/java/org/apache/hadoop/hive/service/HiveServer.java#L342

        TSocket tSocket = (TSocket) trans;
        Socket socket = tSocket.getSocket();
        InetAddress addr = socket.getInetAddress();

        LOG.info(ss.getSessionName() + " client address: " + addr.
getHostAddress() + " client port: " + socket.getPort());

Jov
blog: http:amutu.com/blog <http://amutu.com/blog>


2014-05-28 14:39 GMT+08:00 Phillip Simbwa <[email protected]>:

> Anyone know what options are available to determine connected client
> IPs on the thrift server side?
>
>
> --
> - Phillip.
>
> "Aoccdrnig to rscheearch at an Elingsh uinervtisy, it deosn't mttaer in
> waht
> oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist
> and lsat ltteer are in the rghit pclae.
>  The rset can be a toatl mses  and
> you can sitll raed it wouthit a porbelm. Tihs is bcuseae we do not raed
> ervey lteter by it slef but the wrod as a wlohe and the biran fguiers it
> out aynawy."
>

Reply via email to