/** * Get the plan request result. */ public PlanRequestResult planRequest(String hostname, int port, Request request) throws IOException, RecordServiceException { try { client_.connect(hostname, port); return client_.planRequest(request); } finally { client_.close(); } }
/** * Get the schema for 'request'. */ public GetSchemaResult getSchema(String hostname, int port, Request request) throws IOException, RecordServiceException { try { client_.connect(hostname, port); return client_.getSchema(request); } finally { client_.close(); } } }
close(); if (i + 1 < maxAttempts && e.code == TErrorCode.SERVICE_BUSY) { + hostname + ":" + port + " is rejected. ", e); } catch (TTransportException e) { close(); if (e.getType() == TTransportException.END_OF_FILE) { TRecordServiceException ex = new TRecordServiceException(); throw new IOException(errorMsg, e); } catch (TException e) { close(); String errorMsg = "Could not get service protocol version. It's likely " + "the service at " + hostname + ":" + port + " is not running the " +
throw new IOException(e); } finally { if (planner != null) planner.close();