YARN-4073. Removed unused ApplicationACLsManager in ContainerManagerImpl constructor. (Naganarasimha G R via rohithsharmaks)

This commit is contained in:
Rohith Sharma K S 2015-09-02 14:13:33 +05:30
parent 65ccf2b125
commit 095ab9ab5f
11 changed files with 17 additions and 26 deletions

View File

@ -807,6 +807,9 @@ Release 2.8.0 - UNRELEASED
YARN-4082. Container shouldn't be killed when node's label updated. YARN-4082. Container shouldn't be killed when node's label updated.
(Wangda Tan via vvasudev) (Wangda Tan via vvasudev)
YARN-4073. Removed unused ApplicationACLsManager in ContainerManagerImpl constructor.
(Naganarasimha G R via rohithsharmaks)
Release 2.7.2 - UNRELEASED Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -166,7 +166,7 @@ protected ContainerManagerImpl createContainerManager(Context context,
NodeStatusUpdater nodeStatusUpdater, ApplicationACLsManager aclsManager, NodeStatusUpdater nodeStatusUpdater, ApplicationACLsManager aclsManager,
LocalDirsHandlerService dirsHandler) { LocalDirsHandlerService dirsHandler) {
return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater, return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater,
metrics, aclsManager, dirsHandler); metrics, dirsHandler);
} }
protected WebServer createWebServer(Context nmContext, protected WebServer createWebServer(Context nmContext,

View File

@ -134,7 +134,6 @@
import org.apache.hadoop.yarn.server.nodemanager.recovery.NMStateStoreService.RecoveredContainerState; import org.apache.hadoop.yarn.server.nodemanager.recovery.NMStateStoreService.RecoveredContainerState;
import org.apache.hadoop.yarn.server.nodemanager.recovery.NMStateStoreService.RecoveredContainerStatus; import org.apache.hadoop.yarn.server.nodemanager.recovery.NMStateStoreService.RecoveredContainerStatus;
import org.apache.hadoop.yarn.server.nodemanager.security.authorize.NMPolicyProvider; import org.apache.hadoop.yarn.server.nodemanager.security.authorize.NMPolicyProvider;
import org.apache.hadoop.yarn.server.security.ApplicationACLsManager;
import org.apache.hadoop.yarn.server.utils.BuilderUtils; import org.apache.hadoop.yarn.server.utils.BuilderUtils;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
@ -167,7 +166,6 @@ public class ContainerManagerImpl extends CompositeService implements
protected LocalDirsHandlerService dirsHandler; protected LocalDirsHandlerService dirsHandler;
protected final AsyncDispatcher dispatcher; protected final AsyncDispatcher dispatcher;
private final ApplicationACLsManager aclsManager;
private final DeletionService deletionService; private final DeletionService deletionService;
private AtomicBoolean blockNewContainerRequests = new AtomicBoolean(false); private AtomicBoolean blockNewContainerRequests = new AtomicBoolean(false);
@ -179,8 +177,7 @@ public class ContainerManagerImpl extends CompositeService implements
public ContainerManagerImpl(Context context, ContainerExecutor exec, public ContainerManagerImpl(Context context, ContainerExecutor exec,
DeletionService deletionContext, NodeStatusUpdater nodeStatusUpdater, DeletionService deletionContext, NodeStatusUpdater nodeStatusUpdater,
NodeManagerMetrics metrics, ApplicationACLsManager aclsManager, NodeManagerMetrics metrics, LocalDirsHandlerService dirsHandler) {
LocalDirsHandlerService dirsHandler) {
super(ContainerManagerImpl.class.getName()); super(ContainerManagerImpl.class.getName());
this.context = context; this.context = context;
this.dirsHandler = dirsHandler; this.dirsHandler = dirsHandler;
@ -198,7 +195,6 @@ public ContainerManagerImpl(Context context, ContainerExecutor exec,
addService(containersLauncher); addService(containersLauncher);
this.nodeStatusUpdater = nodeStatusUpdater; this.nodeStatusUpdater = nodeStatusUpdater;
this.aclsManager = aclsManager;
// Start configurable services // Start configurable services
auxiliaryServices = new AuxServices(); auxiliaryServices = new AuxServices();

View File

@ -54,7 +54,6 @@
import org.apache.hadoop.yarn.server.nodemanager.containermanager.loghandler.LogHandler; import org.apache.hadoop.yarn.server.nodemanager.containermanager.loghandler.LogHandler;
import org.apache.hadoop.yarn.server.nodemanager.containermanager.loghandler.event.LogHandlerEvent; import org.apache.hadoop.yarn.server.nodemanager.containermanager.loghandler.event.LogHandlerEvent;
import org.apache.hadoop.yarn.server.nodemanager.metrics.NodeManagerMetrics; import org.apache.hadoop.yarn.server.nodemanager.metrics.NodeManagerMetrics;
import org.apache.hadoop.yarn.server.security.ApplicationACLsManager;
public class DummyContainerManager extends ContainerManagerImpl { public class DummyContainerManager extends ContainerManagerImpl {
@ -63,11 +62,9 @@ public class DummyContainerManager extends ContainerManagerImpl {
public DummyContainerManager(Context context, ContainerExecutor exec, public DummyContainerManager(Context context, ContainerExecutor exec,
DeletionService deletionContext, NodeStatusUpdater nodeStatusUpdater, DeletionService deletionContext, NodeStatusUpdater nodeStatusUpdater,
NodeManagerMetrics metrics, NodeManagerMetrics metrics, LocalDirsHandlerService dirsHandler) {
ApplicationACLsManager applicationACLsManager,
LocalDirsHandlerService dirsHandler) {
super(context, exec, deletionContext, nodeStatusUpdater, metrics, super(context, exec, deletionContext, nodeStatusUpdater, metrics,
applicationACLsManager, dirsHandler); dirsHandler);
} }
@Override @Override

View File

@ -47,7 +47,6 @@
import org.apache.hadoop.yarn.server.nodemanager.recovery.NMNullStateStoreService; import org.apache.hadoop.yarn.server.nodemanager.recovery.NMNullStateStoreService;
import org.apache.hadoop.yarn.server.nodemanager.security.NMContainerTokenSecretManager; import org.apache.hadoop.yarn.server.nodemanager.security.NMContainerTokenSecretManager;
import org.apache.hadoop.yarn.server.nodemanager.security.NMTokenSecretManagerInNM; import org.apache.hadoop.yarn.server.nodemanager.security.NMTokenSecretManagerInNM;
import org.apache.hadoop.yarn.server.security.ApplicationACLsManager;
import org.junit.Test; import org.junit.Test;
@ -128,7 +127,7 @@ public long getRMIdentifier() {
DummyContainerManager containerManager = DummyContainerManager containerManager =
new DummyContainerManager(context, exec, del, nodeStatusUpdater, new DummyContainerManager(context, exec, del, nodeStatusUpdater,
metrics, new ApplicationACLsManager(conf), dirsHandler); metrics, dirsHandler);
nodeStatusUpdater.init(conf); nodeStatusUpdater.init(conf);
((NMContext)context).setContainerManager(containerManager); ((NMContext)context).setContainerManager(containerManager);
nodeStatusUpdater.start(); nodeStatusUpdater.start();

View File

@ -435,7 +435,7 @@ protected ContainerManagerImpl createContainerManager(Context context,
NodeStatusUpdater nodeStatusUpdater, ApplicationACLsManager aclsManager, NodeStatusUpdater nodeStatusUpdater, ApplicationACLsManager aclsManager,
LocalDirsHandlerService dirsHandler) { LocalDirsHandlerService dirsHandler) {
return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater, return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater,
metrics, aclsManager, dirsHandler){ metrics, dirsHandler){
@Override @Override
public void setBlockNewContainerRequests( public void setBlockNewContainerRequests(
boolean blockNewContainerRequests) { boolean blockNewContainerRequests) {

View File

@ -1160,7 +1160,7 @@ protected ContainerManagerImpl createContainerManager(Context context,
ApplicationACLsManager aclsManager, ApplicationACLsManager aclsManager,
LocalDirsHandlerService dirsHandler) { LocalDirsHandlerService dirsHandler) {
return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater, return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater,
metrics, aclsManager, dirsHandler) { metrics, dirsHandler) {
@Override @Override
public void cleanUpApplicationsOnNMShutDown() { public void cleanUpApplicationsOnNMShutDown() {
@ -1373,7 +1373,7 @@ protected ContainerManagerImpl createContainerManager(Context context,
ApplicationACLsManager aclsManager, ApplicationACLsManager aclsManager,
LocalDirsHandlerService diskhandler) { LocalDirsHandlerService diskhandler) {
return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater, return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater,
metrics, aclsManager, diskhandler) { metrics, diskhandler) {
@Override @Override
protected void serviceStart() { protected void serviceStart() {
// Simulating failure of starting RPC server // Simulating failure of starting RPC server
@ -1523,7 +1523,7 @@ protected ContainerManagerImpl createContainerManager(Context context,
ApplicationACLsManager aclsManager, ApplicationACLsManager aclsManager,
LocalDirsHandlerService dirsHandler) { LocalDirsHandlerService dirsHandler) {
return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater, return new ContainerManagerImpl(context, exec, del, nodeStatusUpdater,
metrics, aclsManager, dirsHandler) { metrics, dirsHandler) {
@Override @Override
public void cleanUpApplicationsOnNMShutDown() { public void cleanUpApplicationsOnNMShutDown() {

View File

@ -37,7 +37,6 @@
import org.apache.hadoop.fs.UnsupportedFileSystemException; import org.apache.hadoop.fs.UnsupportedFileSystemException;
import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.token.SecretManager.InvalidToken; import org.apache.hadoop.security.token.SecretManager.InvalidToken;
import org.apache.hadoop.util.NodeHealthScriptRunner;
import org.apache.hadoop.yarn.api.ContainerManagementProtocol; import org.apache.hadoop.yarn.api.ContainerManagementProtocol;
import org.apache.hadoop.yarn.api.protocolrecords.GetContainerStatusesRequest; import org.apache.hadoop.yarn.api.protocolrecords.GetContainerStatusesRequest;
import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records.ApplicationId;
@ -192,7 +191,7 @@ public void setup() throws IOException {
createContainerManager(DeletionService delSrvc) { createContainerManager(DeletionService delSrvc) {
return new ContainerManagerImpl(context, exec, delSrvc, nodeStatusUpdater, return new ContainerManagerImpl(context, exec, delSrvc, nodeStatusUpdater,
metrics, new ApplicationACLsManager(conf), dirsHandler) { metrics, dirsHandler) {
@Override @Override
public void public void
setBlockNewContainerRequests(boolean blockNewContainerRequests) { setBlockNewContainerRequests(boolean blockNewContainerRequests) {

View File

@ -80,7 +80,6 @@
import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ContainerLocalizer; import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ContainerLocalizer;
import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService; import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService;
import org.apache.hadoop.yarn.server.nodemanager.security.NMContainerTokenSecretManager; import org.apache.hadoop.yarn.server.nodemanager.security.NMContainerTokenSecretManager;
import org.apache.hadoop.yarn.server.security.ApplicationACLsManager;
import org.apache.hadoop.yarn.server.utils.BuilderUtils; import org.apache.hadoop.yarn.server.utils.BuilderUtils;
import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.util.ConverterUtils;
import org.junit.Assert; import org.junit.Assert;
@ -116,7 +115,7 @@ private ContainerId createContainerId(int id) {
protected ContainerManagerImpl protected ContainerManagerImpl
createContainerManager(DeletionService delSrvc) { createContainerManager(DeletionService delSrvc) {
return new ContainerManagerImpl(context, exec, delSrvc, nodeStatusUpdater, return new ContainerManagerImpl(context, exec, delSrvc, nodeStatusUpdater,
metrics, new ApplicationACLsManager(conf), dirsHandler) { metrics, dirsHandler) {
@Override @Override
public void public void
setBlockNewContainerRequests(boolean blockNewContainerRequests) { setBlockNewContainerRequests(boolean blockNewContainerRequests) {
@ -801,7 +800,7 @@ public void testStartContainerFailureWithUnknownAuxService() throws Exception {
public void testNullTokens() throws Exception { public void testNullTokens() throws Exception {
ContainerManagerImpl cMgrImpl = ContainerManagerImpl cMgrImpl =
new ContainerManagerImpl(context, exec, delSrvc, nodeStatusUpdater, new ContainerManagerImpl(context, exec, delSrvc, nodeStatusUpdater,
metrics, new ApplicationACLsManager(conf), dirsHandler); metrics, dirsHandler);
String strExceptionMsg = ""; String strExceptionMsg = "";
try { try {
cMgrImpl.authorizeStartRequest(null, new ContainerTokenIdentifier()); cMgrImpl.authorizeStartRequest(null, new ContainerTokenIdentifier());

View File

@ -394,8 +394,7 @@ public void handle(ContainersLauncherEvent event) {
return new ContainerManagerImpl(context, return new ContainerManagerImpl(context,
mock(ContainerExecutor.class), mock(DeletionService.class), mock(ContainerExecutor.class), mock(DeletionService.class),
mock(NodeStatusUpdater.class), metrics, mock(NodeStatusUpdater.class), metrics, null) {
context.getApplicationACLsManager(), null) {
@Override @Override
protected LogHandler createLogHandler(Configuration conf, protected LogHandler createLogHandler(Configuration conf,
Context context, DeletionService deletionService) { Context context, DeletionService deletionService) {

View File

@ -41,7 +41,6 @@
import org.apache.hadoop.yarn.ipc.YarnRPC; import org.apache.hadoop.yarn.ipc.YarnRPC;
import org.apache.hadoop.yarn.security.NMTokenIdentifier; import org.apache.hadoop.yarn.security.NMTokenIdentifier;
import org.apache.hadoop.yarn.server.nodemanager.DeletionService; import org.apache.hadoop.yarn.server.nodemanager.DeletionService;
import org.apache.hadoop.yarn.server.security.ApplicationACLsManager;
import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.util.ConverterUtils;
import org.apache.hadoop.yarn.util.Records; import org.apache.hadoop.yarn.util.Records;
import org.junit.Assert; import org.junit.Assert;
@ -67,7 +66,7 @@ public void setUp() throws Exception {
protected ContainerManagerImpl protected ContainerManagerImpl
createContainerManager(DeletionService delSrvc) { createContainerManager(DeletionService delSrvc) {
return new ContainerManagerImpl(context, exec, delSrvc, nodeStatusUpdater, return new ContainerManagerImpl(context, exec, delSrvc, nodeStatusUpdater,
metrics, new ApplicationACLsManager(conf), dirsHandler) { metrics, dirsHandler) {
@Override @Override
public StartContainersResponse startContainers( public StartContainersResponse startContainers(