You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by ro...@apache.org on 2022/08/03 06:33:00 UTC
[incubator-uniffle] branch master updated: [MINOR][IMPROVEMENT] Avoid CoordinatorServer#initialization multiple `new Configuration()` (#118)
This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new d2d60e2 [MINOR][IMPROVEMENT] Avoid CoordinatorServer#initialization multiple `new Configuration()` (#118)
d2d60e2 is described below
commit d2d60e2cf3171b7a81948ba60d42f59a362ce354
Author: Binjie Yang <52...@users.noreply.github.com>
AuthorDate: Wed Aug 3 14:32:55 2022 +0800
[MINOR][IMPROVEMENT] Avoid CoordinatorServer#initialization multiple `new Configuration()` (#118)
### What changes were proposed in this pull request?
remove useless multiple `new Configuration()`
### Why are the changes needed?
Reduce consumption
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Unit test
---
.../java/org/apache/uniffle/coordinator/CoordinatorServer.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorServer.java b/coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorServer.java
index 1c8bafd..4a37353 100644
--- a/coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorServer.java
+++ b/coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorServer.java
@@ -114,13 +114,15 @@ public class CoordinatorServer {
registerMetrics();
this.applicationManager = new ApplicationManager(coordinatorConf);
- ClusterManagerFactory clusterManagerFactory = new ClusterManagerFactory(coordinatorConf, new Configuration());
+ // load default hadoop configuration
+ Configuration hadoopConf = new Configuration();
+ ClusterManagerFactory clusterManagerFactory = new ClusterManagerFactory(coordinatorConf, hadoopConf);
this.clusterManager = clusterManagerFactory.getClusterManager();
- this.clientConfManager = new ClientConfManager(coordinatorConf, new Configuration(), applicationManager);
+ this.clientConfManager = new ClientConfManager(coordinatorConf, hadoopConf, applicationManager);
AssignmentStrategyFactory assignmentStrategyFactory =
new AssignmentStrategyFactory(coordinatorConf, clusterManager);
this.assignmentStrategy = assignmentStrategyFactory.getAssignmentStrategy();
- this.accessManager = new AccessManager(coordinatorConf, clusterManager, new Configuration());
+ this.accessManager = new AccessManager(coordinatorConf, clusterManager, hadoopConf);
CoordinatorFactory coordinatorFactory = new CoordinatorFactory(this);
server = coordinatorFactory.getServer();