You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/21 01:57:24 UTC

[GitHub] [arrow-datafusion] mingmwang commented on a change in pull request #2029: Refactor SessionContext, SessionState and SessionConfig to support multi-tenancy configurations - Part 2

mingmwang commented on a change in pull request #2029:
URL: https://github.com/apache/arrow-datafusion/pull/2029#discussion_r830712480



##########
File path: ballista/rust/scheduler/src/scheduler_server/mod.rs
##########
@@ -160,9 +160,19 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> SchedulerServer<T
     }
 }
 
-/// Create a DataFusion context that is compatible with Ballista
+/// Create a DataFusion session context that is compatible with Ballista Configuration
 pub fn create_datafusion_context(config: &BallistaConfig) -> SessionContext {
     let config =
         SessionConfig::new().with_target_partitions(config.default_shuffle_partitions());
     SessionContext::with_config(config)
 }
+
+/// Update the existing DataFusion session context with Ballista Configuration
+pub fn update_datafusion_context(
+    session_ctx: Arc<SessionContext>,
+    config: &BallistaConfig,
+) -> Arc<SessionContext> {
+    session_ctx.state.lock().config.target_partitions =

Review comment:
       Yes, I will cover Ballista related changes in part3.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org