YARN-179. Fix some unit test failures. (Contributed by Vinod Kumar Vavilapalli)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1401481 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Siddharth Seth 2012-10-23 21:06:36 +00:00
parent 382b565e8c
commit 88d326f0a4
6 changed files with 22 additions and 9 deletions

View File

@ -88,6 +88,8 @@ Release 2.0.3-alpha - Unreleased
YARN-140. Add capacity-scheduler-default.xml to provide a default set of configurations for the capacity scheduler. (ahmed via tucu) YARN-140. Add capacity-scheduler-default.xml to provide a default set of configurations for the capacity scheduler. (ahmed via tucu)
YARN-179. Fix some unit test failures. (Vinod Kumar Vavilapalli via sseth)
Release 2.0.2-alpha - 2012-09-07 Release 2.0.2-alpha - 2012-09-07
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -51,6 +51,12 @@
<artifactId>hadoop-yarn-server-resourcemanager</artifactId> <artifactId>hadoop-yarn-server-resourcemanager</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-yarn-server-resourcemanager</artifactId>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop</groupId> <groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-yarn-server-common</artifactId> <artifactId>hadoop-yarn-server-common</artifactId>

View File

@ -143,7 +143,7 @@ public class UnmanagedAMLauncher {
appName = cliParser.getOptionValue("appname", "UnmanagedAM"); appName = cliParser.getOptionValue("appname", "UnmanagedAM");
amPriority = Integer.parseInt(cliParser.getOptionValue("priority", "0")); amPriority = Integer.parseInt(cliParser.getOptionValue("priority", "0"));
amQueue = cliParser.getOptionValue("queue", ""); amQueue = cliParser.getOptionValue("queue", "default");
classpath = cliParser.getOptionValue("classpath", null); classpath = cliParser.getOptionValue("classpath", null);
amCmd = cliParser.getOptionValue("cmd"); amCmd = cliParser.getOptionValue("cmd");

View File

@ -141,6 +141,8 @@ public class TestUnmanagedAMLauncher {
String[] args = { String[] args = {
"--classpath", "--classpath",
classpath, classpath,
"--queue",
"default",
"--cmd", "--cmd",
javaHome javaHome
+ "/bin/java -Xmx512m " + "/bin/java -Xmx512m "

View File

@ -38,5 +38,12 @@
<artifactId>hadoop-yarn-server-resourcemanager</artifactId> <artifactId>hadoop-yarn-server-resourcemanager</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-yarn-server-resourcemanager</artifactId>
<scope>test</scope>
<type>test-jar</type>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -45,7 +45,6 @@ import org.apache.hadoop.yarn.api.records.QueueInfo;
import org.apache.hadoop.yarn.api.records.QueueUserACLInfo; import org.apache.hadoop.yarn.api.records.QueueUserACLInfo;
import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.yarn.api.records.ResourceRequest; import org.apache.hadoop.yarn.api.records.ResourceRequest;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider; import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
import org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger; import org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger;
import org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger.AuditConstants; import org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger.AuditConstants;
@ -111,21 +110,18 @@ implements ResourceScheduler, CapacitySchedulerContext, Configurable {
} }
}; };
@Override
public void setConf(Configuration conf) { public void setConf(Configuration conf) {
if (conf instanceof YarnConfiguration) { yarnConf = conf;
yarnConf = (YarnConfiguration) conf;
} else {
throw new IllegalArgumentException("Can only configure with " +
"YarnConfiguration");
}
} }
@Override
public Configuration getConf() { public Configuration getConf() {
return yarnConf; return yarnConf;
} }
private CapacitySchedulerConfiguration conf; private CapacitySchedulerConfiguration conf;
private YarnConfiguration yarnConf; private Configuration yarnConf;
private RMContext rmContext; private RMContext rmContext;
private Map<String, CSQueue> queues = new ConcurrentHashMap<String, CSQueue>(); private Map<String, CSQueue> queues = new ConcurrentHashMap<String, CSQueue>();