| 48 | } |
| 49 | |
| 50 | Status ImpaladQueryExecutor::Setup() { |
| 51 | client_.reset(new ThriftClient<ImpalaServiceClient>(hostname_, port_)); |
| 52 | // Wait for up to 10s for the server to start, polling at 50ms intervals |
| 53 | RETURN_IF_ERROR(WaitForServer(hostname_, port_, 200, 50)); |
| 54 | RETURN_IF_ERROR(client_->Open()); |
| 55 | return Status::OK(); |
| 56 | } |
| 57 | |
| 58 | Status ImpaladQueryExecutor::Close() { |
| 59 | if (!query_in_progress_) return Status::OK(); |