return execute(callable);
}
private Pair<String, Pair<Boolean, List<ExecuteResult>>> execute(
FClientCallable callable) throws IOException {
ExecuteResponse response = null;
try {
response = callable.withRetries();
if (response.hasSessionId()) {
callables.put(response.getSessionId(), callable);
}
List<ExecuteResultProto> results = response.getResultList();
List<StringDataTypePair> metaDatas = response.getMetaList();
return new Pair<String, Pair<Boolean, List<ExecuteResult>>>(
response.getSessionId(), new Pair<Boolean, List<ExecuteResult>>(
response.getLastScan(), ProtobufUtil.toExecuteResult(results,
metaDatas)));
} catch (Exception e) {
if (response != null) {
callables.remove(response.getSessionId());
}
if (e instanceof IOException) {
throw (IOException) e;
}
throw new IOException(e);