diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/ResourcePluginManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/ResourcePluginManager.java index c1f291058e4..d6edfdd5546 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/ResourcePluginManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/ResourcePluginManager.java @@ -52,7 +52,7 @@ public class ResourcePluginManager { private Map configuredPlugins = Collections.emptyMap(); - public synchronized void initialize(Context context) + public void initialize(Context context) throws YarnException { Configuration conf = context.getConf(); @@ -108,7 +108,7 @@ public class ResourcePluginManager { } } - public synchronized void cleanup() throws YarnException { + public void cleanup() throws YarnException { for (ResourcePlugin plugin : configuredPlugins.values()) { plugin.cleanup(); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/gpu/GpuResourcePlugin.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/gpu/GpuResourcePlugin.java index 1ac6f838466..7719afb682c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/gpu/GpuResourcePlugin.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/gpu/GpuResourcePlugin.java @@ -54,7 +54,7 @@ public class GpuResourcePlugin implements ResourcePlugin { } @Override - public synchronized void initialize(Context context) throws YarnException { + public void initialize(Context context) throws YarnException { this.gpuDiscoverer.initialize(context.getConf()); this.dockerCommandPlugin = GpuDockerCommandPluginFactory.createGpuDockerCommandPlugin( @@ -62,7 +62,7 @@ public class GpuResourcePlugin implements ResourcePlugin { } @Override - public synchronized ResourceHandler createResourceHandler( + public ResourceHandler createResourceHandler( Context context, CGroupsHandler cGroupsHandler, PrivilegedOperationExecutor privilegedOperationExecutor) { if (gpuResourceHandler == null) { @@ -74,7 +74,7 @@ public class GpuResourcePlugin implements ResourcePlugin { } @Override - public synchronized NodeResourceUpdaterPlugin getNodeResourceHandlerInstance() { + public NodeResourceUpdaterPlugin getNodeResourceHandlerInstance() { return resourceDiscoverHandler; }