YARN-9096: Some GpuResourcePlugin and ResourcePluginManager methods are synchronized unnecessarily. Contributed by Gergely Pollak
This commit is contained in:
parent
72d7e570a7
commit
742e30b473
|
@ -65,7 +65,7 @@ public class ResourcePluginManager {
|
|||
|
||||
private DeviceMappingManager deviceMappingManager = null;
|
||||
|
||||
public synchronized void initialize(Context context)
|
||||
public void initialize(Context context)
|
||||
throws YarnException, ClassNotFoundException {
|
||||
Configuration conf = context.getConf();
|
||||
Map<String, ResourcePlugin> pluginMap = new HashMap<>();
|
||||
|
@ -274,7 +274,7 @@ public class ResourcePluginManager {
|
|||
return deviceMappingManager;
|
||||
}
|
||||
|
||||
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