use of org.apache.accumulo.core.client.impl.thrift.ClientService.Client 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);
}
}
}
use of org.apache.accumulo.core.client.impl.thrift.ClientService.Client in project accumulo by apache.
the class TableOperationsImpl method removeProperty.
@Override
public void removeProperty(final String tableName, final String property) throws AccumuloException, AccumuloSecurityException {
checkArgument(tableName != null, "tableName is null");
checkArgument(property != null, "property is null");
try {
MasterClient.executeTable(context, new ClientExec<MasterClientService.Client>() {
@Override
public void execute(MasterClientService.Client client) throws Exception {
client.removeTableProperty(Tracer.traceInfo(), context.rpcCreds(), tableName, property);
}
});
} catch (TableNotFoundException e) {
throw new AccumuloException(e);
}
}
Aggregations