YARN-9096: Some GpuResourcePlugin and ResourcePluginManager methods are synchronized unnecessarily. Contributed by Gergely Pollak
(cherry picked from commit 742e30b473
)
This commit is contained in:
parent
3bcf44f070
commit
f0dfb8b832
|
@ -52,7 +52,7 @@ public class ResourcePluginManager {
|
|||
private Map<String, ResourcePlugin> 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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue