public static TTransport getSSLSocket(String host, int port, int loginTimeout, String trustStorePath,
      String trustStorePassWord, String trustStoreType, String trustStoreAlgorithm, int maxMessageSize)
      throws TTransportException {
    TSSLTransportParameters params = new TSSLTransportParameters();
    String tStoreType = trustStoreType.isEmpty()? KeyStore.getDefaultType() : trustStoreType;
    String tStoreAlgorithm = trustStoreAlgorithm.isEmpty()?
            TrustManagerFactory.getDefaultAlgorithm() : trustStoreAlgorithm;
    params.setTrustStore(trustStorePath, trustStorePassWord, tStoreAlgorithm, tStoreType);
    params.requireClientAuth(true);
    return getSSLSocket(host, port, loginTimeout, params, maxMessageSize);
  }
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