use of org.apache.accumulo.core.clientImpl.thrift.ClientService in project accumulo by apache.
the class ServerClient method executeRawVoid.
public static void executeRawVoid(ClientContext context, ClientExec<ClientService.Client> exec) throws Exception {
while (true) {
ClientService.Client client = null;
String server = null;
try {
Pair<String, Client> pair = ServerClient.getConnection(context, new ClientService.Client.Factory(), true);
server = pair.getFirst();
client = pair.getSecond();
exec.execute(client);
break;
} catch (TApplicationException tae) {
throw new AccumuloServerException(server, tae);
} catch (TTransportException tte) {
log.debug("ClientService request failed " + server + ", retrying ... ", tte);
sleepUninterruptibly(100, MILLISECONDS);
} finally {
if (client != null)
ServerClient.close(client, context);
}
}
}
Aggregations