hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jia...@apache.org
Subject [15/50] [abbrv] hadoop git commit: Rebase to latest trunk, fix conflicts and pom.xml
Date Wed, 21 Jun 2017 18:33:37 GMT
Rebase to latest trunk, fix conflicts and pom.xml


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/24418ab7
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/24418ab7
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/24418ab7

Branch: refs/heads/yarn-native-services
Commit: 24418ab72e66c193ae5f9e5b0d052773a0e5fcf2
Parents: 4c82f36
Author: Jian He <jianhe@apache.org>
Authored: Tue Apr 18 14:04:35 2017 +0800
Committer: Jian He <jianhe@apache.org>
Committed: Wed Jun 21 11:32:53 2017 -0700

----------------------------------------------------------------------
 .../hadoop-yarn-slider-core/pom.xml                   |  5 +++++
 .../slider/server/appmaster/SliderAppMaster.java      |  7 ++++---
 .../timelineservice/ServiceTimelinePublisher.java     |  5 +++--
 .../timelineservice/TestServiceTimelinePublisher.java | 14 +++++++++++---
 4 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/24418ab7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/pom.xml
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/pom.xml
index ee77ecb..16a2bb2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/pom.xml
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/pom.xml
@@ -184,6 +184,11 @@
 
     <dependency>
       <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs-client</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-yarn-client</artifactId>
       <scope>compile</scope>
     </dependency>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/24418ab7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
index eca07e6..4aeffa6 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
@@ -64,6 +64,7 @@ import org.apache.hadoop.yarn.api.records.Priority;
 import org.apache.hadoop.yarn.api.records.Resource;
 import org.apache.hadoop.yarn.client.api.AMRMClient;
 import org.apache.hadoop.yarn.client.api.TimelineClient;
+import org.apache.hadoop.yarn.client.api.TimelineV2Client;
 import org.apache.hadoop.yarn.client.api.YarnClient;
 import org.apache.hadoop.yarn.client.api.async.AMRMClientAsync;
 import org.apache.hadoop.yarn.client.api.async.NMClientAsync;
@@ -240,7 +241,7 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
   private AMRMClientAsync asyncRMClient;
 
   /** Handle to communicate with the timeline service */
-  private TimelineClient timelineClient;
+  private TimelineV2Client timelineClient;
 
   private boolean timelineServiceEnabled = false;
 
@@ -658,8 +659,8 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
       deployChildService(asyncRMClient);
 
       if (timelineServiceEnabled) {
-        timelineClient = TimelineClient.createTimelineClient(appid);
-        asyncRMClient.registerTimelineClient(timelineClient);
+        timelineClient = TimelineV2Client.createTimelineClient(appid);
+        asyncRMClient.registerTimelineV2Client(timelineClient);
         timelineClient.init(getConfig());
         timelineClient.start();
         log.info("Timeline client started.");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/24418ab7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/timelineservice/ServiceTimelinePublisher.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/timelineservice/ServiceTimelinePublisher.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/timelineservice/ServiceTimelinePublisher.java
index 3ff4200..0e04af5 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/timelineservice/ServiceTimelinePublisher.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/timelineservice/ServiceTimelinePublisher.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity;
 import org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent;
 import org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric;
 import org.apache.hadoop.yarn.client.api.TimelineClient;
+import org.apache.hadoop.yarn.client.api.TimelineV2Client;
 import org.apache.hadoop.yarn.util.timeline.TimelineUtils;
 import org.apache.slider.api.resource.Application;
 import org.apache.slider.api.resource.Component;
@@ -53,7 +54,7 @@ public class ServiceTimelinePublisher extends CompositeService {
   // Number of bytes of config which can be published in one shot to ATSv2.
   public static final int ATS_CONFIG_PUBLISH_SIZE_BYTES = 10 * 1024;
 
-  private TimelineClient timelineClient;
+  private TimelineV2Client timelineClient;
 
   private volatile boolean stopped = false;
 
@@ -69,7 +70,7 @@ public class ServiceTimelinePublisher extends CompositeService {
     return stopped;
   }
 
-  public ServiceTimelinePublisher(TimelineClient client) {
+  public ServiceTimelinePublisher(TimelineV2Client client) {
     super(ServiceTimelinePublisher.class.getName());
     timelineClient = client;
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/24418ab7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/server/appmaster/timelineservice/TestServiceTimelinePublisher.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/server/appmaster/timelineservice/TestServiceTimelinePublisher.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/server/appmaster/timelineservice/TestServiceTimelinePublisher.java
index 1209aef..29eb5ca 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/server/appmaster/timelineservice/TestServiceTimelinePublisher.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/server/appmaster/timelineservice/TestServiceTimelinePublisher.java
@@ -31,11 +31,14 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
 import org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity;
 import org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier;
 import org.apache.hadoop.yarn.client.api.TimelineClient;
+import org.apache.hadoop.yarn.client.api.TimelineV2Client;
 import org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl;
+import org.apache.hadoop.yarn.client.api.impl.TimelineV2ClientImpl;
 import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.slider.api.resource.Application;
 import org.apache.slider.api.resource.ApplicationState;
@@ -55,7 +58,7 @@ import org.junit.Test;
  * Test class for ServiceTimelinePublisher.
  */
 public class TestServiceTimelinePublisher {
-  private TimelineClient timelineClient;
+  private TimelineV2Client timelineClient;
   private Configuration config;
   private ServiceTimelinePublisher serviceTimelinePublisher;
   private static String SERVICE_NAME = "HBASE";
@@ -74,7 +77,8 @@ public class TestServiceTimelinePublisher {
   @Before
   public void setUp() throws Exception {
     config = new Configuration();
-    timelineClient = new DummyTimelineClient();
+    timelineClient =
+        new DummyTimelineClient(ApplicationId.fromString(SERVICEID));
     serviceTimelinePublisher = new ServiceTimelinePublisher(timelineClient);
     timelineClient.init(config);
     serviceTimelinePublisher.init(config);
@@ -249,10 +253,14 @@ public class TestServiceTimelinePublisher {
     System.out.println(application.getConfiguration());
   }
 
-  protected static class DummyTimelineClient extends TimelineClientImpl {
+  protected static class DummyTimelineClient extends TimelineV2ClientImpl {
     private Map<Identifier, TimelineEntity> lastPublishedEntities =
         new HashMap<>();
 
+    public DummyTimelineClient(ApplicationId appId) {
+      super(appId);
+    }
+
     @Override
     public void putEntitiesAsync(TimelineEntity... entities)
         throws IOException, YarnException {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message