tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-1873. TestTezAMRMClient fails due to host resolution timing out. (hitesh)
Date Sat, 20 Dec 2014 17:56:43 GMT
Repository: tez
Updated Branches:
  refs/heads/master 5509fdc4e -> 6276929d3


TEZ-1873. TestTezAMRMClient fails due to host resolution timing out. (hitesh)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/6276929d
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/6276929d
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/6276929d

Branch: refs/heads/master
Commit: 6276929d3efa2b8a9e7bf2460a786df389d10309
Parents: 5509fdc
Author: Hitesh Shah <hitesh@apache.org>
Authored: Sat Dec 20 09:56:28 2014 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Sat Dec 20 09:56:28 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt                                               |  1 +
 .../java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java |  7 ++++++-
 .../org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java  | 10 +++-------
 .../org/apache/tez/dag/app/dag/impl/TestVertexImpl.java   |  9 +++++++--
 .../org/apache/tez/dag/app/rm/TestContainerReuse.java     |  6 +++---
 .../java/org/apache/tez/dag/app/rm/TestTaskScheduler.java |  6 +++---
 .../java/org/apache/tez/dag/app/rm/TestTezAMRMClient.java |  7 +++++++
 .../org/apache/hadoop/mapred/split/TestGroupedSplits.java |  6 +++---
 8 files changed, 33 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/6276929d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f254a23..b0b13de 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.6.0: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-1873. TestTezAMRMClient fails due to host resolution timing out.
   TEZ-1881. Setup initial test-patch script for TEZ-1313.
   TEZ-1864. move initialization code dependent on config params to App.ready.
   TEZ-1870. Time displayed in the UI is in GMT.

http://git-wip-us.apache.org/repos/asf/tez/blob/6276929d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
index 8880e73..7c4d715 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
@@ -121,6 +121,7 @@ import org.apache.tez.runtime.api.impl.TezEvent;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -717,9 +718,13 @@ public class TestDAGImpl {
     return dag;
   }
 
+  @BeforeClass
+  public static void beforeClass() {
+    MockDNSToSwitchMapping.initializeMockRackResolver();
+  }
+
   @Before
   public void setup() {
-    MockDNSToSwitchMapping.initializeMockRackResolver();
     conf = new Configuration();
     conf.setBoolean(TezConfiguration.TEZ_AM_CONTAINER_REUSE_ENABLED, false);
     appAttemptId = ApplicationAttemptId.newInstance(

http://git-wip-us.apache.org/repos/asf/tez/blob/6276929d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
index 74b7d94..5ab1158 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
@@ -30,7 +30,6 @@ import static org.mockito.Mockito.when;
 
 import java.io.IOException;
 import java.net.InetSocketAddress;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -40,12 +39,10 @@ import java.util.Set;
 import java.util.TreeSet;
 
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.RawLocalFileSystem;
-import org.apache.hadoop.net.DNSToSwitchMapping;
 import org.apache.hadoop.security.Credentials;
 import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
@@ -57,7 +54,6 @@ import org.apache.hadoop.yarn.api.records.Resource;
 import org.apache.hadoop.yarn.event.Event;
 import org.apache.hadoop.yarn.event.EventHandler;
 import org.apache.hadoop.yarn.util.Clock;
-import org.apache.hadoop.yarn.util.RackResolver;
 import org.apache.hadoop.yarn.util.SystemClock;
 import org.apache.tez.common.MockDNSToSwitchMapping;
 import org.apache.tez.dag.api.TaskLocationHint;
@@ -103,7 +99,7 @@ import org.apache.tez.runtime.api.impl.EventMetaData;
 import org.apache.tez.runtime.api.impl.TaskSpec;
 import org.apache.tez.runtime.api.impl.TezEvent;
 import org.junit.Assert;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 
@@ -117,8 +113,8 @@ public class TestTaskAttempt {
     }
   }
 
-  @Before
-  public void setup() {
+  @BeforeClass
+  public static void setup() {
     MockDNSToSwitchMapping.initializeMockRackResolver();
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/6276929d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
index 6b501e4..645708e 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
@@ -173,6 +173,7 @@ import org.apache.tez.runtime.api.impl.TezEvent;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.mockito.internal.util.collections.Sets;
@@ -2201,10 +2202,14 @@ public class TestVertexImpl {
     dispatcher.init(conf);
     dispatcher.start();
   }
-  
+
+  @BeforeClass
+  public static void beforeClass() {
+    MockDNSToSwitchMapping.initializeMockRackResolver();
+  }
+
   @Before
   public void setup() throws AMUserCodeException {
-    MockDNSToSwitchMapping.initializeMockRackResolver();
     useCustomInitializer = false;
     customInitializer = null;
     setupPreDagCreation();

http://git-wip-us.apache.org/repos/asf/tez/blob/6276929d/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestContainerReuse.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestContainerReuse.java b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestContainerReuse.java
index c04ac77..311e762 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestContainerReuse.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestContainerReuse.java
@@ -90,7 +90,7 @@ import org.apache.tez.dag.utils.TaskSpecificLaunchCmdOption;
 import org.apache.tez.runtime.api.impl.InputSpec;
 import org.apache.tez.runtime.api.impl.OutputSpec;
 import org.apache.tez.runtime.api.impl.TaskSpec;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
@@ -102,8 +102,8 @@ import com.google.common.collect.Sets;
 public class TestContainerReuse {
   private static final Log LOG = LogFactory.getLog(TestContainerReuse.class);
 
-  @Before
-  public void setup() {
+  @BeforeClass
+  public static void setup() {
     MockDNSToSwitchMapping.initializeMockRackResolver();
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/6276929d/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java
index 73713de..6899a6c 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java
@@ -75,7 +75,7 @@ import org.apache.tez.dag.app.rm.TestTaskSchedulerHelpers.TaskSchedulerWithDrain
 import org.apache.tez.dag.app.rm.TestTaskSchedulerHelpers.AlwaysMatchesContainerMatcher;
 import org.apache.tez.dag.app.rm.TestTaskSchedulerHelpers.PreemptionMatcher;
 import org.junit.Assert;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
@@ -90,8 +90,8 @@ public class TestTaskScheduler {
   RecordFactory recordFactory =
       RecordFactoryProvider.getRecordFactory(null);
 
-  @Before
-  public void setup() {
+  @BeforeClass
+  public static void beforeClass() {
     MockDNSToSwitchMapping.initializeMockRackResolver();
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/6276929d/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTezAMRMClient.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTezAMRMClient.java b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTezAMRMClient.java
index 4ee4647..d01ebbf 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTezAMRMClient.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTezAMRMClient.java
@@ -25,9 +25,11 @@ import org.apache.hadoop.yarn.client.api.AMRMClient;
 import org.apache.hadoop.yarn.client.api.async.AMRMClientAsync;
 import org.apache.hadoop.yarn.client.api.impl.AMRMClientImpl;
 import org.apache.hadoop.yarn.util.RackResolver;
+import org.apache.tez.common.MockDNSToSwitchMapping;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 import java.util.Collection;
@@ -39,6 +41,11 @@ public class TestTezAMRMClient {
 
   private TezAMRMClientAsync amrmClient;
 
+  @BeforeClass
+  public static void beforeClass() {
+    MockDNSToSwitchMapping.initializeMockRackResolver();
+  }
+
   @Before
   public void setup() {
     amrmClient = new TezAMRMClientAsync(new AMRMClientImpl(),

http://git-wip-us.apache.org/repos/asf/tez/blob/6276929d/tez-mapreduce/src/test/java/org/apache/hadoop/mapred/split/TestGroupedSplits.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/hadoop/mapred/split/TestGroupedSplits.java
b/tez-mapreduce/src/test/java/org/apache/hadoop/mapred/split/TestGroupedSplits.java
index 90fe596..42b5c9f 100644
--- a/tez-mapreduce/src/test/java/org/apache/hadoop/mapred/split/TestGroupedSplits.java
+++ b/tez-mapreduce/src/test/java/org/apache/hadoop/mapred/split/TestGroupedSplits.java
@@ -51,7 +51,7 @@ import org.apache.hadoop.mapreduce.split.TezMapReduceSplitsGrouper;
 import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.tez.common.MockDNSToSwitchMapping;
 import org.junit.Assert;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 import com.google.common.collect.Sets;
@@ -224,8 +224,8 @@ public class TestGroupedSplits {
     return result;
   }
 
-  @Before
-  public void setup() {
+  @BeforeClass
+  public static void beforeClass() {
     MockDNSToSwitchMapping.initializeMockRackResolver();
   }
 


Mime
View raw message