use of org.apache.accumulo.core.client.impl.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);
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, TimeUnit.MILLISECONDS);
} finally {
if (client != null)
ServerClient.close(client);
}
}
}
Aggregations