TEZ-2168. Fix application dependencies on mutually exclusive artifacts: tez-yarn...
authorHitesh Shah <hitesh@apache.org>
Wed, 11 Mar 2015 04:38:32 +0000 (21:38 -0700)
committerHitesh Shah <hitesh@apache.org>
Wed, 11 Mar 2015 04:38:32 +0000 (21:38 -0700)
pom.xml
tez-plugins/pom.xml
tez-plugins/tez-yarn-timeline-history-with-acls/pom.xml
tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestATSHistoryWithMiniCluster.java

diff --git a/pom.xml b/pom.xml
index 3396587..c9a9ad6 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <version>${project.version}</version>
       </dependency>
       <dependency>
+        <groupId>org.apache.tez</groupId>
+        <artifactId>tez-yarn-timeline-history</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.tez</groupId>
+        <artifactId>tez-yarn-timeline-history</artifactId>
+        <version>${project.version}</version>
+        <type>test-jar</type>
+      </dependency>
+      <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <version>1.2.17</version>
index fea261e..1080f2f 100644 (file)
@@ -44,6 +44,7 @@
         </property>
       </activation>
       <modules>
+        <module>tez-yarn-timeline-history</module>
         <module>tez-yarn-timeline-history-with-acls</module>
       </modules>
     </profile>
index 54ba479..90c425e 100644 (file)
     </dependency>
     <dependency>
       <groupId>org.apache.tez</groupId>
+      <artifactId>tez-yarn-timeline-history</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tez</groupId>
+      <artifactId>tez-yarn-timeline-history</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tez</groupId>
       <artifactId>tez-tests</artifactId>
       <scope>test</scope>
     </dependency>
index 9c4f721..45bbcc7 100644 (file)
@@ -131,9 +131,8 @@ public class TestATSHistoryWithMiniCluster {
   }
 
   @Test (timeout=50000)
-  public void testSimpleAMACls() throws Exception {
+  public void testDisabledACls() throws Exception {
     TezClient tezSession = null;
-    ApplicationId applicationId;
     try {
       SleepProcessorConfig spConf = new SleepProcessorConfig(1);
 
@@ -155,54 +154,6 @@ public class TestATSHistoryWithMiniCluster {
       tezSession = TezClient.create("TezSleepProcessor", tezConf, true);
       tezSession.start();
 
-      applicationId = tezSession.getAppMasterApplicationId();
-
-      DAGClient dagClient = tezSession.submitDAG(dag);
-
-      DAGStatus dagStatus = dagClient.getDAGStatus(null);
-      while (!dagStatus.isCompleted()) {
-        LOG.info("Waiting for job to complete. Sleeping for 500ms." + " Current state: "
-            + dagStatus.getState());
-        Thread.sleep(500l);
-        dagStatus = dagClient.getDAGStatus(null);
-      }
-      Assert.assertEquals(DAGStatus.State.SUCCEEDED, dagStatus.getState());
-    } finally {
-      if (tezSession != null) {
-        tezSession.stop();
-      }
-    }
-
-//    verifyEntityExistence(applicationId);
-  }
-
-  @Test (timeout=50000)
-  public void testDAGACls() throws Exception {
-    TezClient tezSession = null;
-    ApplicationId applicationId;
-    try {
-      SleepProcessorConfig spConf = new SleepProcessorConfig(1);
-
-      DAG dag = DAG.create("TezSleepProcessor");
-      Vertex vertex = Vertex.create("SleepVertex", ProcessorDescriptor.create(
-              SleepProcessor.class.getName()).setUserPayload(spConf.toUserPayload()), 1,
-          Resource.newInstance(256, 1));
-      dag.addVertex(vertex);
-
-      TezConfiguration tezConf = new TezConfiguration(mrrTezCluster.getConfig());
-      tezConf.setBoolean(TezConfiguration.TEZ_AM_ALLOW_DISABLED_TIMELINE_DOMAINS, true);
-      tezConf.set(TezConfiguration.TEZ_HISTORY_LOGGING_SERVICE_CLASS,
-          ATSHistoryLoggingService.class.getName());
-      Path remoteStagingDir = remoteFs.makeQualified(new Path("/tmp", String.valueOf(random
-          .nextInt(100000))));
-      remoteFs.mkdirs(remoteStagingDir);
-      tezConf.set(TezConfiguration.TEZ_AM_STAGING_DIR, remoteStagingDir.toString());
-
-      tezSession = TezClient.create("TezSleepProcessor", tezConf, true);
-      tezSession.start();
-
-      applicationId = tezSession.getAppMasterApplicationId();
-
       DAGClient dagClient = tezSession.submitDAG(dag);
 
       DAGStatus dagStatus = dagClient.getDAGStatus(null);
@@ -218,25 +169,6 @@ public class TestATSHistoryWithMiniCluster {
         tezSession.stop();
       }
     }
-//    verifyEntityExistence(applicationId);
   }
 
-  private void verifyEntityExistence(ApplicationId applicationId) {
-    Assert.assertNotNull(timelineAddress);
-
-    String appUrl = "http://" + timelineAddress + "/ws/v1/timeline/TEZ_APPLICATION/"
-        + "tez_" + applicationId.toString()  + "?fields=otherinfo";
-    LOG.info("Getting timeline entity for tez application: " + appUrl);
-    TimelineEntity appEntity = getTimelineData(appUrl, TimelineEntity.class);
-    Assert.assertNotNull(appEntity);
-
-    TezDAGID tezDAGID = TezDAGID.getInstance(applicationId, 1);
-    String dagUrl = "http://" + timelineAddress + "/ws/v1/timeline/TEZ_DAG_ID/"
-        + tezDAGID.toString() + "?fields=otherinfo";
-    LOG.info("Getting timeline entity for tez dag: " + dagUrl);
-    TimelineEntity dagEntity = getTimelineData(dagUrl, TimelineEntity.class);
-    Assert.assertNotNull(dagEntity);
-  }
-
-
 }