YARN-7243. Moving logging APIs over to slf4j in hadoop-yarn-server-resourcemanager. (#1634)
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
(cherry picked from commit e40e2d6ad5
)
Conflicts:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/volume/csi/VolumeManagerImpl.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/volume/csi/lifecycle/VolumeImpl.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterServiceTestBase.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestApplicationMasterLauncher.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestApplicationMasterServiceInterceptor.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceManager.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/TestRMAppTransitions.java
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairSchedulerConfiguration.java
This commit is contained in:
parent
ae8ca70fc0
commit
eb4bd54938
|
@ -34,6 +34,7 @@ import java.util.Arrays;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.Enumeration;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
@ -191,6 +192,14 @@ public abstract class GenericTestUtils {
|
||||||
setLogLevel(LogManager.getRootLogger(), Level.toLevel(level.toString()));
|
setLogLevel(LogManager.getRootLogger(), Level.toLevel(level.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setCurrentLoggersLogLevel(org.slf4j.event.Level level) {
|
||||||
|
for (Enumeration<?> loggers = LogManager.getCurrentLoggers();
|
||||||
|
loggers.hasMoreElements();) {
|
||||||
|
Logger logger = (Logger) loggers.nextElement();
|
||||||
|
logger.setLevel(Level.toLevel(level.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static org.slf4j.event.Level toLevel(String level) {
|
public static org.slf4j.event.Level toLevel(String level) {
|
||||||
return toLevel(level, org.slf4j.event.Level.DEBUG);
|
return toLevel(level, org.slf4j.event.Level.DEBUG);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager;
|
package org.apache.hadoop.yarn.server.resourcemanager;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
import org.apache.hadoop.yarn.ams.ApplicationMasterServiceContext;
|
import org.apache.hadoop.yarn.ams.ApplicationMasterServiceContext;
|
||||||
import org.apache.hadoop.yarn.ams.ApplicationMasterServiceProcessor;
|
import org.apache.hadoop.yarn.ams.ApplicationMasterServiceProcessor;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
|
import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
|
||||||
|
@ -31,6 +29,8 @@ import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRespo
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.exceptions.YarnException;
|
import org.apache.hadoop.yarn.exceptions.YarnException;
|
||||||
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
|
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@ -39,7 +39,8 @@ import java.io.IOException;
|
||||||
*/
|
*/
|
||||||
class AMSProcessingChain implements ApplicationMasterServiceProcessor {
|
class AMSProcessingChain implements ApplicationMasterServiceProcessor {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AMSProcessingChain.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(AMSProcessingChain.class);
|
||||||
|
|
||||||
private ApplicationMasterServiceProcessor head;
|
private ApplicationMasterServiceProcessor head;
|
||||||
private RMContext rmContext;
|
private RMContext rmContext;
|
||||||
|
|
|
@ -19,8 +19,8 @@ package org.apache.hadoop.yarn.server.resourcemanager;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.protobuf.InvalidProtocolBufferException;
|
import com.google.protobuf.InvalidProtocolBufferException;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.classification.InterfaceStability;
|
import org.apache.hadoop.classification.InterfaceStability;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -52,8 +52,8 @@ import java.util.TimerTask;
|
||||||
public class ActiveStandbyElectorBasedElectorService extends AbstractService
|
public class ActiveStandbyElectorBasedElectorService extends AbstractService
|
||||||
implements EmbeddedElector,
|
implements EmbeddedElector,
|
||||||
ActiveStandbyElector.ActiveStandbyElectorCallback {
|
ActiveStandbyElector.ActiveStandbyElectorCallback {
|
||||||
private static final Log LOG = LogFactory.getLog(
|
private static final Logger LOG = LoggerFactory.
|
||||||
ActiveStandbyElectorBasedElectorService.class.getName());
|
getLogger(ActiveStandbyElectorBasedElectorService.class.getName());
|
||||||
private static final HAServiceProtocol.StateChangeRequestInfo req =
|
private static final HAServiceProtocol.StateChangeRequestInfo req =
|
||||||
new HAServiceProtocol.StateChangeRequestInfo(
|
new HAServiceProtocol.StateChangeRequestInfo(
|
||||||
HAServiceProtocol.RequestSource.REQUEST_BY_ZKFC);
|
HAServiceProtocol.RequestSource.REQUEST_BY_ZKFC);
|
||||||
|
|
|
@ -29,8 +29,8 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
||||||
|
@ -110,7 +110,8 @@ import com.google.protobuf.BlockingService;
|
||||||
public class AdminService extends CompositeService implements
|
public class AdminService extends CompositeService implements
|
||||||
HAServiceProtocol, ResourceManagerAdministrationProtocol {
|
HAServiceProtocol, ResourceManagerAdministrationProtocol {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AdminService.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(AdminService.class);
|
||||||
|
|
||||||
private final ResourceManager rm;
|
private final ResourceManager rm;
|
||||||
private String rmId;
|
private String rmId;
|
||||||
|
|
|
@ -27,8 +27,8 @@ import java.util.List;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
||||||
|
@ -83,7 +83,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
@Private
|
@Private
|
||||||
public class ApplicationMasterService extends AbstractService implements
|
public class ApplicationMasterService extends AbstractService implements
|
||||||
ApplicationMasterProtocol {
|
ApplicationMasterProtocol {
|
||||||
private static final Log LOG = LogFactory.getLog(ApplicationMasterService.class);
|
private static final Logger LOG = LoggerFactory.
|
||||||
|
getLogger(ApplicationMasterService.class);
|
||||||
|
|
||||||
private final AMLivelinessMonitor amLivelinessMonitor;
|
private final AMLivelinessMonitor amLivelinessMonitor;
|
||||||
private YarnScheduler rScheduler;
|
private YarnScheduler rScheduler;
|
||||||
|
|
|
@ -40,8 +40,8 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.cli.UnrecognizedOptionException;
|
import org.apache.commons.cli.UnrecognizedOptionException;
|
||||||
import org.apache.commons.lang3.Range;
|
import org.apache.commons.lang3.Range;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
||||||
|
@ -211,7 +211,8 @@ public class ClientRMService extends AbstractService implements
|
||||||
ApplicationClientProtocol {
|
ApplicationClientProtocol {
|
||||||
private static final ArrayList<ApplicationReport> EMPTY_APPS_REPORT = new ArrayList<ApplicationReport>();
|
private static final ArrayList<ApplicationReport> EMPTY_APPS_REPORT = new ArrayList<ApplicationReport>();
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ClientRMService.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(ClientRMService.class);
|
||||||
|
|
||||||
final private AtomicInteger applicationCounter = new AtomicInteger(0);
|
final private AtomicInteger applicationCounter = new AtomicInteger(0);
|
||||||
final private YarnScheduler scheduler;
|
final private YarnScheduler scheduler;
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager;
|
package org.apache.hadoop.yarn.server.resourcemanager;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.curator.framework.CuratorFramework;
|
import org.apache.curator.framework.CuratorFramework;
|
||||||
import org.apache.curator.framework.recipes.leader.LeaderLatch;
|
import org.apache.curator.framework.recipes.leader.LeaderLatch;
|
||||||
import org.apache.curator.framework.recipes.leader.LeaderLatchListener;
|
import org.apache.curator.framework.recipes.leader.LeaderLatchListener;
|
||||||
|
@ -41,8 +41,8 @@ import java.io.IOException;
|
||||||
@InterfaceStability.Unstable
|
@InterfaceStability.Unstable
|
||||||
public class CuratorBasedElectorService extends AbstractService
|
public class CuratorBasedElectorService extends AbstractService
|
||||||
implements EmbeddedElector, LeaderLatchListener {
|
implements EmbeddedElector, LeaderLatchListener {
|
||||||
public static final Log LOG =
|
public static final Logger LOG =
|
||||||
LogFactory.getLog(CuratorBasedElectorService.class);
|
LoggerFactory.getLogger(CuratorBasedElectorService.class);
|
||||||
private LeaderLatch leaderLatch;
|
private LeaderLatch leaderLatch;
|
||||||
private CuratorFramework curator;
|
private CuratorFramework curator;
|
||||||
private String latchPath;
|
private String latchPath;
|
||||||
|
|
|
@ -25,8 +25,8 @@ import java.util.Set;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerState;
|
import org.apache.hadoop.yarn.api.records.ContainerState;
|
||||||
|
@ -67,8 +67,8 @@ import org.apache.hadoop.yarn.util.MonotonicClock;
|
||||||
* (the affected map tasks will be rescheduled).
|
* (the affected map tasks will be rescheduled).
|
||||||
*/
|
*/
|
||||||
public class DecommissioningNodesWatcher {
|
public class DecommissioningNodesWatcher {
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(DecommissioningNodesWatcher.class);
|
LoggerFactory.getLogger(DecommissioningNodesWatcher.class);
|
||||||
|
|
||||||
private final RMContext rmContext;
|
private final RMContext rmContext;
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager;
|
package org.apache.hadoop.yarn.server.resourcemanager;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
import org.apache.hadoop.yarn.ams.ApplicationMasterServiceContext;
|
import org.apache.hadoop.yarn.ams.ApplicationMasterServiceContext;
|
||||||
import org.apache.hadoop.yarn.ams.ApplicationMasterServiceUtils;
|
import org.apache.hadoop.yarn.ams.ApplicationMasterServiceUtils;
|
||||||
|
@ -104,7 +104,8 @@ import static org.apache.hadoop.yarn.exceptions
|
||||||
*/
|
*/
|
||||||
final class DefaultAMSProcessor implements ApplicationMasterServiceProcessor {
|
final class DefaultAMSProcessor implements ApplicationMasterServiceProcessor {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(DefaultAMSProcessor.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(DefaultAMSProcessor.class);
|
||||||
|
|
||||||
private final static List<Container> EMPTY_CONTAINER_LIST =
|
private final static List<Container> EMPTY_CONTAINER_LIST =
|
||||||
new ArrayList<Container>();
|
new ArrayList<Container>();
|
||||||
|
|
|
@ -31,8 +31,8 @@ import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.net.NetUtils;
|
import org.apache.hadoop.net.NetUtils;
|
||||||
import org.apache.hadoop.net.Node;
|
import org.apache.hadoop.net.Node;
|
||||||
|
@ -66,7 +66,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
public class NodesListManager extends CompositeService implements
|
public class NodesListManager extends CompositeService implements
|
||||||
EventHandler<NodesListManagerEvent> {
|
EventHandler<NodesListManagerEvent> {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(NodesListManager.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(NodesListManager.class);
|
||||||
|
|
||||||
private HostsFileReader hostsReader;
|
private HostsFileReader hostsReader;
|
||||||
private Configuration conf;
|
private Configuration conf;
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager;
|
package org.apache.hadoop.yarn.server.resourcemanager;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.ipc.RPC;
|
import org.apache.hadoop.ipc.RPC;
|
||||||
import org.apache.hadoop.ipc.Server;
|
import org.apache.hadoop.ipc.Server;
|
||||||
|
@ -95,8 +95,8 @@ public class OpportunisticContainerAllocatorAMService
|
||||||
extends ApplicationMasterService implements DistributedSchedulingAMProtocol,
|
extends ApplicationMasterService implements DistributedSchedulingAMProtocol,
|
||||||
EventHandler<SchedulerEvent> {
|
EventHandler<SchedulerEvent> {
|
||||||
|
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(OpportunisticContainerAllocatorAMService.class);
|
LoggerFactory.getLogger(OpportunisticContainerAllocatorAMService.class);
|
||||||
|
|
||||||
private final NodeQueueLoadMonitor nodeMonitor;
|
private final NodeQueueLoadMonitor nodeMonitor;
|
||||||
private final OpportunisticContainerAllocator oppContainerAllocator;
|
private final OpportunisticContainerAllocator oppContainerAllocator;
|
||||||
|
|
|
@ -22,8 +22,8 @@ import java.nio.ByteBuffer;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
|
@ -67,8 +67,8 @@ import org.apache.hadoop.yarn.util.SystemClock;
|
||||||
@Unstable
|
@Unstable
|
||||||
public class RMActiveServiceContext {
|
public class RMActiveServiceContext {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory
|
private static final Logger LOG = LoggerFactory
|
||||||
.getLog(RMActiveServiceContext.class);
|
.getLogger(RMActiveServiceContext.class);
|
||||||
|
|
||||||
private final ConcurrentMap<ApplicationId, RMApp> applications =
|
private final ConcurrentMap<ApplicationId, RMApp> applications =
|
||||||
new ConcurrentHashMap<ApplicationId, RMApp>();
|
new ConcurrentHashMap<ApplicationId, RMApp>();
|
||||||
|
|
|
@ -26,8 +26,8 @@ import java.util.TreeSet;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.ipc.Server;
|
import org.apache.hadoop.ipc.Server;
|
||||||
import org.apache.hadoop.security.AccessControlException;
|
import org.apache.hadoop.security.AccessControlException;
|
||||||
|
@ -85,7 +85,8 @@ import org.apache.hadoop.yarn.util.StringHelper;
|
||||||
public class RMAppManager implements EventHandler<RMAppManagerEvent>,
|
public class RMAppManager implements EventHandler<RMAppManagerEvent>,
|
||||||
Recoverable {
|
Recoverable {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(RMAppManager.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMAppManager.class);
|
||||||
|
|
||||||
private int maxCompletedAppsInMemory;
|
private int maxCompletedAppsInMemory;
|
||||||
private int maxCompletedAppsInStateStore;
|
private int maxCompletedAppsInStateStore;
|
||||||
|
@ -133,7 +134,8 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
|
||||||
* This class is for logging the application summary.
|
* This class is for logging the application summary.
|
||||||
*/
|
*/
|
||||||
static class ApplicationSummary {
|
static class ApplicationSummary {
|
||||||
static final Log LOG = LogFactory.getLog(ApplicationSummary.class);
|
static final Logger LOG = LoggerFactory.
|
||||||
|
getLogger(ApplicationSummary.class);
|
||||||
|
|
||||||
// Escape sequences
|
// Escape sequences
|
||||||
static final char EQUALS = '=';
|
static final char EQUALS = '=';
|
||||||
|
@ -233,7 +235,7 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
|
||||||
*/
|
*/
|
||||||
public static void logAppSummary(RMApp app) {
|
public static void logAppSummary(RMApp app) {
|
||||||
if (app != null) {
|
if (app != null) {
|
||||||
LOG.info(createAppSummary(app));
|
LOG.info(createAppSummary(app).toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ package org.apache.hadoop.yarn.server.resourcemanager;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.ipc.CallerContext;
|
import org.apache.hadoop.ipc.CallerContext;
|
||||||
import org.apache.hadoop.ipc.Server;
|
import org.apache.hadoop.ipc.Server;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
|
@ -35,7 +35,8 @@ import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
* Audit log format is written as key=value pairs. Tab separated.
|
* Audit log format is written as key=value pairs. Tab separated.
|
||||||
*/
|
*/
|
||||||
public class RMAuditLogger {
|
public class RMAuditLogger {
|
||||||
private static final Log LOG = LogFactory.getLog(RMAuditLogger.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMAuditLogger.class);
|
||||||
|
|
||||||
enum Keys {USER, OPERATION, TARGET, RESULT, IP, PERMISSIONS,
|
enum Keys {USER, OPERATION, TARGET, RESULT, IP, PERMISSIONS,
|
||||||
DESCRIPTION, APPID, APPATTEMPTID, CONTAINERID,
|
DESCRIPTION, APPID, APPATTEMPTID, CONTAINERID,
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.net.URISyntaxException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -81,7 +81,8 @@ import org.apache.hadoop.yarn.webapp.util.WebAppUtils;
|
||||||
*/
|
*/
|
||||||
public class RMContextImpl implements RMContext {
|
public class RMContextImpl implements RMContext {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(RMContextImpl.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMContextImpl.class);
|
||||||
private static final String UNAVAILABLE = "N/A";
|
private static final String UNAVAILABLE = "N/A";
|
||||||
/**
|
/**
|
||||||
* RM service contexts which runs through out RM life span. These are created
|
* RM service contexts which runs through out RM life span. These are created
|
||||||
|
|
|
@ -20,8 +20,8 @@ package org.apache.hadoop.yarn.server.resourcemanager;
|
||||||
|
|
||||||
import java.lang.Thread.UncaughtExceptionHandler;
|
import java.lang.Thread.UncaughtExceptionHandler;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.yarn.exceptions.YarnException;
|
import org.apache.hadoop.yarn.exceptions.YarnException;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ import org.apache.hadoop.yarn.exceptions.YarnException;
|
||||||
@Private
|
@Private
|
||||||
public class RMCriticalThreadUncaughtExceptionHandler
|
public class RMCriticalThreadUncaughtExceptionHandler
|
||||||
implements UncaughtExceptionHandler {
|
implements UncaughtExceptionHandler {
|
||||||
private static final Log LOG = LogFactory.getLog(
|
private static final Logger LOG = LoggerFactory.getLogger(
|
||||||
RMCriticalThreadUncaughtExceptionHandler.class);
|
RMCriticalThreadUncaughtExceptionHandler.class);
|
||||||
private final RMContext rmContext;
|
private final RMContext rmContext;
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ import javax.management.NotCompliantMBeanException;
|
||||||
import javax.management.ObjectName;
|
import javax.management.ObjectName;
|
||||||
import javax.management.StandardMBean;
|
import javax.management.StandardMBean;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.metrics2.util.MBeans;
|
import org.apache.hadoop.metrics2.util.MBeans;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
|
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
|
||||||
|
@ -40,7 +40,8 @@ import org.eclipse.jetty.util.ajax.JSON;
|
||||||
* JMX bean listing statuses of all node managers.
|
* JMX bean listing statuses of all node managers.
|
||||||
*/
|
*/
|
||||||
public class RMNMInfo implements RMNMInfoBeans {
|
public class RMNMInfo implements RMNMInfoBeans {
|
||||||
private static final Log LOG = LogFactory.getLog(RMNMInfo.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMNMInfo.class);
|
||||||
private RMContext rmContext;
|
private RMContext rmContext;
|
||||||
private ResourceScheduler scheduler;
|
private ResourceScheduler scheduler;
|
||||||
private ObjectName mbeanObjectName;
|
private ObjectName mbeanObjectName;
|
||||||
|
|
|
@ -31,8 +31,8 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.security.AccessControlException;
|
import org.apache.hadoop.security.AccessControlException;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
|
@ -89,7 +89,8 @@ import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
*/
|
*/
|
||||||
public class RMServerUtils {
|
public class RMServerUtils {
|
||||||
|
|
||||||
private static final Log LOG_HANDLE = LogFactory.getLog(RMServerUtils.class);
|
private static final Logger LOG_HANDLE =
|
||||||
|
LoggerFactory.getLogger(RMServerUtils.class);
|
||||||
|
|
||||||
public static final String UPDATE_OUTSTANDING_ERROR =
|
public static final String UPDATE_OUTSTANDING_ERROR =
|
||||||
"UPDATE_OUTSTANDING_ERROR";
|
"UPDATE_OUTSTANDING_ERROR";
|
||||||
|
@ -378,7 +379,7 @@ public class RMServerUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static UserGroupInformation verifyAdminAccess(
|
public static UserGroupInformation verifyAdminAccess(
|
||||||
YarnAuthorizationProvider authorizer, String method, final Log LOG)
|
YarnAuthorizationProvider authorizer, String method, final Logger LOG)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
// by default, this method will use AdminService as module name
|
// by default, this method will use AdminService as module name
|
||||||
return verifyAdminAccess(authorizer, method, "AdminService", LOG);
|
return verifyAdminAccess(authorizer, method, "AdminService", LOG);
|
||||||
|
@ -397,7 +398,7 @@ public class RMServerUtils {
|
||||||
*/
|
*/
|
||||||
public static UserGroupInformation verifyAdminAccess(
|
public static UserGroupInformation verifyAdminAccess(
|
||||||
YarnAuthorizationProvider authorizer, String method, String module,
|
YarnAuthorizationProvider authorizer, String method, String module,
|
||||||
final Log LOG)
|
final Logger LOG)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
UserGroupInformation user;
|
UserGroupInformation user;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -21,8 +21,10 @@ package org.apache.hadoop.yarn.server.resourcemanager;
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.sun.jersey.spi.container.servlet.ServletContainer;
|
import com.sun.jersey.spi.container.servlet.ServletContainer;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.slf4j.Marker;
|
||||||
|
import org.slf4j.MarkerFactory;
|
||||||
import org.apache.curator.framework.AuthInfo;
|
import org.apache.curator.framework.AuthInfo;
|
||||||
import org.apache.curator.framework.CuratorFramework;
|
import org.apache.curator.framework.CuratorFramework;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
|
@ -158,7 +160,9 @@ public class ResourceManager extends CompositeService
|
||||||
*/
|
*/
|
||||||
public static final int EPOCH_BIT_SHIFT = 40;
|
public static final int EPOCH_BIT_SHIFT = 40;
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ResourceManager.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(ResourceManager.class);
|
||||||
|
private static final Marker FATAL = MarkerFactory.getMarker("FATAL");
|
||||||
private static long clusterTimeStamp = System.currentTimeMillis();
|
private static long clusterTimeStamp = System.currentTimeMillis();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -935,15 +939,16 @@ public class ResourceManager extends CompositeService
|
||||||
// how depends on the event.
|
// how depends on the event.
|
||||||
switch(event.getType()) {
|
switch(event.getType()) {
|
||||||
case STATE_STORE_FENCED:
|
case STATE_STORE_FENCED:
|
||||||
LOG.fatal("State store fenced even though the resource manager " +
|
LOG.error(FATAL, "State store fenced even though the resource " +
|
||||||
"is not configured for high availability. Shutting down this " +
|
"manager is not configured for high availability. Shutting " +
|
||||||
"resource manager to protect the integrity of the state store.");
|
"down this resource manager to protect the integrity of the " +
|
||||||
|
"state store.");
|
||||||
ExitUtil.terminate(1, event.getExplanation());
|
ExitUtil.terminate(1, event.getExplanation());
|
||||||
break;
|
break;
|
||||||
case STATE_STORE_OP_FAILED:
|
case STATE_STORE_OP_FAILED:
|
||||||
if (YarnConfiguration.shouldRMFailFast(getConfig())) {
|
if (YarnConfiguration.shouldRMFailFast(getConfig())) {
|
||||||
LOG.fatal("Shutting down the resource manager because a state " +
|
LOG.error(FATAL, "Shutting down the resource manager because a " +
|
||||||
"store operation failed, and the resource manager is " +
|
"state store operation failed, and the resource manager is " +
|
||||||
"configured to fail fast. See the yarn.fail-fast and " +
|
"configured to fail fast. See the yarn.fail-fast and " +
|
||||||
"yarn.resourcemanager.fail-fast properties.");
|
"yarn.resourcemanager.fail-fast properties.");
|
||||||
ExitUtil.terminate(1, event.getExplanation());
|
ExitUtil.terminate(1, event.getExplanation());
|
||||||
|
@ -955,7 +960,7 @@ public class ResourceManager extends CompositeService
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG.fatal("Shutting down the resource manager.");
|
LOG.error(FATAL, "Shutting down the resource manager.");
|
||||||
ExitUtil.terminate(1, event.getExplanation());
|
ExitUtil.terminate(1, event.getExplanation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1004,7 +1009,7 @@ public class ResourceManager extends CompositeService
|
||||||
elector.rejoinElection();
|
elector.rejoinElection();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.fatal("Failed to transition RM to Standby mode.", e);
|
LOG.error(FATAL, "Failed to transition RM to Standby mode.", e);
|
||||||
ExitUtil.terminate(1, e);
|
ExitUtil.terminate(1, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1535,7 +1540,7 @@ public class ResourceManager extends CompositeService
|
||||||
resourceManager.start();
|
resourceManager.start();
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
LOG.fatal("Error starting ResourceManager", t);
|
LOG.error(FATAL, "Error starting ResourceManager", t);
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||||
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
||||||
import org.apache.hadoop.ipc.Server;
|
import org.apache.hadoop.ipc.Server;
|
||||||
|
@ -98,7 +98,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
public class ResourceTrackerService extends AbstractService implements
|
public class ResourceTrackerService extends AbstractService implements
|
||||||
ResourceTracker {
|
ResourceTracker {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ResourceTrackerService.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(ResourceTrackerService.class);
|
||||||
|
|
||||||
private static final RecordFactory recordFactory =
|
private static final RecordFactory recordFactory =
|
||||||
RecordFactoryProvider.getRecordFactory(null);
|
RecordFactoryProvider.getRecordFactory(null);
|
||||||
|
@ -865,7 +866,7 @@ public class ResourceTrackerService extends AbstractService implements
|
||||||
.append("} reported from NM with ID ").append(nodeId)
|
.append("} reported from NM with ID ").append(nodeId)
|
||||||
.append(" was rejected from RM with exception message as : ")
|
.append(" was rejected from RM with exception message as : ")
|
||||||
.append(ex.getMessage());
|
.append(ex.getMessage());
|
||||||
LOG.error(errorMessage, ex);
|
LOG.error(errorMessage.toString(), ex);
|
||||||
throw new IOException(errorMessage.toString(), ex);
|
throw new IOException(errorMessage.toString(), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -69,8 +69,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
@Unstable
|
@Unstable
|
||||||
public class RMApplicationHistoryWriter extends CompositeService {
|
public class RMApplicationHistoryWriter extends CompositeService {
|
||||||
|
|
||||||
public static final Log LOG = LogFactory
|
public static final Logger LOG =
|
||||||
.getLog(RMApplicationHistoryWriter.class);
|
LoggerFactory.getLogger(RMApplicationHistoryWriter.class);
|
||||||
|
|
||||||
private Dispatcher dispatcher;
|
private Dispatcher dispatcher;
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|
|
@ -25,8 +25,8 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.io.DataInputByteBuffer;
|
import org.apache.hadoop.io.DataInputByteBuffer;
|
||||||
|
@ -72,7 +72,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
*/
|
*/
|
||||||
public class AMLauncher implements Runnable {
|
public class AMLauncher implements Runnable {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AMLauncher.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(AMLauncher.class);
|
||||||
|
|
||||||
private ContainerManagementProtocol containerMgrProxy;
|
private ContainerManagementProtocol containerMgrProxy;
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
||||||
import org.apache.hadoop.service.AbstractService;
|
import org.apache.hadoop.service.AbstractService;
|
||||||
|
@ -37,7 +37,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt;
|
||||||
|
|
||||||
public class ApplicationMasterLauncher extends AbstractService implements
|
public class ApplicationMasterLauncher extends AbstractService implements
|
||||||
EventHandler<AMLauncherEvent> {
|
EventHandler<AMLauncherEvent> {
|
||||||
private static final Log LOG = LogFactory.getLog(
|
private static final Logger LOG = LoggerFactory.getLogger(
|
||||||
ApplicationMasterLauncher.class);
|
ApplicationMasterLauncher.class);
|
||||||
private ThreadPoolExecutor launcherPool;
|
private ThreadPoolExecutor launcherPool;
|
||||||
private LauncherThread launcherHandlingThread;
|
private LauncherThread launcherHandlingThread;
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.blacklist;
|
package org.apache.hadoop.yarn.server.resourcemanager.blacklist;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ResourceBlacklistRequest;
|
import org.apache.hadoop.yarn.api.records.ResourceBlacklistRequest;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -40,7 +40,8 @@ public class SimpleBlacklistManager implements BlacklistManager {
|
||||||
private final Set<String> blacklistNodes = new HashSet<>();
|
private final Set<String> blacklistNodes = new HashSet<>();
|
||||||
private static final ArrayList<String> EMPTY_LIST = new ArrayList<>();
|
private static final ArrayList<String> EMPTY_LIST = new ArrayList<>();
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(SimpleBlacklistManager.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(SimpleBlacklistManager.class);
|
||||||
|
|
||||||
public SimpleBlacklistManager(int numberOfNodeManagerHosts,
|
public SimpleBlacklistManager(int numberOfNodeManagerHosts,
|
||||||
double blacklistDisableFailureThreshold) {
|
double blacklistDisableFailureThreshold) {
|
||||||
|
|
|
@ -21,8 +21,8 @@ package org.apache.hadoop.yarn.server.resourcemanager.metrics;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
|
@ -51,8 +51,8 @@ import org.apache.hadoop.yarn.util.timeline.TimelineUtils;
|
||||||
*/
|
*/
|
||||||
public class TimelineServiceV1Publisher extends AbstractSystemMetricsPublisher {
|
public class TimelineServiceV1Publisher extends AbstractSystemMetricsPublisher {
|
||||||
|
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(TimelineServiceV1Publisher.class);
|
LoggerFactory.getLogger(TimelineServiceV1Publisher.class);
|
||||||
|
|
||||||
public TimelineServiceV1Publisher() {
|
public TimelineServiceV1Publisher() {
|
||||||
super("TimelineserviceV1Publisher");
|
super("TimelineserviceV1Publisher");
|
||||||
|
|
|
@ -24,8 +24,8 @@ import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -71,8 +71,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public class TimelineServiceV2Publisher extends AbstractSystemMetricsPublisher {
|
public class TimelineServiceV2Publisher extends AbstractSystemMetricsPublisher {
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(TimelineServiceV2Publisher.class);
|
LoggerFactory.getLogger(TimelineServiceV2Publisher.class);
|
||||||
private RMTimelineCollectorManager rmTimelineCollectorManager;
|
private RMTimelineCollectorManager rmTimelineCollectorManager;
|
||||||
private boolean publishContainerEvents;
|
private boolean publishContainerEvents;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.ThreadFactory;
|
import java.util.concurrent.ThreadFactory;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.service.AbstractService;
|
import org.apache.hadoop.service.AbstractService;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
|
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
|
||||||
|
@ -34,7 +34,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
public class SchedulingMonitor extends AbstractService {
|
public class SchedulingMonitor extends AbstractService {
|
||||||
|
|
||||||
private final SchedulingEditPolicy scheduleEditPolicy;
|
private final SchedulingEditPolicy scheduleEditPolicy;
|
||||||
private static final Log LOG = LogFactory.getLog(SchedulingMonitor.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(SchedulingMonitor.class);
|
||||||
|
|
||||||
// ScheduledExecutorService which schedules the PreemptionChecker to run
|
// ScheduledExecutorService which schedules the PreemptionChecker to run
|
||||||
// periodically.
|
// periodically.
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.monitor;
|
package org.apache.hadoop.yarn.server.resourcemanager.monitor;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.ReflectionUtils;
|
import org.apache.hadoop.util.ReflectionUtils;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
|
@ -36,7 +36,7 @@ import java.util.Set;
|
||||||
* Manages scheduling monitors.
|
* Manages scheduling monitors.
|
||||||
*/
|
*/
|
||||||
public class SchedulingMonitorManager {
|
public class SchedulingMonitorManager {
|
||||||
private static final Log LOG = LogFactory.getLog(
|
private static final Logger LOG = LoggerFactory.getLogger(
|
||||||
SchedulingMonitorManager.class);
|
SchedulingMonitorManager.class);
|
||||||
|
|
||||||
private Map<String, SchedulingMonitor> runningSchedulingMonitors =
|
private Map<String, SchedulingMonitor> runningSchedulingMonitors =
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity;
|
package org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
|
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
|
||||||
|
@ -40,8 +40,8 @@ import java.util.TreeSet;
|
||||||
|
|
||||||
public class FifoCandidatesSelector
|
public class FifoCandidatesSelector
|
||||||
extends PreemptionCandidatesSelector {
|
extends PreemptionCandidatesSelector {
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(FifoCandidatesSelector.class);
|
LoggerFactory.getLogger(FifoCandidatesSelector.class);
|
||||||
private PreemptableResourceCalculator preemptableAmountCalculator;
|
private PreemptableResourceCalculator preemptableAmountCalculator;
|
||||||
private boolean allowQueuesBalanceAfterAllQueuesSatisfied;
|
private boolean allowQueuesBalanceAfterAllQueuesSatisfied;
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ import java.util.PriorityQueue;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity.IntraQueueCandidatesSelector.TAFairOrderingComparator;
|
import org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity.IntraQueueCandidatesSelector.TAFairOrderingComparator;
|
||||||
|
@ -58,8 +58,8 @@ public class FifoIntraQueuePreemptionPlugin
|
||||||
protected final CapacitySchedulerPreemptionContext context;
|
protected final CapacitySchedulerPreemptionContext context;
|
||||||
protected final ResourceCalculator rc;
|
protected final ResourceCalculator rc;
|
||||||
|
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(FifoIntraQueuePreemptionPlugin.class);
|
LoggerFactory.getLogger(FifoIntraQueuePreemptionPlugin.class);
|
||||||
|
|
||||||
public FifoIntraQueuePreemptionPlugin(ResourceCalculator rc,
|
public FifoIntraQueuePreemptionPlugin(ResourceCalculator rc,
|
||||||
CapacitySchedulerPreemptionContext preemptionContext) {
|
CapacitySchedulerPreemptionContext preemptionContext) {
|
||||||
|
@ -185,7 +185,7 @@ public class FifoIntraQueuePreemptionPlugin
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.debug("Queue Name:" + tq.queueName + ", partition:" + tq.partition);
|
LOG.debug("Queue Name:" + tq.queueName + ", partition:" + tq.partition);
|
||||||
for (TempAppPerPartition tmpApp : tq.getApps()) {
|
for (TempAppPerPartition tmpApp : tq.getApps()) {
|
||||||
LOG.debug(tmpApp);
|
LOG.debug(tmpApp.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity;
|
package org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.Priority;
|
import org.apache.hadoop.yarn.api.records.Priority;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
|
@ -107,8 +107,8 @@ public class IntraQueueCandidatesSelector extends PreemptionCandidatesSelector {
|
||||||
IntraQueuePreemptionComputePlugin fifoPreemptionComputePlugin = null;
|
IntraQueuePreemptionComputePlugin fifoPreemptionComputePlugin = null;
|
||||||
final CapacitySchedulerPreemptionContext context;
|
final CapacitySchedulerPreemptionContext context;
|
||||||
|
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(IntraQueueCandidatesSelector.class);
|
LoggerFactory.getLogger(IntraQueueCandidatesSelector.class);
|
||||||
|
|
||||||
IntraQueueCandidatesSelector(
|
IntraQueueCandidatesSelector(
|
||||||
CapacitySchedulerPreemptionContext preemptionContext) {
|
CapacitySchedulerPreemptionContext preemptionContext) {
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
|
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration;
|
||||||
|
@ -38,8 +38,8 @@ import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
public class PreemptableResourceCalculator
|
public class PreemptableResourceCalculator
|
||||||
extends
|
extends
|
||||||
AbstractPreemptableResourceCalculator {
|
AbstractPreemptableResourceCalculator {
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(PreemptableResourceCalculator.class);
|
LoggerFactory.getLogger(PreemptableResourceCalculator.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PreemptableResourceCalculator constructor
|
* PreemptableResourceCalculator constructor
|
||||||
|
@ -217,10 +217,7 @@ public class PreemptableResourceCalculator
|
||||||
} else {
|
} else {
|
||||||
qT.setActuallyToBePreempted(Resources.none());
|
qT.setActuallyToBePreempted(Resources.none());
|
||||||
}
|
}
|
||||||
|
LOG.debug("{}", qT);
|
||||||
if (LOG.isDebugEnabled()) {
|
|
||||||
LOG.debug(qT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ package org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity;
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
|
@ -94,8 +94,8 @@ public class ProportionalCapacityPreemptionPolicy
|
||||||
PRIORITY_FIRST, USERLIMIT_FIRST;
|
PRIORITY_FIRST, USERLIMIT_FIRST;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(ProportionalCapacityPreemptionPolicy.class);
|
LoggerFactory.getLogger(ProportionalCapacityPreemptionPolicy.class);
|
||||||
|
|
||||||
private final Clock clock;
|
private final Clock clock;
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ package org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity;
|
||||||
import com.google.common.collect.HashBasedTable;
|
import com.google.common.collect.HashBasedTable;
|
||||||
import com.google.common.collect.Table;
|
import com.google.common.collect.Table;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
|
@ -45,8 +45,8 @@ import java.util.Set;
|
||||||
|
|
||||||
public class QueuePriorityContainerCandidateSelector
|
public class QueuePriorityContainerCandidateSelector
|
||||||
extends PreemptionCandidatesSelector {
|
extends PreemptionCandidatesSelector {
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(QueuePriorityContainerCandidateSelector.class);
|
LoggerFactory.getLogger(QueuePriorityContainerCandidateSelector.class);
|
||||||
|
|
||||||
// Configured timeout before doing reserved container preemption
|
// Configured timeout before doing reserved container preemption
|
||||||
private long minTimeout;
|
private long minTimeout;
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity;
|
package org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
|
@ -37,8 +37,8 @@ import java.util.Set;
|
||||||
|
|
||||||
public class ReservedContainerCandidatesSelector
|
public class ReservedContainerCandidatesSelector
|
||||||
extends PreemptionCandidatesSelector {
|
extends PreemptionCandidatesSelector {
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(ReservedContainerCandidatesSelector.class);
|
LoggerFactory.getLogger(ReservedContainerCandidatesSelector.class);
|
||||||
|
|
||||||
private PreemptableResourceCalculator preemptableAmountCalculator;
|
private PreemptableResourceCalculator preemptableAmountCalculator;
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.nodelabels;
|
package org.apache.hadoop.yarn.server.resourcemanager.nodelabels;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.Path;
|
import org.apache.hadoop.fs.Path;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
|
@ -43,8 +43,8 @@ public class FileSystemNodeAttributeStore
|
||||||
extends AbstractFSNodeStore<NodeAttributesManager>
|
extends AbstractFSNodeStore<NodeAttributesManager>
|
||||||
implements NodeAttributeStore {
|
implements NodeAttributeStore {
|
||||||
|
|
||||||
protected static final Log LOG =
|
protected static final Logger LOG =
|
||||||
LogFactory.getLog(FileSystemNodeAttributeStore.class);
|
LoggerFactory.getLogger(FileSystemNodeAttributeStore.class);
|
||||||
|
|
||||||
protected static final String DEFAULT_DIR_NAME = "node-attribute";
|
protected static final String DEFAULT_DIR_NAME = "node-attribute";
|
||||||
protected static final String MIRROR_FILENAME = "nodeattribute.mirror";
|
protected static final String MIRROR_FILENAME = "nodeattribute.mirror";
|
||||||
|
|
|
@ -37,8 +37,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.ReflectionUtils;
|
import org.apache.hadoop.util.ReflectionUtils;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeAttribute;
|
import org.apache.hadoop.yarn.api.records.NodeAttribute;
|
||||||
|
@ -67,8 +67,8 @@ import com.google.common.base.Strings;
|
||||||
* Manager holding the attributes to Labels.
|
* Manager holding the attributes to Labels.
|
||||||
*/
|
*/
|
||||||
public class NodeAttributesManagerImpl extends NodeAttributesManager {
|
public class NodeAttributesManagerImpl extends NodeAttributesManager {
|
||||||
protected static final Log LOG =
|
protected static final Logger LOG =
|
||||||
LogFactory.getLog(NodeAttributesManagerImpl.class);
|
LoggerFactory.getLogger(NodeAttributesManagerImpl.class);
|
||||||
/**
|
/**
|
||||||
* If a user doesn't specify value for a label, then empty string is
|
* If a user doesn't specify value for a label, then empty string is
|
||||||
* considered as default.
|
* considered as default.
|
||||||
|
@ -200,10 +200,7 @@ public class NodeAttributesManagerImpl extends NodeAttributesManager {
|
||||||
logMsg.append(StringUtils.join(entry.getValue().keySet(), ","));
|
logMsg.append(StringUtils.join(entry.getValue().keySet(), ","));
|
||||||
logMsg.append("] ,");
|
logMsg.append("] ,");
|
||||||
}
|
}
|
||||||
|
LOG.debug("{}", logMsg);
|
||||||
if (LOG.isDebugEnabled()) {
|
|
||||||
LOG.debug(logMsg);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null != dispatcher && NodeAttribute.PREFIX_CENTRALIZED
|
if (null != dispatcher && NodeAttribute.PREFIX_CENTRALIZED
|
||||||
.equals(attributePrefix)) {
|
.equals(attributePrefix)) {
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeAttribute;
|
import org.apache.hadoop.yarn.api.records.NodeAttribute;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeLabel;
|
import org.apache.hadoop.yarn.api.records.NodeLabel;
|
||||||
|
|
||||||
|
@ -32,7 +32,8 @@ import org.apache.hadoop.yarn.api.records.NodeLabel;
|
||||||
* Node labels utilities.
|
* Node labels utilities.
|
||||||
*/
|
*/
|
||||||
public final class NodeLabelsUtils {
|
public final class NodeLabelsUtils {
|
||||||
private static final Log LOG = LogFactory.getLog(NodeLabelsUtils.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(NodeLabelsUtils.class);
|
||||||
|
|
||||||
private NodeLabelsUtils() { /* Hidden constructor */ }
|
private NodeLabelsUtils() { /* Hidden constructor */ }
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ import java.util.Set;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.service.CompositeService;
|
import org.apache.hadoop.service.CompositeService;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||||
|
@ -47,8 +47,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
*/
|
*/
|
||||||
public class RMDelegatedNodeLabelsUpdater extends CompositeService {
|
public class RMDelegatedNodeLabelsUpdater extends CompositeService {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory
|
private static final Logger LOG = LoggerFactory
|
||||||
.getLog(RMDelegatedNodeLabelsUpdater.class);
|
.getLogger(RMDelegatedNodeLabelsUpdater.class);
|
||||||
|
|
||||||
public static final long DISABLE_DELEGATED_NODE_LABELS_UPDATE = -1;
|
public static final long DISABLE_DELEGATED_NODE_LABELS_UPDATE = -1;
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.placement;
|
package org.apache.hadoop.yarn.server.resourcemanager.placement;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
|
import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
import org.apache.hadoop.yarn.exceptions.YarnException;
|
import org.apache.hadoop.yarn.exceptions.YarnException;
|
||||||
|
@ -41,8 +41,8 @@ import static org.apache.hadoop.yarn.server.resourcemanager.placement.QueuePlace
|
||||||
import static org.apache.hadoop.yarn.server.resourcemanager.placement.QueuePlacementRuleUtils.validateAndGetQueueMapping;
|
import static org.apache.hadoop.yarn.server.resourcemanager.placement.QueuePlacementRuleUtils.validateAndGetQueueMapping;
|
||||||
|
|
||||||
public class AppNameMappingPlacementRule extends PlacementRule {
|
public class AppNameMappingPlacementRule extends PlacementRule {
|
||||||
private static final Log LOG = LogFactory
|
private static final Logger LOG = LoggerFactory
|
||||||
.getLog(AppNameMappingPlacementRule.class);
|
.getLogger(AppNameMappingPlacementRule.class);
|
||||||
|
|
||||||
public static final String CURRENT_APP_MAPPING = "%application";
|
public static final String CURRENT_APP_MAPPING = "%application";
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.placement;
|
package org.apache.hadoop.yarn.server.resourcemanager.placement;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.ReflectionUtils;
|
import org.apache.hadoop.util.ReflectionUtils;
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@ import org.apache.hadoop.util.ReflectionUtils;
|
||||||
*/
|
*/
|
||||||
public final class PlacementFactory {
|
public final class PlacementFactory {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(PlacementFactory.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(PlacementFactory.class);
|
||||||
|
|
||||||
private PlacementFactory() {
|
private PlacementFactory() {
|
||||||
// Unused.
|
// Unused.
|
||||||
|
|
|
@ -23,15 +23,16 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
|
import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
|
||||||
import org.apache.hadoop.yarn.exceptions.YarnException;
|
import org.apache.hadoop.yarn.exceptions.YarnException;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
|
|
||||||
public class PlacementManager {
|
public class PlacementManager {
|
||||||
private static final Log LOG = LogFactory.getLog(PlacementManager.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(PlacementManager.class);
|
||||||
|
|
||||||
List<PlacementRule> rules;
|
List<PlacementRule> rules;
|
||||||
ReadLock readLock;
|
ReadLock readLock;
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.security.Groups;
|
import org.apache.hadoop.security.Groups;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
|
@ -47,8 +47,8 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ManagedP
|
||||||
import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration.DOT;
|
import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration.DOT;
|
||||||
|
|
||||||
public class UserGroupMappingPlacementRule extends PlacementRule {
|
public class UserGroupMappingPlacementRule extends PlacementRule {
|
||||||
private static final Log LOG = LogFactory
|
private static final Logger LOG = LoggerFactory
|
||||||
.getLog(UserGroupMappingPlacementRule.class);
|
.getLogger(UserGroupMappingPlacementRule.class);
|
||||||
|
|
||||||
public static final String CURRENT_USER_MAPPING = "%user";
|
public static final String CURRENT_USER_MAPPING = "%user";
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -84,7 +84,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
*/
|
*/
|
||||||
public class FileSystemRMStateStore extends RMStateStore {
|
public class FileSystemRMStateStore extends RMStateStore {
|
||||||
|
|
||||||
public static final Log LOG = LogFactory.getLog(FileSystemRMStateStore.class);
|
public static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(FileSystemRMStateStore.class);
|
||||||
|
|
||||||
protected static final String ROOT_DIR_NAME = "FSRMStateRoot";
|
protected static final String ROOT_DIR_NAME = "FSRMStateRoot";
|
||||||
protected static final Version CURRENT_VERSION_INFO = Version
|
protected static final Version CURRENT_VERSION_INFO = Version
|
||||||
|
@ -765,7 +766,7 @@ public class FileSystemRMStateStore extends RMStateStore {
|
||||||
fsIn.readFully(data);
|
fsIn.readFully(data);
|
||||||
return data;
|
return data;
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.cleanup(LOG, fsIn);
|
IOUtils.cleanupWithLogger(LOG, fsIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -799,7 +800,7 @@ public class FileSystemRMStateStore extends RMStateStore {
|
||||||
fsOut = null;
|
fsOut = null;
|
||||||
fs.rename(tempPath, outputPath);
|
fs.rename(tempPath, outputPath);
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.cleanup(LOG, fsOut);
|
IOUtils.cleanupWithLogger(LOG, fsOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ import java.util.Map.Entry;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
import org.apache.hadoop.fs.Path;
|
import org.apache.hadoop.fs.Path;
|
||||||
|
@ -78,8 +78,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
*/
|
*/
|
||||||
public class LeveldbRMStateStore extends RMStateStore {
|
public class LeveldbRMStateStore extends RMStateStore {
|
||||||
|
|
||||||
public static final Log LOG =
|
public static final Logger LOG =
|
||||||
LogFactory.getLog(LeveldbRMStateStore.class);
|
LoggerFactory.getLogger(LeveldbRMStateStore.class);
|
||||||
|
|
||||||
private static final String SEPARATOR = "/";
|
private static final String SEPARATOR = "/";
|
||||||
private static final String DB_NAME = "yarn-rm-state";
|
private static final String DB_NAME = "yarn-rm-state";
|
||||||
|
@ -366,7 +366,7 @@ public class LeveldbRMStateStore extends RMStateStore {
|
||||||
try {
|
try {
|
||||||
key.readFields(in);
|
key.readFields(in);
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.cleanup(LOG, in);
|
IOUtils.cleanupWithLogger(LOG, in);
|
||||||
}
|
}
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
@ -412,7 +412,7 @@ public class LeveldbRMStateStore extends RMStateStore {
|
||||||
try {
|
try {
|
||||||
tokenData = RMStateStoreUtils.readRMDelegationTokenIdentifierData(in);
|
tokenData = RMStateStoreUtils.readRMDelegationTokenIdentifierData(in);
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.cleanup(LOG, in);
|
IOUtils.cleanupWithLogger(LOG, in);
|
||||||
}
|
}
|
||||||
return tokenData;
|
return tokenData;
|
||||||
}
|
}
|
||||||
|
@ -430,7 +430,7 @@ public class LeveldbRMStateStore extends RMStateStore {
|
||||||
try {
|
try {
|
||||||
state.rmSecretManagerState.dtSequenceNumber = in.readInt();
|
state.rmSecretManagerState.dtSequenceNumber = in.readInt();
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.cleanup(LOG, in);
|
IOUtils.cleanupWithLogger(LOG, in);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,8 @@ import javax.crypto.SecretKey;
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.util.concurrent.SettableFuture;
|
import com.google.common.util.concurrent.SettableFuture;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -109,7 +109,8 @@ public abstract class RMStateStore extends AbstractService {
|
||||||
private final ReadLock readLock;
|
private final ReadLock readLock;
|
||||||
private final WriteLock writeLock;
|
private final WriteLock writeLock;
|
||||||
|
|
||||||
public static final Log LOG = LogFactory.getLog(RMStateStore.class);
|
public static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMStateStore.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The enum defines state of RMStateStore.
|
* The enum defines state of RMStateStore.
|
||||||
|
|
|
@ -17,14 +17,15 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.recovery;
|
package org.apache.hadoop.yarn.server.resourcemanager.recovery;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.ReflectionUtils;
|
import org.apache.hadoop.util.ReflectionUtils;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
|
|
||||||
public class RMStateStoreFactory {
|
public class RMStateStoreFactory {
|
||||||
private static final Log LOG = LogFactory.getLog(RMStateStoreFactory.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMStateStoreFactory.class);
|
||||||
|
|
||||||
public static RMStateStore getStore(Configuration conf) {
|
public static RMStateStore getStore(Configuration conf) {
|
||||||
Class<? extends RMStateStore> storeClass =
|
Class<? extends RMStateStore> storeClass =
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.recovery;
|
package org.apache.hadoop.yarn.server.resourcemanager.recovery;
|
||||||
|
|
||||||
import com.google.protobuf.InvalidProtocolBufferException;
|
import com.google.protobuf.InvalidProtocolBufferException;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier;
|
import org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier;
|
||||||
|
@ -37,7 +37,8 @@ import java.io.IOException;
|
||||||
@Unstable
|
@Unstable
|
||||||
public class RMStateStoreUtils {
|
public class RMStateStoreUtils {
|
||||||
|
|
||||||
public static final Log LOG = LogFactory.getLog(RMStateStoreUtils.class);
|
public static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMStateStoreUtils.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the RM Delegation Token data from the {@link DataInputStream} as a
|
* Returns the RM Delegation Token data from the {@link DataInputStream} as a
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.recovery;
|
package org.apache.hadoop.yarn.server.resourcemanager.recovery;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.curator.framework.CuratorFramework;
|
import org.apache.curator.framework.CuratorFramework;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
|
@ -172,7 +172,8 @@ import java.util.Set;
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public class ZKRMStateStore extends RMStateStore {
|
public class ZKRMStateStore extends RMStateStore {
|
||||||
private static final Log LOG = LogFactory.getLog(ZKRMStateStore.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(ZKRMStateStore.class);
|
||||||
|
|
||||||
private static final String RM_DELEGATION_TOKENS_ROOT_ZNODE_NAME =
|
private static final String RM_DELEGATION_TOKENS_ROOT_ZNODE_NAME =
|
||||||
"RMDelegationTokensRoot";
|
"RMDelegationTokensRoot";
|
||||||
|
|
|
@ -22,8 +22,8 @@ import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.io.DataInputByteBuffer;
|
import org.apache.hadoop.io.DataInputByteBuffer;
|
||||||
import org.apache.hadoop.io.DataOutputBuffer;
|
import org.apache.hadoop.io.DataOutputBuffer;
|
||||||
import org.apache.hadoop.io.IOUtils;
|
import org.apache.hadoop.io.IOUtils;
|
||||||
|
@ -45,8 +45,8 @@ import com.google.protobuf.TextFormat;
|
||||||
|
|
||||||
public class ApplicationAttemptStateDataPBImpl extends
|
public class ApplicationAttemptStateDataPBImpl extends
|
||||||
ApplicationAttemptStateData {
|
ApplicationAttemptStateData {
|
||||||
private static Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(ApplicationAttemptStateDataPBImpl.class);
|
LoggerFactory.getLogger(ApplicationAttemptStateDataPBImpl.class);
|
||||||
ApplicationAttemptStateDataProto proto =
|
ApplicationAttemptStateDataProto proto =
|
||||||
ApplicationAttemptStateDataProto.getDefaultInstance();
|
ApplicationAttemptStateDataProto.getDefaultInstance();
|
||||||
ApplicationAttemptStateDataProto.Builder builder = null;
|
ApplicationAttemptStateDataProto.Builder builder = null;
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ReservationDefinition;
|
import org.apache.hadoop.yarn.api.records.ReservationDefinition;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.reservation.Plan;
|
import org.apache.hadoop.yarn.server.resourcemanager.reservation.Plan;
|
||||||
|
@ -48,8 +48,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
*/
|
*/
|
||||||
public class SimpleCapacityReplanner implements Planner {
|
public class SimpleCapacityReplanner implements Planner {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory
|
private static final Logger LOG = LoggerFactory
|
||||||
.getLog(SimpleCapacityReplanner.class);
|
.getLogger(SimpleCapacityReplanner.class);
|
||||||
|
|
||||||
private static final Resource ZERO_RESOURCE = Resource.newInstance(0, 0);
|
private static final Resource ZERO_RESOURCE = Resource.newInstance(0, 0);
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.io.InputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.StringUtils;
|
import org.apache.hadoop.util.StringUtils;
|
||||||
|
@ -37,8 +37,8 @@ import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
|
|
||||||
public class DynamicResourceConfiguration extends Configuration {
|
public class DynamicResourceConfiguration extends Configuration {
|
||||||
|
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(DynamicResourceConfiguration.class);
|
LoggerFactory.getLogger(DynamicResourceConfiguration.class);
|
||||||
|
|
||||||
@Private
|
@Private
|
||||||
public static final String PREFIX = "yarn.resource.dynamic.";
|
public static final String PREFIX = "yarn.resource.dynamic.";
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.resource;
|
package org.apache.hadoop.yarn.server.resourcemanager.resource;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
import org.apache.hadoop.yarn.api.records.ResourceInformation;
|
import org.apache.hadoop.yarn.api.records.ResourceInformation;
|
||||||
|
@ -47,8 +47,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
*/
|
*/
|
||||||
public class ResourceProfilesManagerImpl implements ResourceProfilesManager {
|
public class ResourceProfilesManagerImpl implements ResourceProfilesManager {
|
||||||
|
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(ResourceProfilesManagerImpl.class);
|
LoggerFactory.getLogger(ResourceProfilesManagerImpl.class);
|
||||||
|
|
||||||
private final Map<String, Resource> profiles = new ConcurrentHashMap<>();
|
private final Map<String, Resource> profiles = new ConcurrentHashMap<>();
|
||||||
private Configuration conf;
|
private Configuration conf;
|
||||||
|
|
|
@ -33,8 +33,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.ipc.CallerContext;
|
import org.apache.hadoop.ipc.CallerContext;
|
||||||
|
@ -116,7 +116,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
public class RMAppImpl implements RMApp, Recoverable {
|
public class RMAppImpl implements RMApp, Recoverable {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(RMAppImpl.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMAppImpl.class);
|
||||||
private static final String UNAVAILABLE = "N/A";
|
private static final String UNAVAILABLE = "N/A";
|
||||||
private static final String UNLIMITED = "UNLIMITED";
|
private static final String UNLIMITED = "UNLIMITED";
|
||||||
private static final long UNKNOWN = -1L;
|
private static final long UNKNOWN = -1L;
|
||||||
|
|
|
@ -36,8 +36,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||||
|
|
||||||
import javax.crypto.SecretKey;
|
import javax.crypto.SecretKey;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -127,7 +127,8 @@ public class RMAppAttemptImpl implements RMAppAttempt, Recoverable {
|
||||||
private static final String DIAGNOSTIC_LIMIT_CONFIG_ERROR_MESSAGE =
|
private static final String DIAGNOSTIC_LIMIT_CONFIG_ERROR_MESSAGE =
|
||||||
"The value of %s should be a positive integer: %s";
|
"The value of %s should be a positive integer: %s";
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(RMAppAttemptImpl.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMAppAttemptImpl.class);
|
||||||
|
|
||||||
private static final RecordFactory recordFactory = RecordFactoryProvider
|
private static final RecordFactory recordFactory = RecordFactoryProvider
|
||||||
.getRecordFactory(null);
|
.getRecordFactory(null);
|
||||||
|
|
|
@ -29,8 +29,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||||
|
|
||||||
import org.apache.commons.lang3.time.DateUtils;
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport;
|
import org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
|
@ -42,7 +42,8 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.NodeType;
|
||||||
import org.apache.hadoop.yarn.util.resource.Resources;
|
import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
|
|
||||||
public class RMAppAttemptMetrics {
|
public class RMAppAttemptMetrics {
|
||||||
private static final Log LOG = LogFactory.getLog(RMAppAttemptMetrics.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMAppAttemptMetrics.class);
|
||||||
|
|
||||||
private ApplicationAttemptId attemptId = null;
|
private ApplicationAttemptId attemptId = null;
|
||||||
// preemption info
|
// preemption info
|
||||||
|
|
|
@ -22,8 +22,8 @@ import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationTimeoutType;
|
import org.apache.hadoop.yarn.api.records.ApplicationTimeoutType;
|
||||||
|
@ -42,7 +42,8 @@ import org.apache.hadoop.yarn.util.SystemClock;
|
||||||
public class RMAppLifetimeMonitor
|
public class RMAppLifetimeMonitor
|
||||||
extends AbstractLivelinessMonitor<RMAppToMonitor> {
|
extends AbstractLivelinessMonitor<RMAppToMonitor> {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(RMAppLifetimeMonitor.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMAppLifetimeMonitor.class);
|
||||||
|
|
||||||
private RMContext rmContext;
|
private RMContext rmContext;
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.Container;
|
import org.apache.hadoop.yarn.api.records.Container;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerExitStatus;
|
import org.apache.hadoop.yarn.api.records.ContainerExitStatus;
|
||||||
|
@ -66,7 +66,8 @@ import org.apache.hadoop.yarn.webapp.util.WebAppUtils;
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||||
public class RMContainerImpl implements RMContainer {
|
public class RMContainerImpl implements RMContainer {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(RMContainerImpl.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMContainerImpl.class);
|
||||||
|
|
||||||
private static final StateMachineFactory<RMContainerImpl, RMContainerState,
|
private static final StateMachineFactory<RMContainerImpl, RMContainerState,
|
||||||
RMContainerEventType, RMContainerEvent>
|
RMContainerEventType, RMContainerEvent>
|
||||||
|
|
|
@ -35,8 +35,9 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.collections.keyvalue.DefaultMapEntry;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.net.Node;
|
import org.apache.hadoop.net.Node;
|
||||||
|
@ -103,7 +104,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class RMNodeImpl implements RMNode, EventHandler<RMNodeEvent> {
|
public class RMNodeImpl implements RMNode, EventHandler<RMNodeEvent> {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(RMNodeImpl.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RMNodeImpl.class);
|
||||||
|
|
||||||
private static final RecordFactory recordFactory = RecordFactoryProvider
|
private static final RecordFactory recordFactory = RecordFactoryProvider
|
||||||
.getRecordFactory(null);
|
.getRecordFactory(null);
|
||||||
|
|
|
@ -31,8 +31,10 @@ import java.util.TimerTask;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import com.google.gson.Gson;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -89,9 +91,6 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmnode.UpdatedContainerInfo
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities.ActivitiesManager;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities.ActivitiesManager;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.ContainerRequest;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.ContainerRequest;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.QueueEntitlement;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.QueueEntitlement;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.ReleaseContainerEvent;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.ReleaseContainerEvent;
|
||||||
import org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerContext;
|
import org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerContext;
|
||||||
import org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey;
|
import org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey;
|
||||||
|
@ -113,7 +112,8 @@ public abstract class AbstractYarnScheduler
|
||||||
<T extends SchedulerApplicationAttempt, N extends SchedulerNode>
|
<T extends SchedulerApplicationAttempt, N extends SchedulerNode>
|
||||||
extends AbstractService implements ResourceScheduler {
|
extends AbstractService implements ResourceScheduler {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AbstractYarnScheduler.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(AbstractYarnScheduler.class);
|
||||||
|
|
||||||
protected final ClusterNodeTracker<N> nodeTracker =
|
protected final ClusterNodeTracker<N> nodeTracker =
|
||||||
new ClusterNodeTracker<>();
|
new ClusterNodeTracker<>();
|
||||||
|
@ -780,7 +780,7 @@ public abstract class AbstractYarnScheduler
|
||||||
try {
|
try {
|
||||||
getQueueInfo(destQueue, false, false);
|
getQueueInfo(destQueue, false, false);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.warn(e);
|
LOG.warn(e.toString());
|
||||||
throw new YarnException(e);
|
throw new YarnException(e);
|
||||||
}
|
}
|
||||||
// check if source queue is a valid
|
// check if source queue is a valid
|
||||||
|
|
|
@ -22,8 +22,8 @@ import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.server.utils.Lock;
|
import org.apache.hadoop.yarn.server.utils.Lock;
|
||||||
|
@ -38,7 +38,8 @@ import org.apache.hadoop.yarn.server.utils.Lock;
|
||||||
@Private
|
@Private
|
||||||
public class ActiveUsersManager implements AbstractUsersManager {
|
public class ActiveUsersManager implements AbstractUsersManager {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ActiveUsersManager.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(ActiveUsersManager.class);
|
||||||
|
|
||||||
private final QueueMetrics metrics;
|
private final QueueMetrics metrics;
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
|
@ -63,7 +63,8 @@ import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
@Unstable
|
@Unstable
|
||||||
public class AppSchedulingInfo {
|
public class AppSchedulingInfo {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AppSchedulingInfo.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(AppSchedulingInfo.class);
|
||||||
|
|
||||||
private final ApplicationId applicationId;
|
private final ApplicationId applicationId;
|
||||||
private final ApplicationAttemptId applicationAttemptId;
|
private final ApplicationAttemptId applicationAttemptId;
|
||||||
|
|
|
@ -20,8 +20,8 @@ package org.apache.hadoop.yarn.server.resourcemanager.scheduler;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
|
@ -50,7 +50,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public class ClusterNodeTracker<N extends SchedulerNode> {
|
public class ClusterNodeTracker<N extends SchedulerNode> {
|
||||||
private static final Log LOG = LogFactory.getLog(ClusterNodeTracker.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(ClusterNodeTracker.class);
|
||||||
|
|
||||||
private ReadWriteLock readWriteLock = new ReentrantReadWriteLock(true);
|
private ReadWriteLock readWriteLock = new ReentrantReadWriteLock(true);
|
||||||
private Lock readLock = readWriteLock.readLock();
|
private Lock readLock = readWriteLock.readLock();
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.ReflectionUtils;
|
import org.apache.hadoop.util.ReflectionUtils;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
|
@ -30,7 +30,7 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
*/
|
*/
|
||||||
public final class ConfigurationMutationACLPolicyFactory {
|
public final class ConfigurationMutationACLPolicyFactory {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(
|
private static final Logger LOG = LoggerFactory.getLogger(
|
||||||
ConfigurationMutationACLPolicyFactory.class);
|
ConfigurationMutationACLPolicyFactory.class);
|
||||||
|
|
||||||
private ConfigurationMutationACLPolicyFactory() {
|
private ConfigurationMutationACLPolicyFactory() {
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.yarn.api.records.QueueState;
|
import org.apache.hadoop.yarn.api.records.QueueState;
|
||||||
|
@ -38,7 +38,8 @@ import org.apache.hadoop.yarn.server.resourcemanager.reservation.ReservationSche
|
||||||
public class QueueStateManager<T extends SchedulerQueue,
|
public class QueueStateManager<T extends SchedulerQueue,
|
||||||
E extends ReservationSchedulerConfiguration> {
|
E extends ReservationSchedulerConfiguration> {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(QueueStateManager.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(QueueStateManager.class);
|
||||||
|
|
||||||
private SchedulerQueueManager<T, E> queueManager;
|
private SchedulerQueueManager<T, E> queueManager;
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,13 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
public class SchedulerAppUtils {
|
public class SchedulerAppUtils {
|
||||||
|
|
||||||
public static boolean isPlaceBlacklisted(
|
public static boolean isPlaceBlacklisted(
|
||||||
SchedulerApplicationAttempt application, SchedulerNode node, Log log) {
|
SchedulerApplicationAttempt application, SchedulerNode node,
|
||||||
|
Logger log) {
|
||||||
if (application.isPlaceBlacklisted(node.getNodeName())) {
|
if (application.isPlaceBlacklisted(node.getNodeName())) {
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Skipping 'host' " + node.getNodeName() +
|
log.debug("Skipping 'host' " + node.getNodeName() +
|
||||||
|
|
|
@ -36,8 +36,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.time.DateUtils;
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
import org.apache.commons.lang3.time.FastDateFormat;
|
import org.apache.commons.lang3.time.FastDateFormat;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Stable;
|
import org.apache.hadoop.classification.InterfaceStability.Stable;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
|
@ -100,8 +100,8 @@ import com.google.common.collect.ConcurrentHashMultiset;
|
||||||
@Unstable
|
@Unstable
|
||||||
public class SchedulerApplicationAttempt implements SchedulableEntity {
|
public class SchedulerApplicationAttempt implements SchedulableEntity {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory
|
private static final Logger LOG = LoggerFactory
|
||||||
.getLog(SchedulerApplicationAttempt.class);
|
.getLogger(SchedulerApplicationAttempt.class);
|
||||||
|
|
||||||
private FastDateFormat fdf =
|
private FastDateFormat fdf =
|
||||||
FastDateFormat.getInstance("EEE MMM dd HH:mm:ss Z yyyy");
|
FastDateFormat.getInstance("EEE MMM dd HH:mm:ss Z yyyy");
|
||||||
|
|
|
@ -26,8 +26,8 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.util.Time;
|
import org.apache.hadoop.util.Time;
|
||||||
|
@ -58,7 +58,8 @@ import com.google.common.collect.ImmutableSet;
|
||||||
@Unstable
|
@Unstable
|
||||||
public abstract class SchedulerNode {
|
public abstract class SchedulerNode {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(SchedulerNode.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(SchedulerNode.class);
|
||||||
|
|
||||||
private Resource unallocatedResource = Resource.newInstance(0, 0);
|
private Resource unallocatedResource = Resource.newInstance(0, 0);
|
||||||
private Resource allocatedResource = Resource.newInstance(0, 0);
|
private Resource allocatedResource = Resource.newInstance(0, 0);
|
||||||
|
|
|
@ -27,8 +27,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -103,7 +103,8 @@ public class SchedulerUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(SchedulerUtils.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(SchedulerUtils.class);
|
||||||
|
|
||||||
private static final RecordFactory recordFactory =
|
private static final RecordFactory recordFactory =
|
||||||
RecordFactoryProvider.getRecordFactory(null);
|
RecordFactoryProvider.getRecordFactory(null);
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||||
|
@ -34,7 +34,8 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaS
|
||||||
*/
|
*/
|
||||||
// FIXME: make sure CandidateNodeSet works with this class
|
// FIXME: make sure CandidateNodeSet works with this class
|
||||||
public class ActivitiesLogger {
|
public class ActivitiesLogger {
|
||||||
private static final Log LOG = LogFactory.getLog(ActivitiesLogger.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(ActivitiesLogger.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Methods for recording activities from an app
|
* Methods for recording activities from an app
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.service.AbstractService;
|
import org.apache.hadoop.service.AbstractService;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
|
import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
|
||||||
|
@ -44,7 +44,8 @@ import java.util.ArrayList;
|
||||||
* It mainly contains operations for allocation start, add, update and finish.
|
* It mainly contains operations for allocation start, add, update and finish.
|
||||||
*/
|
*/
|
||||||
public class ActivitiesManager extends AbstractService {
|
public class ActivitiesManager extends AbstractService {
|
||||||
private static final Log LOG = LogFactory.getLog(ActivitiesManager.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(ActivitiesManager.class);
|
||||||
private ConcurrentMap<NodeId, List<NodeAllocation>> recordingNodesAllocation;
|
private ConcurrentMap<NodeId, List<NodeAllocation>> recordingNodesAllocation;
|
||||||
private ConcurrentMap<NodeId, List<NodeAllocation>> completedNodeAllocations;
|
private ConcurrentMap<NodeId, List<NodeAllocation>> completedNodeAllocations;
|
||||||
private Set<NodeId> activeRecordedNodes;
|
private Set<NodeId> activeRecordedNodes;
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It records an activity operation in allocation,
|
* It records an activity operation in allocation,
|
||||||
|
@ -34,7 +34,8 @@ public class AllocationActivity {
|
||||||
private ActivityState state;
|
private ActivityState state;
|
||||||
private String diagnostic = null;
|
private String diagnostic = null;
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AllocationActivity.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(AllocationActivity.class);
|
||||||
|
|
||||||
public AllocationActivity(String parentName, String queueName,
|
public AllocationActivity(String parentName, String queueName,
|
||||||
String priority, ActivityState state, String diagnostic, String type) {
|
String priority, ActivityState state, String diagnostic, String type) {
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.activities;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ public class NodeAllocation {
|
||||||
|
|
||||||
private ActivityNode root = null;
|
private ActivityNode root = null;
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(NodeAllocation.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(NodeAllocation.class);
|
||||||
|
|
||||||
public NodeAllocation(NodeId nodeId) {
|
public NodeAllocation(NodeId nodeId) {
|
||||||
this.nodeId = nodeId;
|
this.nodeId = nodeId;
|
||||||
|
|
|
@ -29,8 +29,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.ipc.Server;
|
import org.apache.hadoop.ipc.Server;
|
||||||
import org.apache.hadoop.security.AccessControlException;
|
import org.apache.hadoop.security.AccessControlException;
|
||||||
|
@ -75,7 +75,8 @@ import com.google.common.collect.Sets;
|
||||||
|
|
||||||
public abstract class AbstractCSQueue implements CSQueue {
|
public abstract class AbstractCSQueue implements CSQueue {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AbstractCSQueue.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(AbstractCSQueue.class);
|
||||||
volatile CSQueue parent;
|
volatile CSQueue parent;
|
||||||
final String queueName;
|
final String queueName;
|
||||||
private final String queuePath;
|
private final String queuePath;
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.security.authorize.AccessControlList;
|
import org.apache.hadoop.security.authorize.AccessControlList;
|
||||||
import org.apache.hadoop.util.StringUtils;
|
import org.apache.hadoop.util.StringUtils;
|
||||||
|
@ -37,8 +37,8 @@ import org.apache.hadoop.yarn.api.records.Priority;
|
||||||
*/
|
*/
|
||||||
public class AppPriorityACLConfigurationParser {
|
public class AppPriorityACLConfigurationParser {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory
|
private static final Logger LOG = LoggerFactory
|
||||||
.getLog(AppPriorityACLConfigurationParser.class);
|
.getLogger(AppPriorityACLConfigurationParser.class);
|
||||||
|
|
||||||
public enum AppPriorityACLKeyType {
|
public enum AppPriorityACLKeyType {
|
||||||
USER(1), GROUP(2), MAX_PRIORITY(3), DEFAULT_PRIORITY(4);
|
USER(1), GROUP(2), MAX_PRIORITY(3), DEFAULT_PRIORITY(4);
|
||||||
|
|
|
@ -36,8 +36,10 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.time.DateUtils;
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.slf4j.Marker;
|
||||||
|
import org.slf4j.MarkerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
|
import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Evolving;
|
import org.apache.hadoop.classification.InterfaceStability.Evolving;
|
||||||
import org.apache.hadoop.conf.Configurable;
|
import org.apache.hadoop.conf.Configurable;
|
||||||
|
@ -176,7 +178,10 @@ public class CapacityScheduler extends
|
||||||
PreemptableResourceScheduler, CapacitySchedulerContext, Configurable,
|
PreemptableResourceScheduler, CapacitySchedulerContext, Configurable,
|
||||||
ResourceAllocationCommitter, MutableConfScheduler {
|
ResourceAllocationCommitter, MutableConfScheduler {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(CapacityScheduler.class);
|
private static final Marker FATAL =
|
||||||
|
MarkerFactory.getMarker("FATAL");
|
||||||
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(CapacityScheduler.class);
|
||||||
|
|
||||||
private CapacitySchedulerQueueManager queueManager;
|
private CapacitySchedulerQueueManager queueManager;
|
||||||
|
|
||||||
|
@ -666,7 +671,7 @@ public class CapacityScheduler extends
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
LOG.error(e);
|
LOG.error(e.toString());
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -824,7 +829,7 @@ public class CapacityScheduler extends
|
||||||
+ "supported by the capacity scheduler, please "
|
+ "supported by the capacity scheduler, please "
|
||||||
+ "restart with all queues configured"
|
+ "restart with all queues configured"
|
||||||
+ " which were present before shutdown/restart.";
|
+ " which were present before shutdown/restart.";
|
||||||
LOG.fatal(queueErrorMsg);
|
LOG.error(FATAL, queueErrorMsg);
|
||||||
throw new QueueInvalidException(queueErrorMsg);
|
throw new QueueInvalidException(queueErrorMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -845,7 +850,7 @@ public class CapacityScheduler extends
|
||||||
+ " not presently supported by the capacity scheduler. Please"
|
+ " not presently supported by the capacity scheduler. Please"
|
||||||
+ " restart with leaf queues before shutdown/restart continuing"
|
+ " restart with leaf queues before shutdown/restart continuing"
|
||||||
+ " as leaf queues.";
|
+ " as leaf queues.";
|
||||||
LOG.fatal(queueErrorMsg);
|
LOG.error(FATAL, queueErrorMsg);
|
||||||
throw new QueueInvalidException(queueErrorMsg);
|
throw new QueueInvalidException(queueErrorMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -902,7 +907,7 @@ public class CapacityScheduler extends
|
||||||
String queueErrorMsg =
|
String queueErrorMsg =
|
||||||
"Queue named " + queueName + " could not be "
|
"Queue named " + queueName + " could not be "
|
||||||
+ "auto-created during application recovery.";
|
+ "auto-created during application recovery.";
|
||||||
LOG.fatal(queueErrorMsg, e);
|
LOG.error(FATAL, queueErrorMsg, e);
|
||||||
throw new QueueInvalidException(queueErrorMsg);
|
throw new QueueInvalidException(queueErrorMsg);
|
||||||
}
|
}
|
||||||
} else{
|
} else{
|
||||||
|
|
|
@ -20,8 +20,8 @@ package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.security.authorize.AccessControlList;
|
import org.apache.hadoop.security.authorize.AccessControlList;
|
||||||
|
@ -74,8 +74,8 @@ import java.util.Set;
|
||||||
|
|
||||||
public class CapacitySchedulerConfiguration extends ReservationSchedulerConfiguration {
|
public class CapacitySchedulerConfiguration extends ReservationSchedulerConfiguration {
|
||||||
|
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(CapacitySchedulerConfiguration.class);
|
LoggerFactory.getLogger(CapacitySchedulerConfiguration.class);
|
||||||
|
|
||||||
private static final String CS_CONFIGURATION_FILE = "capacity-scheduler.xml";
|
private static final String CS_CONFIGURATION_FILE = "capacity-scheduler.xml";
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -63,7 +63,7 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
public class CapacitySchedulerQueueManager implements SchedulerQueueManager<
|
public class CapacitySchedulerQueueManager implements SchedulerQueueManager<
|
||||||
CSQueue, CapacitySchedulerConfiguration>{
|
CSQueue, CapacitySchedulerConfiguration>{
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(
|
private static final Logger LOG = LoggerFactory.getLogger(
|
||||||
CapacitySchedulerQueueManager.class);
|
CapacitySchedulerQueueManager.class);
|
||||||
|
|
||||||
static final Comparator<CSQueue> NON_PARTITIONED_QUEUE_COMPARATOR =
|
static final Comparator<CSQueue> NON_PARTITIONED_QUEUE_COMPARATOR =
|
||||||
|
|
|
@ -24,8 +24,9 @@ import java.util.Map.Entry;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.security.AccessControlException;
|
import org.apache.hadoop.security.AccessControlException;
|
||||||
|
@ -81,7 +82,8 @@ import com.google.common.collect.Sets;
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public class LeafQueue extends AbstractCSQueue {
|
public class LeafQueue extends AbstractCSQueue {
|
||||||
private static final Log LOG = LogFactory.getLog(LeafQueue.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(LeafQueue.class);
|
||||||
|
|
||||||
private float absoluteUsedCapacity = 0.0f;
|
private float absoluteUsedCapacity = 0.0f;
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Evolving;
|
import org.apache.hadoop.classification.InterfaceStability.Evolving;
|
||||||
import org.apache.hadoop.security.AccessControlException;
|
import org.apache.hadoop.security.AccessControlException;
|
||||||
|
@ -78,7 +78,8 @@ import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
@Evolving
|
@Evolving
|
||||||
public class ParentQueue extends AbstractCSQueue {
|
public class ParentQueue extends AbstractCSQueue {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ParentQueue.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(ParentQueue.class);
|
||||||
|
|
||||||
protected final List<CSQueue> childQueues;
|
protected final List<CSQueue> childQueues;
|
||||||
private final boolean rootQueue;
|
private final boolean rootQueue;
|
||||||
|
|
|
@ -29,8 +29,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
|
@ -50,7 +50,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
@Private
|
@Private
|
||||||
public class UsersManager implements AbstractUsersManager {
|
public class UsersManager implements AbstractUsersManager {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(UsersManager.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(UsersManager.class);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Member declaration for UsersManager class.
|
* Member declaration for UsersManager class.
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.allocator;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.allocator;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
|
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer;
|
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer;
|
||||||
|
@ -43,7 +43,8 @@ import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
* extensible.
|
* extensible.
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractContainerAllocator {
|
public abstract class AbstractContainerAllocator {
|
||||||
private static final Log LOG = LogFactory.getLog(AbstractContainerAllocator.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(AbstractContainerAllocator.class);
|
||||||
|
|
||||||
FiCaSchedulerApp application;
|
FiCaSchedulerApp application;
|
||||||
AppSchedulingInfo appInfo;
|
AppSchedulingInfo appInfo;
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.Container;
|
import org.apache.hadoop.yarn.api.records.Container;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||||
import org.apache.hadoop.yarn.api.records.Priority;
|
import org.apache.hadoop.yarn.api.records.Priority;
|
||||||
|
@ -63,7 +63,8 @@ import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
* delayed scheduling mechanism to get better locality allocation.
|
* delayed scheduling mechanism to get better locality allocation.
|
||||||
*/
|
*/
|
||||||
public class RegularContainerAllocator extends AbstractContainerAllocator {
|
public class RegularContainerAllocator extends AbstractContainerAllocator {
|
||||||
private static final Log LOG = LogFactory.getLog(RegularContainerAllocator.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(RegularContainerAllocator.class);
|
||||||
|
|
||||||
public RegularContainerAllocator(FiCaSchedulerApp application,
|
public RegularContainerAllocator(FiCaSchedulerApp application,
|
||||||
ResourceCalculator rc, RMContext rmContext,
|
ResourceCalculator rc, RMContext rmContext,
|
||||||
|
|
|
@ -26,8 +26,8 @@ import java.util.Map;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FSDataInputStream;
|
import org.apache.hadoop.fs.FSDataInputStream;
|
||||||
import org.apache.hadoop.fs.FSDataOutputStream;
|
import org.apache.hadoop.fs.FSDataOutputStream;
|
||||||
|
@ -46,7 +46,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
|
||||||
* configuration storage in FileSystem
|
* configuration storage in FileSystem
|
||||||
*/
|
*/
|
||||||
public class FSSchedulerConfigurationStore extends YarnConfigurationStore {
|
public class FSSchedulerConfigurationStore extends YarnConfigurationStore {
|
||||||
public static final Log LOG = LogFactory.getLog(
|
public static final Logger LOG = LoggerFactory.getLogger(
|
||||||
FSSchedulerConfigurationStore.class);
|
FSSchedulerConfigurationStore.class);
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
import org.apache.hadoop.fs.Path;
|
import org.apache.hadoop.fs.Path;
|
||||||
|
@ -62,8 +62,8 @@ import static org.fusesource.leveldbjni.JniDBFactory.bytes;
|
||||||
*/
|
*/
|
||||||
public class LeveldbConfigurationStore extends YarnConfigurationStore {
|
public class LeveldbConfigurationStore extends YarnConfigurationStore {
|
||||||
|
|
||||||
public static final Log LOG =
|
public static final Logger LOG =
|
||||||
LogFactory.getLog(LeveldbConfigurationStore.class);
|
LoggerFactory.getLogger(LeveldbConfigurationStore.class);
|
||||||
|
|
||||||
private static final String DB_NAME = "yarn-conf-store";
|
private static final String DB_NAME = "yarn-conf-store";
|
||||||
private static final String LOG_KEY = "log";
|
private static final String LOG_KEY = "log";
|
||||||
|
|
|
@ -20,8 +20,8 @@ package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
|
@ -50,8 +50,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
public class MutableCSConfigurationProvider implements CSConfigurationProvider,
|
public class MutableCSConfigurationProvider implements CSConfigurationProvider,
|
||||||
MutableConfigurationProvider {
|
MutableConfigurationProvider {
|
||||||
|
|
||||||
public static final Log LOG =
|
public static final Logger LOG =
|
||||||
LogFactory.getLog(MutableCSConfigurationProvider.class);
|
LoggerFactory.getLogger(MutableCSConfigurationProvider.class);
|
||||||
|
|
||||||
private Configuration schedConf;
|
private Configuration schedConf;
|
||||||
private Configuration oldConf;
|
private Configuration oldConf;
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.yarn.server.records.Version;
|
import org.apache.hadoop.yarn.server.records.Version;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
|
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
|
||||||
|
@ -46,8 +46,8 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public abstract class YarnConfigurationStore {
|
public abstract class YarnConfigurationStore {
|
||||||
|
|
||||||
public static final Log LOG =
|
public static final Logger LOG =
|
||||||
LogFactory.getLog(YarnConfigurationStore.class);
|
LoggerFactory.getLogger(YarnConfigurationStore.class);
|
||||||
/**
|
/**
|
||||||
* LogMutation encapsulates the fields needed for configuration mutation
|
* LogMutation encapsulates the fields needed for configuration mutation
|
||||||
* audit logging and recovery.
|
* audit logging and recovery.
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.ReflectionUtils;
|
import org.apache.hadoop.util.ReflectionUtils;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
|
@ -29,7 +29,7 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
*/
|
*/
|
||||||
public final class YarnConfigurationStoreFactory {
|
public final class YarnConfigurationStoreFactory {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(
|
private static final Logger LOG = LoggerFactory.getLogger(
|
||||||
YarnConfigurationStoreFactory.class);
|
YarnConfigurationStoreFactory.class);
|
||||||
|
|
||||||
private YarnConfigurationStoreFactory() {
|
private YarnConfigurationStoreFactory() {
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.curator.ZKCuratorManager;
|
import org.apache.hadoop.util.curator.ZKCuratorManager;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
|
@ -45,8 +45,8 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public class ZKConfigurationStore extends YarnConfigurationStore {
|
public class ZKConfigurationStore extends YarnConfigurationStore {
|
||||||
|
|
||||||
public static final Log LOG =
|
public static final Logger LOG =
|
||||||
LogFactory.getLog(ZKConfigurationStore.class);
|
LoggerFactory.getLogger(ZKConfigurationStore.class);
|
||||||
|
|
||||||
private long maxLogs;
|
private long maxLogs;
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
|
@ -98,7 +98,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public class FiCaSchedulerApp extends SchedulerApplicationAttempt {
|
public class FiCaSchedulerApp extends SchedulerApplicationAttempt {
|
||||||
private static final Log LOG = LogFactory.getLog(FiCaSchedulerApp.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(FiCaSchedulerApp.class);
|
||||||
|
|
||||||
private final Set<ContainerId> containersToPreempt =
|
private final Set<ContainerId> containersToPreempt =
|
||||||
new HashSet<ContainerId>();
|
new HashSet<ContainerId>();
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.Container;
|
import org.apache.hadoop.yarn.api.records.Container;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||||
|
@ -40,7 +40,8 @@ import java.util.Set;
|
||||||
|
|
||||||
public class FiCaSchedulerNode extends SchedulerNode {
|
public class FiCaSchedulerNode extends SchedulerNode {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(FiCaSchedulerNode.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(FiCaSchedulerNode.class);
|
||||||
private Map<ContainerId, RMContainer> killableContainers = new HashMap<>();
|
private Map<ContainerId, RMContainer> killableContainers = new HashMap<>();
|
||||||
private Resource totalKillableResources = Resource.newInstance(0, 0);
|
private Resource totalKillableResources = Resource.newInstance(0, 0);
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@ package org.apache.hadoop.yarn.server.resourcemanager.scheduler.constraint;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.classification.InterfaceStability;
|
import org.apache.hadoop.classification.InterfaceStability;
|
||||||
import org.apache.hadoop.service.AbstractService;
|
import org.apache.hadoop.service.AbstractService;
|
||||||
|
@ -37,8 +37,8 @@ import org.apache.hadoop.yarn.api.resource.PlacementConstraint;
|
||||||
public abstract class PlacementConstraintManagerService extends AbstractService
|
public abstract class PlacementConstraintManagerService extends AbstractService
|
||||||
implements PlacementConstraintManager {
|
implements PlacementConstraintManager {
|
||||||
|
|
||||||
protected static final Log LOG =
|
protected static final Logger LOG =
|
||||||
LogFactory.getLog(PlacementConstraintManagerService.class);
|
LoggerFactory.getLogger(PlacementConstraintManagerService.class);
|
||||||
|
|
||||||
private PlacementConstraintManager placementConstraintManager = null;
|
private PlacementConstraintManager placementConstraintManager = null;
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ package org.apache.hadoop.yarn.server.resourcemanager.scheduler.constraint;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Public;
|
import org.apache.hadoop.classification.InterfaceAudience.Public;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.yarn.api.records.*;
|
import org.apache.hadoop.yarn.api.records.*;
|
||||||
|
@ -48,8 +48,8 @@ import static org.apache.hadoop.yarn.api.resource.PlacementConstraints.NODE_PART
|
||||||
@Public
|
@Public
|
||||||
@Unstable
|
@Unstable
|
||||||
public final class PlacementConstraintsUtil {
|
public final class PlacementConstraintsUtil {
|
||||||
private static final Log LOG =
|
private static final Logger LOG =
|
||||||
LogFactory.getLog(PlacementConstraintsUtil.class);
|
LoggerFactory.getLogger(PlacementConstraintsUtil.class);
|
||||||
|
|
||||||
// Suppresses default constructor, ensuring non-instantiability.
|
// Suppresses default constructor, ensuring non-instantiability.
|
||||||
private PlacementConstraintsUtil() {
|
private PlacementConstraintsUtil() {
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||||
import org.apache.hadoop.yarn.api.records.ResourceOption;
|
import org.apache.hadoop.yarn.api.records.ResourceOption;
|
||||||
import org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus;
|
import org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus;
|
||||||
|
@ -47,7 +47,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
*/
|
*/
|
||||||
public class NodeQueueLoadMonitor implements ClusterMonitor {
|
public class NodeQueueLoadMonitor implements ClusterMonitor {
|
||||||
|
|
||||||
final static Log LOG = LogFactory.getLog(NodeQueueLoadMonitor.class);
|
final static Logger LOG = LoggerFactory.
|
||||||
|
getLogger(NodeQueueLoadMonitor.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The comparator used to specify the metric against which the load
|
* The comparator used to specify the metric against which the load
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Public;
|
import org.apache.hadoop.classification.InterfaceAudience.Public;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -59,7 +59,7 @@ import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.alloc
|
||||||
@Unstable
|
@Unstable
|
||||||
public class AllocationFileLoaderService extends AbstractService {
|
public class AllocationFileLoaderService extends AbstractService {
|
||||||
|
|
||||||
public static final Log LOG = LogFactory.getLog(
|
public static final Logger LOG = LoggerFactory.getLogger(
|
||||||
AllocationFileLoaderService.class.getName());
|
AllocationFileLoaderService.class.getName());
|
||||||
|
|
||||||
/** Time to wait between checks of the allocation file */
|
/** Time to wait between checks of the allocation file */
|
||||||
|
|
|
@ -28,8 +28,8 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
|
@ -70,7 +70,8 @@ import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
public class FSAppAttempt extends SchedulerApplicationAttempt
|
public class FSAppAttempt extends SchedulerApplicationAttempt
|
||||||
implements Schedulable {
|
implements Schedulable {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(FSAppAttempt.class);
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(FSAppAttempt.class);
|
||||||
private static final DefaultResourceCalculator RESOURCE_CALCULATOR
|
private static final DefaultResourceCalculator RESOURCE_CALCULATOR
|
||||||
= new DefaultResourceCalculator();
|
= new DefaultResourceCalculator();
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
|
@ -51,7 +51,8 @@ import static org.apache.hadoop.yarn.util.resource.Resources.none;
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public class FSLeafQueue extends FSQueue {
|
public class FSLeafQueue extends FSQueue {
|
||||||
private static final Log LOG = LogFactory.getLog(FSLeafQueue.class.getName());
|
private static final Logger LOG = LoggerFactory.
|
||||||
|
getLogger(FSLeafQueue.class.getName());
|
||||||
private static final List<FSQueue> EMPTY_LIST = Collections.emptyList();
|
private static final List<FSQueue> EMPTY_LIST = Collections.emptyList();
|
||||||
|
|
||||||
private FSContext context;
|
private FSContext context;
|
||||||
|
|
|
@ -27,8 +27,8 @@ import java.util.concurrent.locks.ReadWriteLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
|
@ -44,7 +44,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicat
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public class FSParentQueue extends FSQueue {
|
public class FSParentQueue extends FSQueue {
|
||||||
private static final Log LOG = LogFactory.getLog(
|
private static final Logger LOG = LoggerFactory.getLogger(
|
||||||
FSParentQueue.class.getName());
|
FSParentQueue.class.getName());
|
||||||
|
|
||||||
private final List<FSQueue> childQueues = new ArrayList<>();
|
private final List<FSQueue> childQueues = new ArrayList<>();
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair;
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerStatus;
|
import org.apache.hadoop.yarn.api.records.ContainerStatus;
|
||||||
import org.apache.hadoop.yarn.api.records.Resource;
|
import org.apache.hadoop.yarn.api.records.Resource;
|
||||||
|
@ -40,7 +40,8 @@ import java.util.concurrent.locks.Lock;
|
||||||
* Thread that handles FairScheduler preemption.
|
* Thread that handles FairScheduler preemption.
|
||||||
*/
|
*/
|
||||||
class FSPreemptionThread extends Thread {
|
class FSPreemptionThread extends Thread {
|
||||||
private static final Log LOG = LogFactory.getLog(FSPreemptionThread.class);
|
private static final Logger LOG = LoggerFactory.
|
||||||
|
getLogger(FSPreemptionThread.class);
|
||||||
protected final FSContext context;
|
protected final FSContext context;
|
||||||
private final FairScheduler scheduler;
|
private final FairScheduler scheduler;
|
||||||
private final long warnTimeBeforeKill;
|
private final long warnTimeBeforeKill;
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.ipc.Server;
|
import org.apache.hadoop.ipc.Server;
|
||||||
|
@ -51,7 +51,7 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public abstract class FSQueue implements Queue, Schedulable {
|
public abstract class FSQueue implements Queue, Schedulable {
|
||||||
private static final Log LOG = LogFactory.getLog(
|
private static final Logger LOG = LoggerFactory.getLogger(
|
||||||
FSQueue.class.getName());
|
FSQueue.class.getName());
|
||||||
|
|
||||||
private Resource fairShare = Resources.createResource(0, 0);
|
private Resource fairShare = Resources.createResource(0, 0);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue