private static TTransport getHttpTransport() throws Exception {
DefaultHttpClient httpClient = new DefaultHttpClient();
String httpUrl = transportMode + "://" + host + ":" + port +
"/" + thriftHttpPath + "/";
httpClient.addRequestInterceptor(
new HttpBasicAuthInterceptor(USERNAME, PASSWORD));
return new THttpClient(httpUrl, httpClient);
}