msathis commented on a change in pull request #568:
URL: https://github.com/apache/arrow-datafusion/pull/568#discussion_r654563735



##########
File path: ballista/rust/scheduler/src/api/handlers.rs
##########
@@ -11,45 +11,32 @@
 // limitations under the License.
 
 use crate::SchedulerServer;
-use ballista_core::serde::protobuf::{
-    scheduler_grpc_server::SchedulerGrpc, ExecutorMetadata, 
GetExecutorMetadataParams,
-    GetExecutorMetadataResult,
-};
-use ballista_core::serde::scheduler::ExecutorMeta;
-use tonic::{Request, Response};
+use ballista_core::{serde::scheduler::ExecutorMeta, BALLISTA_VERSION};
 use warp::Rejection;
 
 #[derive(Debug, serde::Serialize)]
 struct StateResponse {
     executors: Vec<ExecutorMeta>,
     started: u128,
-    version: String,
+    version: &'static str,
 }
 
 pub(crate) async fn scheduler_state(
     data_server: SchedulerServer,
 ) -> Result<impl warp::Reply, Rejection> {
-    let data: Result<Response<GetExecutorMetadataResult>, tonic::Status> = 
data_server
-        .get_executors_metadata(Request::new(GetExecutorMetadataParams {}))
-        .await;
-    let metadata: Vec<ExecutorMeta> = match data {
-        Ok(result) => {
-            let res: &GetExecutorMetadataResult = result.get_ref();
-            let vec: &Vec<ExecutorMetadata> = &res.metadata;
-            vec.iter()
-                .map(|v: &ExecutorMetadata| ExecutorMeta {
-                    host: v.host.clone(),
-                    port: v.port as u16,
-                    id: v.id.clone(),
-                })
-                .collect()
-        }
-        Err(_) => vec![],
-    };
+    // TODO: Display last seen information in UI

Review comment:
       Thanks @edrevo Great work 👍  I can raise the follow up PR once this is 
merged!  👌




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to