ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-13091 Upgrade AMS Phoenix + HBase to HDP-2.3.0.0 (dsen)
Date Wed, 16 Sep 2015 12:37:40 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 793c2affa -> 827e4486f


AMBARI-13091 Upgrade AMS Phoenix + HBase to HDP-2.3.0.0 (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/827e4486
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/827e4486
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/827e4486

Branch: refs/heads/branch-2.1
Commit: 827e4486f955cd05991562f22d4fccce0367a50e
Parents: 793c2af
Author: Dmytro Sen <dsen@apache.org>
Authored: Wed Sep 16 15:35:52 2015 +0300
Committer: Dmytro Sen <dsen@apache.org>
Committed: Wed Sep 16 15:37:28 2015 +0300

----------------------------------------------------------------------
 .../ambari-metrics-timelineservice/pom.xml      |   6 +-
 .../ApplicationHistoryClientService.java        | 164 +++++++++----------
 .../ApplicationHistoryManager.java              | 130 ++++++++++++++-
 .../ApplicationHistoryManagerImpl.java          |  10 +-
 .../ApplicationHistoryServer.java               |   3 +-
 .../webapp/AHSWebApp.java                       |  15 +-
 .../webapp/AHSWebServices.java                  |   6 +-
 .../timeline/AbstractMiniHBaseClusterTest.java  |   2 +-
 .../webapp/TestAHSWebApp.java                   |  84 ++++++----
 .../webapp/TestAHSWebServices.java              |  15 +-
 ambari-metrics/pom.xml                          |   8 +-
 .../AMBARI_METRICS/0.1.0/metrics.json           |   4 +-
 12 files changed, 291 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/pom.xml b/ambari-metrics/ambari-metrics-timelineservice/pom.xml
index ae6d582..0d9f35d 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/pom.xml
+++ b/ambari-metrics/ambari-metrics-timelineservice/pom.xml
@@ -34,9 +34,9 @@
     <!-- Needed for generating FindBugs warnings using parent pom -->
     <!--<yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>-->
     <protobuf.version>2.5.0</protobuf.version>
-    <hadoop.version>(2.6.0.2.2.0.0, 2.6.0.2.2.1.0)</hadoop.version>
-    <phoenix.version>4.2.0.2.2.1.0-2340</phoenix.version>
-    <hbase.version>0.98.4.2.2.0.0-2041-hadoop2</hbase.version>
+    <hadoop.version>2.7.1.2.3.0.0-2557</hadoop.version>
+    <phoenix.version>4.4.0.2.3.0.0-2557</phoenix.version>
+    <hbase.version>1.1.1.2.3.0.0-2557</hbase.version>
   </properties>
 
   <build>

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryClientService.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryClientService.java
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryClientService.java
index a12e373..08beb5d 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryClientService.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryClientService.java
@@ -60,11 +60,11 @@ import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.hadoop.yarn.ipc.YarnRPC;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricConfiguration;
 
-public class ApplicationHistoryClientService extends AbstractService {
+public class ApplicationHistoryClientService extends AbstractService implements
+  ApplicationHistoryProtocol {
   private static final Log LOG = LogFactory
     .getLog(ApplicationHistoryClientService.class);
   private ApplicationHistoryManager history;
-  private ApplicationHistoryProtocol protocolHandler;
   private Server server;
   private InetSocketAddress bindAddress;
   private TimelineMetricConfiguration metricConfiguration;
@@ -72,7 +72,6 @@ public class ApplicationHistoryClientService extends AbstractService {
   public ApplicationHistoryClientService(ApplicationHistoryManager history) {
     super("ApplicationHistoryClientService");
     this.history = history;
-    this.protocolHandler = new ApplicationHSClientProtocolHandler();
   }
 
   public ApplicationHistoryClientService(ApplicationHistoryManager history,
@@ -89,7 +88,7 @@ public class ApplicationHistoryClientService extends AbstractService {
         YarnConfiguration.DEFAULT_TIMELINE_SERVICE_PORT);
 
     server =
-        rpc.getServer(ApplicationHistoryProtocol.class, protocolHandler,
+        rpc.getServer(ApplicationHistoryProtocol.class, this,
           address, conf, null, metricConfiguration.getTimelineMetricsServiceHandlerThreadCount());
 
     server.start();
@@ -112,7 +111,7 @@ public class ApplicationHistoryClientService extends AbstractService {
 
   @Private
   public ApplicationHistoryProtocol getClientHandler() {
-    return this.protocolHandler;
+    return this;
   }
 
   @Private
@@ -120,98 +119,97 @@ public class ApplicationHistoryClientService extends AbstractService
{
     return this.bindAddress;
   }
 
-  private class ApplicationHSClientProtocolHandler implements
-      ApplicationHistoryProtocol {
 
-    @Override
-    public CancelDelegationTokenResponse cancelDelegationToken(
-        CancelDelegationTokenRequest request) throws YarnException, IOException {
-      // TODO Auto-generated method stub
-      return null;
-    }
 
-    @Override
-    public GetApplicationAttemptReportResponse getApplicationAttemptReport(
-        GetApplicationAttemptReportRequest request) throws YarnException,
-        IOException {
-      try {
-        GetApplicationAttemptReportResponse response =
-            GetApplicationAttemptReportResponse.newInstance(history
-              .getApplicationAttempt(request.getApplicationAttemptId()));
-        return response;
-      } catch (IOException e) {
-        throw new ApplicationAttemptNotFoundException(e.getMessage());
-      }
-    }
+  @Override
+  public CancelDelegationTokenResponse cancelDelegationToken(
+    CancelDelegationTokenRequest request) throws YarnException, IOException {
+    // TODO Auto-generated method stub
+    return null;
+  }
 
-    @Override
-    public GetApplicationAttemptsResponse getApplicationAttempts(
-        GetApplicationAttemptsRequest request) throws YarnException,
-        IOException {
-      GetApplicationAttemptsResponse response =
-          GetApplicationAttemptsResponse
-            .newInstance(new ArrayList<ApplicationAttemptReport>(history
-              .getApplicationAttempts(request.getApplicationId()).values()));
+  @Override
+  public GetApplicationAttemptReportResponse getApplicationAttemptReport(
+    GetApplicationAttemptReportRequest request) throws YarnException,
+    IOException {
+    try {
+      GetApplicationAttemptReportResponse response =
+        GetApplicationAttemptReportResponse.newInstance(history
+          .getApplicationAttempt(request.getApplicationAttemptId()));
       return response;
+    } catch (IOException e) {
+      throw new ApplicationAttemptNotFoundException(e.getMessage());
     }
+  }
 
-    @Override
-    public GetApplicationReportResponse getApplicationReport(
-        GetApplicationReportRequest request) throws YarnException, IOException {
-      try {
-        ApplicationId applicationId = request.getApplicationId();
-        GetApplicationReportResponse response =
-            GetApplicationReportResponse.newInstance(history
-              .getApplication(applicationId));
-        return response;
-      } catch (IOException e) {
-        throw new ApplicationNotFoundException(e.getMessage());
-      }
-    }
+  @Override
+  public GetApplicationAttemptsResponse getApplicationAttempts(
+    GetApplicationAttemptsRequest request) throws YarnException,
+    IOException {
+    GetApplicationAttemptsResponse response =
+      GetApplicationAttemptsResponse
+        .newInstance(new ArrayList<ApplicationAttemptReport>(history
+          .getApplicationAttempts(request.getApplicationId()).values()));
+    return response;
+  }
 
-    @Override
-    public GetApplicationsResponse getApplications(
-        GetApplicationsRequest request) throws YarnException, IOException {
-      GetApplicationsResponse response =
-          GetApplicationsResponse.newInstance(new ArrayList<ApplicationReport>(
-            history.getAllApplications().values()));
+  @Override
+  public GetApplicationReportResponse getApplicationReport(
+    GetApplicationReportRequest request) throws YarnException, IOException {
+    try {
+      ApplicationId applicationId = request.getApplicationId();
+      GetApplicationReportResponse response =
+        GetApplicationReportResponse.newInstance(history
+          .getApplication(applicationId));
       return response;
+    } catch (IOException e) {
+      throw new ApplicationNotFoundException(e.getMessage());
     }
+  }
 
-    @Override
-    public GetContainerReportResponse getContainerReport(
-        GetContainerReportRequest request) throws YarnException, IOException {
-      try {
-        GetContainerReportResponse response =
-            GetContainerReportResponse.newInstance(history.getContainer(request
-              .getContainerId()));
-        return response;
-      } catch (IOException e) {
-        throw new ContainerNotFoundException(e.getMessage());
-      }
-    }
+  @Override
+  public GetApplicationsResponse getApplications(
+    GetApplicationsRequest request) throws YarnException, IOException {
+    GetApplicationsResponse response =
+      GetApplicationsResponse.newInstance(new ArrayList<ApplicationReport>(
+        history.getApplications(request.getLimit()).values()));
+    return response;
+  }
 
-    @Override
-    public GetContainersResponse getContainers(GetContainersRequest request)
-        throws YarnException, IOException {
-      GetContainersResponse response =
-          GetContainersResponse.newInstance(new ArrayList<ContainerReport>(
-            history.getContainers(request.getApplicationAttemptId()).values()));
+  @Override
+  public GetContainerReportResponse getContainerReport(
+    GetContainerReportRequest request) throws YarnException, IOException {
+    try {
+      GetContainerReportResponse response =
+        GetContainerReportResponse.newInstance(history.getContainer(request
+          .getContainerId()));
       return response;
+    } catch (IOException e) {
+      throw new ContainerNotFoundException(e.getMessage());
     }
+  }
 
-    @Override
-    public GetDelegationTokenResponse getDelegationToken(
-        GetDelegationTokenRequest request) throws YarnException, IOException {
-      // TODO Auto-generated method stub
-      return null;
-    }
+  @Override
+  public GetContainersResponse getContainers(GetContainersRequest request)
+    throws YarnException, IOException {
+    GetContainersResponse response =
+      GetContainersResponse.newInstance(new ArrayList<ContainerReport>(
+        history.getContainers(request.getApplicationAttemptId()).values()));
+    return response;
+  }
 
-    @Override
-    public RenewDelegationTokenResponse renewDelegationToken(
-        RenewDelegationTokenRequest request) throws YarnException, IOException {
-      // TODO Auto-generated method stub
-      return null;
-    }
+  @Override
+  public GetDelegationTokenResponse getDelegationToken(
+    GetDelegationTokenRequest request) throws YarnException, IOException {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  @Override
+  public RenewDelegationTokenResponse renewDelegationToken(
+    RenewDelegationTokenRequest request) throws YarnException, IOException {
+    // TODO Auto-generated method stub
+    return null;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManager.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManager.java
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManager.java
index db25d29..5ddb3af 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManager.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManager.java
@@ -18,11 +18,129 @@
 
 package org.apache.hadoop.yarn.server.applicationhistoryservice;
 
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
-import org.apache.hadoop.yarn.server.api.ApplicationContext;
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+import org.apache.hadoop.yarn.api.records.ApplicationAttemptReport;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.ContainerReport;
+import org.apache.hadoop.yarn.exceptions.YarnException;
+
+@Private
+@Unstable
+public interface ApplicationHistoryManager {
+  /**
+   * This method returns Application {@link ApplicationReport} for the specified
+   * {@link ApplicationId}.
+   *
+   * @param appId
+   *
+   * @return {@link ApplicationReport} for the ApplicationId.
+   * @throws YarnException
+   * @throws IOException
+   */
+  @Public
+  @Unstable
+  ApplicationReport getApplication(ApplicationId appId) throws YarnException,
+    IOException;
+
+  /**
+   * This method returns the given number of Application
+   * {@link ApplicationReport}s.
+   *
+   * @param appsNum
+   *
+   * @return map of {@link ApplicationId} to {@link ApplicationReport}s.
+   * @throws YarnException
+   * @throws IOException
+   */
+  @Public
+  @Unstable
+  Map<ApplicationId, ApplicationReport>
+  getApplications(long appsNum) throws YarnException,
+    IOException;
+
+  /**
+   * Application can have multiple application attempts
+   * {@link ApplicationAttemptReport}. This method returns the all
+   * {@link ApplicationAttemptReport}s for the Application.
+   *
+   * @param appId
+   *
+   * @return all {@link ApplicationAttemptReport}s for the Application.
+   * @throws YarnException
+   * @throws IOException
+   */
+  @Public
+  @Unstable
+  Map<ApplicationAttemptId, ApplicationAttemptReport> getApplicationAttempts(
+    ApplicationId appId) throws YarnException, IOException;
+
+  /**
+   * This method returns {@link ApplicationAttemptReport} for specified
+   * {@link ApplicationId}.
+   *
+   * @param appAttemptId
+   *          {@link ApplicationAttemptId}
+   * @return {@link ApplicationAttemptReport} for ApplicationAttemptId
+   * @throws YarnException
+   * @throws IOException
+   */
+  @Public
+  @Unstable
+  ApplicationAttemptReport getApplicationAttempt(
+    ApplicationAttemptId appAttemptId) throws YarnException, IOException;
+
+  /**
+   * This method returns {@link ContainerReport} for specified
+   * {@link ContainerId}.
+   *
+   * @param containerId
+   *          {@link ContainerId}
+   * @return {@link ContainerReport} for ContainerId
+   * @throws YarnException
+   * @throws IOException
+   */
+  @Public
+  @Unstable
+  ContainerReport getContainer(ContainerId containerId) throws YarnException,
+    IOException;
+
+  /**
+   * This method returns {@link ContainerReport} for specified
+   * {@link ApplicationAttemptId}.
+   *
+   * @param appAttemptId
+   *          {@link ApplicationAttemptId}
+   * @return {@link ContainerReport} for ApplicationAttemptId
+   * @throws YarnException
+   * @throws IOException
+   */
+  @Public
+  @Unstable
+  ContainerReport getAMContainer(ApplicationAttemptId appAttemptId)
+    throws YarnException, IOException;
+
+  /**
+   * This method returns Map of {@link ContainerId} to {@link ContainerReport}
+   * for specified {@link ApplicationAttemptId}.
+   *
+   * @param appAttemptId
+   *          {@link ApplicationAttemptId}
+   * @return Map of {@link ContainerId} to {@link ContainerReport} for
+   *         ApplicationAttemptId
+   * @throws YarnException
+   * @throws IOException
+   */
+  @Public
+  @Unstable
+  Map<ContainerId, ContainerReport> getContainers(
+    ApplicationAttemptId appAttemptId) throws YarnException, IOException;
 
-@InterfaceAudience.Public
-@InterfaceStability.Unstable
-public interface ApplicationHistoryManager extends ApplicationContext {
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerImpl.java
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerImpl.java
index 386a9f1..d699264 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerImpl.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerImpl.java
@@ -104,12 +104,12 @@ public class ApplicationHistoryManagerImpl extends AbstractService implements
   }
 
   @Override
-  public Map<ApplicationId, ApplicationReport> getAllApplications()
-      throws IOException {
+  public Map<ApplicationId, ApplicationReport> getApplications(long appsNum)
+    throws IOException {
     Map<ApplicationId, ApplicationHistoryData> histData =
-        historyStore.getAllApplications();
+      historyStore.getAllApplications();
     HashMap<ApplicationId, ApplicationReport> applicationsReport =
-        new HashMap<ApplicationId, ApplicationReport>();
+      new HashMap<ApplicationId, ApplicationReport>();
     for (Entry<ApplicationId, ApplicationHistoryData> entry : histData
       .entrySet()) {
       applicationsReport.put(entry.getKey(),
@@ -222,7 +222,7 @@ public class ApplicationHistoryManagerImpl extends AbstractService implements
       containerHistory.getStartTime(), containerHistory.getFinishTime(),
       containerHistory.getDiagnosticsInfo(), logUrl,
       containerHistory.getContainerExitStatus(),
-      containerHistory.getContainerState());
+      containerHistory.getContainerState(), serverHttpAddress);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java
index 24223a5..d79ca68 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java
@@ -180,7 +180,8 @@ public class ApplicationHistoryServer extends CompositeService {
             .withHttpSpnegoKeytabKey(
               YarnConfiguration.TIMELINE_SERVICE_KEYTAB)
             .at(bindAddress)
-            .start(new AHSWebApp(historyManager, timelineStore, timelineMetricStore));
+            .start(new AHSWebApp(timelineStore, timelineMetricStore,
+              ahsClientService));
     } catch (Exception e) {
       String msg = "AHSWebApp failed to start.";
       LOG.error(msg, e);

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebApp.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebApp.java
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebApp.java
index 8cff741..72facce 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebApp.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebApp.java
@@ -19,7 +19,8 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.webapp;
 
 import static org.apache.hadoop.yarn.util.StringHelper.pajoin;
 
-import org.apache.hadoop.yarn.server.api.ApplicationContext;
+import org.apache.hadoop.yarn.api.ApplicationBaseProtocol;
+import org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryClientService;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryManager;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricStore;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.timeline.TimelineStore;
@@ -30,15 +31,17 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams;
 
 public class AHSWebApp extends WebApp implements YarnWebParams {
 
-  private final ApplicationHistoryManager applicationHistoryManager;
   private final TimelineStore timelineStore;
   private final TimelineMetricStore timelineMetricStore;
+  private final ApplicationHistoryClientService historyClientService;
+
+  public AHSWebApp(TimelineStore timelineStore,
+    TimelineMetricStore timelineMetricStore,
+    ApplicationHistoryClientService historyClientService) {
 
-  public AHSWebApp(ApplicationHistoryManager applicationHistoryManager,
-      TimelineStore timelineStore, TimelineMetricStore timelineMetricStore) {
-    this.applicationHistoryManager = applicationHistoryManager;
     this.timelineStore = timelineStore;
     this.timelineMetricStore = timelineMetricStore;
+    this.historyClientService = historyClientService;
   }
 
   @Override
@@ -47,7 +50,7 @@ public class AHSWebApp extends WebApp implements YarnWebParams {
     bind(AHSWebServices.class);
     bind(TimelineWebServices.class);
     bind(GenericExceptionHandler.class);
-    bind(ApplicationContext.class).toInstance(applicationHistoryManager);
+    bind(ApplicationBaseProtocol.class).toInstance(historyClientService);
     bind(TimelineStore.class).toInstance(timelineStore);
     bind(TimelineMetricStore.class).toInstance(timelineMetricStore);
     route("/", AHSController.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebServices.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebServices.java
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebServices.java
index 2040f57..3064d2d 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebServices.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSWebServices.java
@@ -31,8 +31,8 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 
+import org.apache.hadoop.yarn.api.ApplicationBaseProtocol;
 import org.apache.hadoop.yarn.api.records.YarnApplicationState;
-import org.apache.hadoop.yarn.server.api.ApplicationContext;
 import org.apache.hadoop.yarn.server.webapp.WebServices;
 import org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo;
 import org.apache.hadoop.yarn.server.webapp.dao.AppAttemptsInfo;
@@ -50,8 +50,8 @@ import com.google.inject.Singleton;
 public class AHSWebServices extends WebServices {
 
   @Inject
-  public AHSWebServices(ApplicationContext appContext) {
-    super(appContext);
+  public AHSWebServices(ApplicationBaseProtocol appBaseProt) {
+    super(appBaseProt);
   }
 
   @GET

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/AbstractMiniHBaseClusterTest.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/AbstractMiniHBaseClusterTest.java
b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/AbstractMiniHBaseClusterTest.java
index 442dbf5..a4d53b3 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/AbstractMiniHBaseClusterTest.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/AbstractMiniHBaseClusterTest.java
@@ -72,7 +72,7 @@ public abstract class AbstractMiniHBaseClusterTest extends BaseTest {
 
   @AfterClass
   public static void doTeardown() throws Exception {
-    dropAllTables();
+    dropNonSystemTables();
   }
 
   @After

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebApp.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebApp.java
b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebApp.java
index 5f23f83..605358f 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebApp.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebApp.java
@@ -20,15 +20,16 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.webapp;
 
 import static org.apache.hadoop.yarn.webapp.Params.TITLE;
 import static org.mockito.Mockito.mock;
-import junit.framework.Assert;
 
+import org.junit.Assert;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.yarn.api.ApplicationBaseProtocol;
 import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.api.records.YarnApplicationState;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
-import org.apache.hadoop.yarn.server.api.ApplicationContext;
+import org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryClientService;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryManager;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryManagerImpl;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryStore;
@@ -42,8 +43,6 @@ import org.junit.Test;
 
 import com.google.inject.Injector;
 
-import javax.servlet.http.HttpServletResponse;
-
 public class TestAHSWebApp extends ApplicationHistoryStoreTestUtils {
 
   public void setApplicationHistoryStore(ApplicationHistoryStore store) {
@@ -59,102 +58,119 @@ public class TestAHSWebApp extends ApplicationHistoryStoreTestUtils
{
   public void testAppControllerIndex() throws Exception {
     ApplicationHistoryManager ahManager = mock(ApplicationHistoryManager.class);
     Injector injector =
-        WebAppTests.createMockInjector(ApplicationHistoryManager.class,
-          ahManager);
+      WebAppTests.createMockInjector(ApplicationHistoryManager.class,
+        ahManager);
     AHSController controller = injector.getInstance(AHSController.class);
     controller.index();
-    Assert.assertEquals("Application History", controller.get(TITLE, "unknown"));
+    Assert
+      .assertEquals("Application History", controller.get(TITLE, "unknown"));
   }
 
   @Test
   public void testView() throws Exception {
     Injector injector =
-        WebAppTests.createMockInjector(ApplicationContext.class,
-          mockApplicationHistoryManager(5, 1, 1));
+      WebAppTests.createMockInjector(ApplicationBaseProtocol.class,
+        mockApplicationHistoryClientService(5, 1, 1));
     AHSView ahsViewInstance = injector.getInstance(AHSView.class);
 
     ahsViewInstance.render();
-    //WebAppTests.flushOutput(injector);
+    WebAppTests.flushOutput(injector);
 
     ahsViewInstance.set(YarnWebParams.APP_STATE,
       YarnApplicationState.FAILED.toString());
     ahsViewInstance.render();
-    //WebAppTests.flushOutput(injector);
+    WebAppTests.flushOutput(injector);
 
     ahsViewInstance.set(YarnWebParams.APP_STATE, StringHelper.cjoin(
       YarnApplicationState.FAILED.toString(), YarnApplicationState.KILLED));
     ahsViewInstance.render();
-    //WebAppTests.flushOutput(injector);
+    WebAppTests.flushOutput(injector);
+  }
+
+  @Test
+  public void testAboutPage() throws Exception {
+    Injector injector =
+      WebAppTests.createMockInjector(ApplicationBaseProtocol.class,
+        mockApplicationHistoryClientService(0, 0, 0));
+    AboutPage aboutPageInstance = injector.getInstance(AboutPage.class);
+
+    aboutPageInstance.render();
+    WebAppTests.flushOutput(injector);
+
+    aboutPageInstance.render();
+    WebAppTests.flushOutput(injector);
   }
 
   @Test
   public void testAppPage() throws Exception {
     Injector injector =
-        WebAppTests.createMockInjector(ApplicationContext.class,
-          mockApplicationHistoryManager(1, 5, 1));
+      WebAppTests.createMockInjector(ApplicationBaseProtocol.class,
+        mockApplicationHistoryClientService(1, 5, 1));
     AppPage appPageInstance = injector.getInstance(AppPage.class);
 
     appPageInstance.render();
-    //WebAppTests.flushOutput(injector);
+    WebAppTests.flushOutput(injector);
 
     appPageInstance.set(YarnWebParams.APPLICATION_ID, ApplicationId
       .newInstance(0, 1).toString());
     appPageInstance.render();
-   // WebAppTests.flushOutput(injector);
+    WebAppTests.flushOutput(injector);
   }
 
   @Test
   public void testAppAttemptPage() throws Exception {
     Injector injector =
-        WebAppTests.createMockInjector(ApplicationContext.class,
-          mockApplicationHistoryManager(1, 1, 5));
+      WebAppTests.createMockInjector(ApplicationBaseProtocol.class,
+        mockApplicationHistoryClientService(1, 1, 5));
     AppAttemptPage appAttemptPageInstance =
-        injector.getInstance(AppAttemptPage.class);
+      injector.getInstance(AppAttemptPage.class);
 
     appAttemptPageInstance.render();
-    //WebAppTests.flushOutput(injector);
+    WebAppTests.flushOutput(injector);
 
     appAttemptPageInstance.set(YarnWebParams.APPLICATION_ATTEMPT_ID,
       ApplicationAttemptId.newInstance(ApplicationId.newInstance(0, 1), 1)
         .toString());
     appAttemptPageInstance.render();
-    //WebAppTests.flushOutput(injector);
+    WebAppTests.flushOutput(injector);
   }
 
   @Test
   public void testContainerPage() throws Exception {
     Injector injector =
-        WebAppTests.createMockInjector(ApplicationContext.class,
-          mockApplicationHistoryManager(1, 1, 1));
+      WebAppTests.createMockInjector(ApplicationBaseProtocol.class,
+        mockApplicationHistoryClientService(1, 1, 1));
     ContainerPage containerPageInstance =
-        injector.getInstance(ContainerPage.class);
+      injector.getInstance(ContainerPage.class);
 
     containerPageInstance.render();
-    //WebAppTests.flushOutput(injector);
+    WebAppTests.flushOutput(injector);
 
     containerPageInstance.set(
       YarnWebParams.CONTAINER_ID,
       ContainerId
-        .newInstance(
+        .newContainerId(
           ApplicationAttemptId.newInstance(ApplicationId.newInstance(0, 1), 1),
           1).toString());
     containerPageInstance.render();
-    //WebAppTests.flushOutput(injector);
+    WebAppTests.flushOutput(injector);
   }
 
-  ApplicationHistoryManager mockApplicationHistoryManager(int numApps,
-      int numAppAttempts, int numContainers) throws Exception {
+  ApplicationHistoryClientService mockApplicationHistoryClientService(int numApps,
+                                                                      int numAppAttempts,
int numContainers) throws Exception {
     ApplicationHistoryManager ahManager =
-        new MockApplicationHistoryManagerImpl(store);
+      new MockApplicationHistoryManagerImpl(store);
+    ApplicationHistoryClientService historyClientService =
+      new ApplicationHistoryClientService(ahManager);
     for (int i = 1; i <= numApps; ++i) {
       ApplicationId appId = ApplicationId.newInstance(0, i);
       writeApplicationStartData(appId);
       for (int j = 1; j <= numAppAttempts; ++j) {
         ApplicationAttemptId appAttemptId =
-            ApplicationAttemptId.newInstance(appId, j);
+          ApplicationAttemptId.newInstance(appId, j);
         writeApplicationAttemptStartData(appAttemptId);
         for (int k = 1; k <= numContainers; ++k) {
-          ContainerId containerId = ContainerId.newInstance(appAttemptId, k);
+          ContainerId containerId = ContainerId.newContainerId(appAttemptId, k);
           writeContainerStartData(containerId);
           writeContainerFinishData(containerId);
         }
@@ -162,7 +178,7 @@ public class TestAHSWebApp extends ApplicationHistoryStoreTestUtils {
       }
       writeApplicationFinishData(appId);
     }
-    return ahManager;
+    return historyClientService;
   }
 
   class MockApplicationHistoryManagerImpl extends ApplicationHistoryManagerImpl {
@@ -175,7 +191,7 @@ public class TestAHSWebApp extends ApplicationHistoryStoreTestUtils {
 
     @Override
     protected ApplicationHistoryStore createApplicationHistoryStore(
-        Configuration conf) {
+      Configuration conf) {
       return store;
     }
   };

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebServices.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebServices.java
b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebServices.java
index 7ca5a03..e78dfcc 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebServices.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebServices.java
@@ -26,6 +26,7 @@ import javax.ws.rs.core.MediaType;
 import junit.framework.Assert;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.yarn.api.ApplicationBaseProtocol;
 import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ContainerId;
@@ -36,7 +37,7 @@ import org.apache.hadoop.yarn.api.records.Priority;
 import org.apache.hadoop.yarn.api.records.YarnApplicationAttemptState;
 import org.apache.hadoop.yarn.api.records.YarnApplicationState;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
-import org.apache.hadoop.yarn.server.api.ApplicationContext;
+import org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryClientService;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryManager;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryStore;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.MemoryApplicationHistoryStore;
@@ -63,7 +64,7 @@ import com.sun.jersey.test.framework.WebAppDescriptor;
 
 public class TestAHSWebServices extends JerseyTest {
 
-  private static ApplicationHistoryManager ahManager;
+  private static ApplicationHistoryClientService historyClientService;
 
   private Injector injector = Guice.createInjector(new ServletModule() {
 
@@ -73,11 +74,11 @@ public class TestAHSWebServices extends JerseyTest {
       bind(AHSWebServices.class);
       bind(GenericExceptionHandler.class);
       try {
-        ahManager = mockApplicationHistoryManager();
+        historyClientService = mockApplicationHistoryManager();
       } catch (Exception e) {
         Assert.fail();
       }
-      bind(ApplicationContext.class).toInstance(ahManager);
+      bind(ApplicationBaseProtocol.class).toInstance(historyClientService);
       serve("/*").with(GuiceContainer.class);
     }
   });
@@ -90,14 +91,12 @@ public class TestAHSWebServices extends JerseyTest {
     }
   }
 
-  private ApplicationHistoryManager mockApplicationHistoryManager()
+  private ApplicationHistoryClientService mockApplicationHistoryManager()
       throws Exception {
     ApplicationHistoryStore store = new MemoryApplicationHistoryStore();
     TestAHSWebApp testAHSWebApp = new TestAHSWebApp();
     testAHSWebApp.setApplicationHistoryStore(store);
-    ApplicationHistoryManager ahManager =
-        testAHSWebApp.mockApplicationHistoryManager(5, 5, 5);
-    return ahManager;
+    return testAHSWebApp.mockApplicationHistoryClientService(5, 5, 5);
   }
 
   public TestAHSWebServices() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-metrics/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml
index 5cbc7f4..05c2865 100644
--- a/ambari-metrics/pom.xml
+++ b/ambari-metrics/pom.xml
@@ -36,10 +36,10 @@
     <python.ver>python &gt;= 2.6</python.ver>
     <deb.python.ver>python (&gt;= 2.6)</deb.python.ver>
     <!--TODO change to HDP URL-->
-    <hbase.tar>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0/tars/hbase-0.98.4.2.2.0.0-2041-hadoop2.tar.gz</hbase.tar>
-    <hbase.folder>hbase-0.98.4.2.2.0.0-2041-hadoop2</hbase.folder>
-    <hadoop.tar>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0/tars/hadoop-2.6.0.2.2.0.0-2041.tar.gz</hadoop.tar>
-    <hadoop.folder>hadoop-2.6.0.2.2.0.0-2041</hadoop.folder>
+    <hbase.tar>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/tars/hbase-1.1.1.2.3.0.0-2557.tar.gz</hbase.tar>
+    <hbase.folder>hbase-1.1.1.2.3.0.0-2557</hbase.folder>
+    <hadoop.tar>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/tars/hadoop-2.7.1.2.3.0.0-2557.tar.gz</hadoop.tar>
+    <hadoop.folder>hadoop-2.7.1.2.3.0.0-2557</hadoop.folder>
     <hbase.winpkg.zip>https://msibuilds.blob.core.windows.net/hdp/2.x/2.2.4.2/2/hbase-0.98.4.2.2.4.2-0002-hadoop2.winpkg.zip</hbase.winpkg.zip>
     <hbase.winpkg.folder>hbase-0.98.4.2.2.4.2-0002-hadoop2</hbase.winpkg.folder>
     <hadoop.winpkg.zip>https://msibuilds.blob.core.windows.net/hdp/2.x/2.2.4.2/2/hadoop-2.6.0.2.2.4.2-0002.winpkg.zip</hadoop.winpkg.zip>

http://git-wip-us.apache.org/repos/asf/ambari/blob/827e4486/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json
index 6131606..c12e09a 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json
@@ -916,7 +916,7 @@
               "temporal": true
             },
             "metrics/hbase/regionserver/blockCacheHitPercent": {
-              "metric": "regionserver.Server.blockCountHitPercent",
+              "metric": "regionserver.Server.blockCacheCountHitPercent",
               "pointInTime": true,
               "temporal": true
             },
@@ -2150,7 +2150,7 @@
               "temporal": true
             },
             "metrics/hbase/regionserver/blockCacheHitPercent": {
-              "metric": "regionserver.Server.blockCountHitPercent",
+              "metric": "regionserver.Server.blockCacheCountHitPercent",
               "pointInTime": true,
               "temporal": true
             },


Mime
View raw message