avantgardnerio commented on code in PR #442:
URL: https://github.com/apache/arrow-ballista/pull/442#discussion_r1006225399
##########
ballista/scheduler/src/flight_sql.rs:
##########
@@ -196,26 +196,41 @@ impl FlightSqlServiceImpl {
) -> Result<Vec<FlightEndpoint>, Status> {
let mut fieps: Vec<_> = vec![];
for loc in completed.partition_location.iter() {
- let (host, port) = if let Some(ref md) = loc.executor_meta {
+ let (exec_host, exec_port) = if let Some(ref md) =
loc.executor_meta {
(md.host.clone(), md.port)
} else {
Err(Status::internal(
- "Invalid partition location, missing executor
metadata".to_string(),
+ "Invalid partition location, missing executor metadata and
advertise_endpoint flag is undefined.".to_string(),
))?
};
+
+ let (host, port) = match &self.server.advertise_endpoint {
+ Some(endpoint) => {
+ let advertise_endpoint_vec: Vec<&str> =
endpoint.split(":").collect();
+ match advertise_endpoint_vec.as_slice() {
+ [host_ip, port] => {
Review Comment:
:heart:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]