Class AHSWebServices
java.lang.Object
org.apache.hadoop.yarn.server.webapp.WebServices
org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.AHSWebServices
- All Implemented Interfaces:
org.apache.hadoop.yarn.server.webapp.AppInfoProvider
@Singleton
@Path("/ws/v1/applicationhistory")
public class AHSWebServices
extends org.apache.hadoop.yarn.server.webapp.WebServices
-
Field Summary
Fields inherited from class org.apache.hadoop.yarn.server.webapp.WebServices
appBaseProt -
Constructor Summary
ConstructorsConstructorDescriptionAHSWebServices(org.apache.hadoop.yarn.api.ApplicationBaseProtocol appBaseProt, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.api.records.timeline.TimelineAboutabout(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) org.apache.hadoop.yarn.server.webapp.dao.AppsInfoget(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) org.apache.hadoop.yarn.server.webapp.dao.AppInfogetApp(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId) org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfogetAppAttempt(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, String appAttemptId) org.apache.hadoop.yarn.server.webapp.dao.AppAttemptsInfogetAppAttempts(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId) org.apache.hadoop.yarn.server.webapp.dao.AppsInfogetApps(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String stateQuery, Set<String> statesQuery, String finalStatusQuery, String userQuery, String queueQuery, String count, String startedBegin, String startedEnd, String finishBegin, String finishEnd, String name, Set<String> applicationTypes) org.apache.hadoop.yarn.server.webapp.dao.ContainerInfogetContainer(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, String appAttemptId, String containerId) javax.ws.rs.core.ResponsegetContainerLogFile(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String containerIdStr, String filename, String format, String size, String nmId, boolean redirectedFromNode, boolean manualRedirection) Returns the contents of a container's log file in plain text.javax.ws.rs.core.ResponsegetContainerLogsInfo(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String containerIdStr, String nmId, boolean redirectedFromNode, boolean manualRedirection) Returns log file's name as well as current file size for a container.org.apache.hadoop.yarn.server.webapp.dao.ContainersInfogetContainers(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, String appAttemptId) javax.ws.rs.core.ResponsegetLogs(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String containerIdStr, String filename, String format, String size, String nmId, boolean redirectedFromNode, boolean manualRedirection) Methods inherited from class org.apache.hadoop.yarn.server.webapp.WebServices
getApp, getApp, getApplicationAttemptReport, getApplicationAttemptsReport, getApplicationReport, getApplicationsReport, getContainer, getContainerReport, getContainersReport, getNodeHttpAddress, getUser, initForReadableEndpoints, parseApplicationAttemptId, parseApplicationId, parseContainerId, parseQueries, validateIds
-
Constructor Details
-
AHSWebServices
@Inject public AHSWebServices(@Named("appBaseProt") org.apache.hadoop.yarn.api.ApplicationBaseProtocol appBaseProt, @Named("conf") org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
about
@GET @Path("/about") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.api.records.timeline.TimelineAbout about(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res) -
get
@GET @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppsInfo get(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res) -
getApps
@GET @Path("/apps") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppsInfo getApps(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @QueryParam("state") String stateQuery, @QueryParam("states") Set<String> statesQuery, @QueryParam("finalStatus") String finalStatusQuery, @QueryParam("user") String userQuery, @QueryParam("queue") String queueQuery, @QueryParam("limit") String count, @QueryParam("startedTimeBegin") String startedBegin, @QueryParam("startedTimeEnd") String startedEnd, @QueryParam("finishedTimeBegin") String finishBegin, @QueryParam("finishedTimeEnd") String finishEnd, @QueryParam("name") String name, @QueryParam("applicationTypes") Set<String> applicationTypes) - Overrides:
getAppsin classorg.apache.hadoop.yarn.server.webapp.WebServices
-
getApp
@GET @Path("/apps/{appid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppInfo getApp(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId) - Overrides:
getAppin classorg.apache.hadoop.yarn.server.webapp.WebServices
-
getAppAttempts
@GET @Path("/apps/{appid}/appattempts") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppAttemptsInfo getAppAttempts(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId) - Overrides:
getAppAttemptsin classorg.apache.hadoop.yarn.server.webapp.WebServices
-
getAppAttempt
@GET @Path("/apps/{appid}/appattempts/{appattemptid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo getAppAttempt(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId, @PathParam("appattemptid") String appAttemptId) - Overrides:
getAppAttemptin classorg.apache.hadoop.yarn.server.webapp.WebServices
-
getContainers
@GET @Path("/apps/{appid}/appattempts/{appattemptid}/containers") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo getContainers(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId, @PathParam("appattemptid") String appAttemptId) - Overrides:
getContainersin classorg.apache.hadoop.yarn.server.webapp.WebServices
-
getContainer
@GET @Path("/apps/{appid}/appattempts/{appattemptid}/containers/{containerid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.ContainerInfo getContainer(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId, @PathParam("appattemptid") String appAttemptId, @PathParam("containerid") String containerId) - Overrides:
getContainerin classorg.apache.hadoop.yarn.server.webapp.WebServices
-
getContainerLogsInfo
@GET @Path("/containers/{containerid}/logs") @Produces({"application/json","application/xml"}) public javax.ws.rs.core.Response getContainerLogsInfo(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("containerid") String containerIdStr, @QueryParam("nm.id") String nmId, @QueryParam("redirected_from_node") @DefaultValue("false") boolean redirectedFromNode, @QueryParam("manual_redirection") @DefaultValue("false") boolean manualRedirection) Returns log file's name as well as current file size for a container.- Parameters:
req- HttpServletRequestres- HttpServletResponsecontainerIdStr- The container IDnmId- The Node Manager NodeIdredirectedFromNode- Whether this is a redirected request from NM- Returns:
- The log file's name and current file size
-
getContainerLogFile
@GET @Path("/containers/{containerid}/logs/{filename}") @Produces("text/plain") @Public @Unstable public javax.ws.rs.core.Response getContainerLogFile(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("containerid") String containerIdStr, @PathParam("filename") String filename, @QueryParam("format") String format, @QueryParam("size") String size, @QueryParam("nm.id") String nmId, @QueryParam("redirected_from_node") boolean redirectedFromNode, @QueryParam("manual_redirection") @DefaultValue("false") boolean manualRedirection) Returns the contents of a container's log file in plain text.- Parameters:
req- HttpServletRequestres- HttpServletResponsecontainerIdStr- The container IDfilename- The name of the log fileformat- The content typesize- the size of the log filenmId- The Node Manager NodeIdredirectedFromNode- Whether this is the redirect request from NM- Returns:
- The contents of the container's log file
-
getLogs
@GET @Path("/containerlogs/{containerid}/{filename}") @Produces("text/plain; charset=utf-8") @Public @Unstable public javax.ws.rs.core.Response getLogs(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("containerid") String containerIdStr, @PathParam("filename") String filename, @QueryParam("format") String format, @QueryParam("size") String size, @QueryParam("nm.id") String nmId, @QueryParam("redirected_from_node") @DefaultValue("false") boolean redirectedFromNode, @QueryParam("manual_redirection") @DefaultValue("false") boolean manualRedirection)
-