hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1541620 - in /hadoop/common/branches/HDFS-2832: ./ hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobCreator.java hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestSleepJob.java
Date Wed, 13 Nov 2013 17:15:37 GMT
Author: arp
Date: Wed Nov 13 17:15:36 2013
New Revision: 1541620

URL: http://svn.apache.org/r1541620
Log:
Merging r1541342 through r1541617 from trunk to branch HDFS-2832

Modified:
    hadoop/common/branches/HDFS-2832/   (props changed)
    hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobCreator.java
    hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestSleepJob.java

Propchange: hadoop/common/branches/HDFS-2832/
------------------------------------------------------------------------------
  Merged /hadoop/common/trunk:r1541342-1541617

Modified: hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobCreator.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobCreator.java?rev=1541620&r1=1541619&r2=1541620&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobCreator.java
(original)
+++ hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobCreator.java
Wed Nov 13 17:15:36 2013
@@ -63,8 +63,8 @@ public enum JobCreator {
       Configuration conf, long submissionMillis, JobStory jobdesc, Path outRoot,
       UserGroupInformation ugi, int seq) throws IOException {
       int numLocations = conf.getInt(SLEEPJOB_RANDOM_LOCATIONS, 0);
-      if (numLocations < 0) numLocations=0;
-      if ((numLocations > 0) && (hosts == null)) {
+      if (numLocations < 0) numLocations = 0;
+      if (hosts == null) {
         final JobClient client = new JobClient(new JobConf(conf));
         ClusterStatus stat = client.getClusterStatus(true);
         final int nTrackers = stat.getTaskTrackers();

Modified: hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestSleepJob.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestSleepJob.java?rev=1541620&r1=1541619&r2=1541620&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestSleepJob.java
(original)
+++ hadoop/common/branches/HDFS-2832/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestSleepJob.java
Wed Nov 13 17:15:36 2013
@@ -58,17 +58,6 @@ public class TestSleepJob extends Common
   }
 
 
-  /*
-  * test RandomLocation
-  */
-  @Test
-  public void testRandomLocation() throws Exception {
-    UserGroupInformation ugi = UserGroupInformation.getLoginUser();
-
-    testRandomLocation(1, 10, ugi);
-    testRandomLocation(2, 10, ugi);
-  }
-
   @Test
   public void testMapTasksOnlySleepJobs() throws Exception {
     Configuration configuration = GridmixTestUtils.mrvl.getConfig();
@@ -90,6 +79,17 @@ public class TestSleepJob extends Common
     assertEquals(6, seq);
   }
 
+  /*
+  * test RandomLocation
+  */
+  @Test
+  public void testRandomLocation() throws Exception {
+    UserGroupInformation ugi = UserGroupInformation.getLoginUser();
+
+    testRandomLocation(1, 10, ugi);
+    testRandomLocation(2, 10, ugi);
+  }
+
   // test Serial submit
   @Test
   public void testSerialSubmit() throws Exception {



Mime
View raw message