/** * Closes the task. Idempotent. */ @Override public void close() { if (handle_ == null) return; worker_.closeTask(handle_); handle_ = null; if (closeWorker_) worker_.close(); }
/** * Closes the task and worker connection. */ @Override public void close() { if (records_ != null) records_.close(); if (worker_ != null) worker_.close(); }
close(); if (i + 1 < maxAttempts_ && e.getCode() == 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 " +