public static TServerSocket getServerSocket(String hiveHost, int portNum)
      throws TTransportException {
    InetSocketAddress serverAddress;
    if (hiveHost == null || hiveHost.isEmpty()) {
      // Wildcard bind
      serverAddress = new InetSocketAddress(portNum);
    } else {
      serverAddress = new InetSocketAddress(hiveHost, portNum);
    }
    return new TServerSocket(serverAddress);
  }
Create a TSocket for the provided host and port with specified loginTimeout and maxMessageSize.
will default to Thrift library default.
@param host Host to connect to.
@param port Port to connect to.
@param loginTimeout Socket timeout (0 means no timeout).
@param maxMessageSize Size in bytes for max allowable Thrift message size, less than or equal to 0
                      results in using the Thrift library default.
@return TTransport TSocket for host/port
common/src/java/org/apache/hadoop/hive/common/auth/HiveAuthUtils.java