*/
public static Cassandra.Client createAuthenticatedClient(TSocket socket, Configuration conf)
throws InvalidRequestException, TException, AuthenticationException, AuthorizationException, LoginException
{
logger.debug("Creating authenticated client for CF output format");
TTransport transport = ConfigHelper.getOutputTransportFactory(conf).openTransport(socket);
TBinaryProtocol binaryProtocol = new TBinaryProtocol(transport);
Cassandra.Client client = new Cassandra.Client(binaryProtocol);
client.set_keyspace(ConfigHelper.getOutputKeyspace(conf));
if (ConfigHelper.getOutputKeyspaceUserName(conf) != null)
{