Author: vinodkv
Date: Mon Jul 29 23:08:42 2013
New Revision: 1508228
URL: http://svn.apache.org/r1508228
Log:
YARN-925. Defined a Reader Interface for HistoryStorage. Contributed by Mayank
Bansal.
Added:
hadoop/common/branches/YARN-321/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryReader.java
Modified:
hadoop/common/branches/YARN-321/hadoop-yarn-project/CHANGES.txt
Modified: hadoop/common/branches/YARN-321/hadoop-yarn-project/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/YARN-321/hadoop-yarn-project/CHANGES.txt?rev=1508228&r1=1508227&r2=1508228&view=diff
==============================================================================
--- hadoop/common/branches/YARN-321/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/YARN-321/hadoop-yarn-project/CHANGES.txt Mon Jul 29
23:08:42 2013
@@ -43,6 +43,9 @@ Branch YARN-321: Generic ApplicationHist
YARN-934. Defined a Writer Interface for HistoryStorage. (Zhijie Shen via
vinodkv)
+ YARN-925. Defined a Reader Interface for HistoryStorage. (Mayank Bansal via
+ vinodkv)
+
Release 2.1.1-beta - UNRELEASED
INCOMPATIBLE CHANGES
Added:
hadoop/common/branches/YARN-321/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryReader.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/YARN-321/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryReader.java?rev=1508228&view=auto
==============================================================================
---
hadoop/common/branches/YARN-321/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryReader.java
(added)
+++
hadoop/common/branches/YARN-321/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryReader.java
Mon Jul 29 23:08:42 2013
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.yarn.server.applicationhistoryservice;
+
+import java.util.Map;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+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.server.applicationhistoryservice.records.ApplicationAttemptHistoryData;
+import
org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationHistoryData;
+import
org.apache.hadoop.yarn.server.applicationhistoryservice.records.ContainerHistoryData;
+
[email protected]
[email protected]
+public interface ApplicationHistoryReader {
+
+ /**
+ * This method returns Application {@link ApplicationHistoryData} for the
specified
+ * {@link ApplicationId}.
+ *
+ * @return {@link ApplicationHistoryData} for the ApplicationId.
+ */
+ ApplicationHistoryData getApplication(ApplicationId appId);
+
+ /**
+ * This method returns all Application {@link ApplicationHistoryData}s
+ *
+ * @return map {@link ApplicationId, @link ApplicationHistoryData}s.
+ */
+ Map<ApplicationId, ApplicationHistoryData> getAllApplications();
+
+ /**
+ * Application can have multiple application attempts
+ * {@link ApplicationAttemptHistoryData}. This method returns the all
+ * {@link ApplicationAttemptHistoryData}s for the Application.
+ *
+ * @return all {@link ApplicationAttemptHistoryData}s for the Application.
+ */
+ Map<ApplicationAttemptId, ApplicationAttemptHistoryData>
getApplicationAttempts(
+ ApplicationId appId);
+
+ /**
+ * This method returns {@link ApplicationAttemptHistoryData} for specified
+ * {@link ApplicationId}.
+ *
+ * @param {@link ApplicationAttemptId}
+ * @return {@link ApplicationAttemptHistoryData} for ApplicationAttemptId
+ */
+ ApplicationAttemptHistoryData getApplicationAttempt(
+ ApplicationAttemptId appAttemptId);
+
+ /**
+ * This method returns {@link Container} for specified {@link ContainerId}.
+ *
+ * @param {@link ContainerId}
+ * @return {@link Container} for ContainerId
+ */
+ ContainerHistoryData getAMContainer(ContainerId containerId);
+
+ /**
+ * This method returns {@link ContainerHistoryData} for specified
+ * {@link ApplicationAttemptId}.
+ *
+ * @param {@link ApplicationAttemptId}
+ * @return {@link ContainerHistoryData} for ApplicationAttemptId
+ */
+ ContainerHistoryData getContainer(ApplicationAttemptId appAttemptId);
+}