blob: 01b169eb384ff565e6e41e1fdb414fe702d5bb1e [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
| Generated by Apache Maven Doxia at 2021-06-15
| Rendered using Apache Maven Stylus Skin 1.5
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Apache Hadoop 3.3.1 &#x2013; The YARN Timeline Server</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="Date-Revision-yyyymmdd" content="20210615" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body class="composite">
<div id="banner">
<a href="http://hadoop.apache.org/" id="bannerLeft">
<img src="http://hadoop.apache.org/images/hadoop-logo.jpg" alt="" />
</a>
<a href="http://www.apache.org/" id="bannerRight">
<img src="http://www.apache.org/images/asf_logo_wide.png" alt="" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<a href="http://www.apache.org/" class="externalLink">Apache</a>
&gt;
<a href="http://hadoop.apache.org/" class="externalLink">Hadoop</a>
&gt;
<a href="../index.html">Apache Hadoop YARN</a>
&gt;
<a href="index.html">Apache Hadoop 3.3.1</a>
&gt;
The YARN Timeline Server
</div>
<div class="xright"> <a href="http://wiki.apache.org/hadoop" class="externalLink">Wiki</a>
|
<a href="https://gitbox.apache.org/repos/asf/hadoop.git" class="externalLink">git</a>
|
<a href="http://hadoop.apache.org/" class="externalLink">Apache Hadoop</a>
&nbsp;| Last Published: 2021-06-15
&nbsp;| Version: 3.3.1
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>General</h5>
<ul>
<li class="none">
<a href="../../index.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/SingleCluster.html">Single Node Setup</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/ClusterSetup.html">Cluster Setup</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CommandsManual.html">Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/FileSystemShell.html">FileSystem Shell</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Compatibility.html">Compatibility Specification</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/DownstreamDev.html">Downstream Developer's Guide</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/AdminCompatibilityGuide.html">Admin Compatibility Guide</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/InterfaceClassification.html">Interface Classification</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/filesystem/index.html">FileSystem Specification</a>
</li>
</ul>
<h5>Common</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CLIMiniCluster.html">CLI Mini Cluster</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/FairCallQueue.html">Fair Call Queue</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/NativeLibraries.html">Native Libraries</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Superusers.html">Proxy User</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/RackAwareness.html">Rack Awareness</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/SecureMode.html">Secure Mode</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/ServiceLevelAuth.html">Service Level Authorization</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/HttpAuthentication.html">HTTP Authentication</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CredentialProviderAPI.html">Credential Provider API</a>
</li>
<li class="none">
<a href="../../hadoop-kms/index.html">Hadoop KMS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Tracing.html">Tracing</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/UnixShellGuide.html">Unix Shell Guide</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/registry/index.html">Registry</a>
</li>
</ul>
<h5>HDFS</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsDesign.html">Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html">User Guide</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSCommands.html">Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html">NameNode HA With QJM</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithNFS.html">NameNode HA With NFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ObserverNameNode.html">Observer NameNode</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/Federation.html">Federation</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ViewFs.html">ViewFs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ViewFsOverloadScheme.html">ViewFsOverloadScheme</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html">Snapshots</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsEditsViewer.html">Edits Viewer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsImageViewer.html">Image Viewer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html">Permissions and HDFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsQuotaAdminGuide.html">Quotas and HDFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/LibHdfs.html">libhdfs (C API)</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/WebHDFS.html">WebHDFS (REST API)</a>
</li>
<li class="none">
<a href="../../hadoop-hdfs-httpfs/index.html">HttpFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ShortCircuitLocalReads.html">Short Circuit Local Reads</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/CentralizedCacheManagement.html">Centralized Cache Management</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsNfsGateway.html">NFS Gateway</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsRollingUpgrade.html">Rolling Upgrade</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ExtendedAttributes.html">Extended Attributes</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/TransparentEncryption.html">Transparent Encryption</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsMultihoming.html">Multihoming</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ArchivalStorage.html">Storage Policies</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/MemoryStorage.html">Memory Storage Support</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/SLGUserGuide.html">Synthetic Load Generator</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSErasureCoding.html">Erasure Coding</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HDFSDiskbalancer.html">Disk Balancer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsUpgradeDomain.html">Upgrade Domain</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsDataNodeAdminGuide.html">DataNode Admin</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs-rbf/HDFSRouterFederation.html">Router Federation</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsProvidedStorage.html">Provided Storage</a>
</li>
</ul>
<h5>MapReduce</h5>
<ul>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html">Tutorial</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapredCommands.html">Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html">Compatibility with 1.x</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/EncryptedShuffle.html">Encrypted Shuffle</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/PluggableShuffleAndPluggableSort.html">Pluggable Shuffle/Sort</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/DistributedCacheDeploy.html">Distributed Cache Deploy</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/SharedCacheSupport.html">Support for YARN Shared Cache</a>
</li>
</ul>
<h5>MapReduce REST APIs</h5>
<ul>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapredAppMasterRest.html">MR Application Master</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-hs/HistoryServerRest.html">MR History Server</a>
</li>
</ul>
<h5>YARN</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YARN.html">Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YarnCommands.html">Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/CapacityScheduler.html">Capacity Scheduler</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/FairScheduler.html">Fair Scheduler</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ResourceManagerRestart.html">ResourceManager Restart</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ResourceManagerHA.html">ResourceManager HA</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ResourceModel.html">Resource Model</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeLabel.html">Node Labels</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeAttributes.html">Node Attributes</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WebApplicationProxy.html">Web Application Proxy</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/TimelineServer.html">Timeline Server</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/TimelineServiceV2.html">Timeline Service V.2</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html">Writing YARN Applications</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YarnApplicationSecurity.html">YARN Application Security</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeManager.html">NodeManager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/DockerContainers.html">Running Applications in Docker Containers</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/RuncContainers.html">Running Applications in runC Containers</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeManagerCgroups.html">Using CGroups</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/SecureContainer.html">Secure Containers</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ReservationSystem.html">Reservation System</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/GracefulDecommission.html">Graceful Decommission</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/OpportunisticContainers.html">Opportunistic Containers</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/Federation.html">YARN Federation</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/SharedCache.html">Shared Cache</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/UsingGpus.html">Using GPU</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/UsingFPGA.html">Using FPGA</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/PlacementConstraints.html">Placement Constraints</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YarnUI2.html">YARN UI2</a>
</li>
</ul>
<h5>YARN REST APIs</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WebServicesIntro.html">Introduction</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html">Resource Manager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeManagerRest.html">Node Manager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/TimelineServer.html#Timeline_Server_REST_API_v1">Timeline Server</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/TimelineServiceV2.html#Timeline_Service_v.2_REST_API">Timeline Service V.2</a>
</li>
</ul>
<h5>YARN Service</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/Overview.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/QuickStart.html">QuickStart</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/Concepts.html">Concepts</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/YarnServiceAPI.html">Yarn Service API</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/ServiceDiscovery.html">Service Discovery</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/yarn-service/SystemServices.html">System Services</a>
</li>
</ul>
<h5>Hadoop Compatible File Systems</h5>
<ul>
<li class="none">
<a href="../../hadoop-aliyun/tools/hadoop-aliyun/index.html">Aliyun OSS</a>
</li>
<li class="none">
<a href="../../hadoop-aws/tools/hadoop-aws/index.html">Amazon S3</a>
</li>
<li class="none">
<a href="../../hadoop-azure/index.html">Azure Blob Storage</a>
</li>
<li class="none">
<a href="../../hadoop-azure-datalake/index.html">Azure Data Lake Storage</a>
</li>
<li class="none">
<a href="../../hadoop-openstack/index.html">OpenStack Swift</a>
</li>
<li class="none">
<a href="../../hadoop-cos/cloud-storage/index.html">Tencent COS</a>
</li>
</ul>
<h5>Auth</h5>
<ul>
<li class="none">
<a href="../../hadoop-auth/index.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-auth/Examples.html">Examples</a>
</li>
<li class="none">
<a href="../../hadoop-auth/Configuration.html">Configuration</a>
</li>
<li class="none">
<a href="../../hadoop-auth/BuildingIt.html">Building</a>
</li>
</ul>
<h5>Tools</h5>
<ul>
<li class="none">
<a href="../../hadoop-streaming/HadoopStreaming.html">Hadoop Streaming</a>
</li>
<li class="none">
<a href="../../hadoop-archives/HadoopArchives.html">Hadoop Archives</a>
</li>
<li class="none">
<a href="../../hadoop-archive-logs/HadoopArchiveLogs.html">Hadoop Archive Logs</a>
</li>
<li class="none">
<a href="../../hadoop-distcp/DistCp.html">DistCp</a>
</li>
<li class="none">
<a href="../../hadoop-gridmix/GridMix.html">GridMix</a>
</li>
<li class="none">
<a href="../../hadoop-rumen/Rumen.html">Rumen</a>
</li>
<li class="none">
<a href="../../hadoop-resourceestimator/ResourceEstimator.html">Resource Estimator Service</a>
</li>
<li class="none">
<a href="../../hadoop-sls/SchedulerLoadSimulator.html">Scheduler Load Simulator</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Benchmarking.html">Hadoop Benchmarking</a>
</li>
<li class="none">
<a href="../../hadoop-dynamometer/Dynamometer.html">Dynamometer</a>
</li>
</ul>
<h5>Reference</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/release/">Changelog and Release Notes</a>
</li>
<li class="none">
<a href="../../api/index.html">Java API docs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/UnixShellAPI.html">Unix Shell API</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Metrics.html">Metrics</a>
</li>
</ul>
<h5>Configuration</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/core-default.xml">core-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/hdfs-default.xml">hdfs-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs-rbf/hdfs-rbf-default.xml">hdfs-rbf-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml">mapred-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-common/yarn-default.xml">yarn-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-kms/kms-default.html">kms-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-hdfs-httpfs/httpfs-default.html">httpfs-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/DeprecatedProperties.html">Deprecated Properties</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img alt="Built by Maven" src="./images/logos/maven-feather.png"/>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<!---
Licensed 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. See accompanying LICENSE file.
-->
<h1>The YARN Timeline Server</h1>
<ul>
<li><a href="#Overview">Overview</a></li>
<li><a href="#Deployment">Deployment</a></li>
<li><a href="#Timeline_Server_REST_API_V1">Timeline Server REST API V1</a></li>
<li><a href="#Domains_.2Fws.2Fv1.2Ftimeline.2Fdomain">Domains /ws/v1/timeline/domain</a></li>
<li><a href="#Posting_Timeline_Entities"> Posting Timeline Entities</a></li>
<li><a href="#Timeline_Entity_List">Timeline Entity List</a></li>
<li><a href="#Timeline_Entity">Timeline Entity</a></li>
<li><a href="#Timeline_Event_List">Timeline Event List</a></li>
<li><a href="#About">About</a></li>
<li><a href="#Application_List">Application List</a></li>
<li><a href="#Application">Application</a></li>
<li><a href="#Application_Attempt_List">Application Attempt List</a></li>
<li><a href="#Application_Attempt">Application Attempt</a></li>
<li><a href="#Container_List">Container List</a></li>
<li><a href="#Container">Container</a></li>
<li><a href="#Timeline_Server_Performance_Test_Tool"> Timeline Server Performance Test Tool</a></li></ul>
<div class="section">
<h2><a name="Overview"></a>Overview</h2>
<div class="section">
<h3><a name="Introduction"></a>Introduction</h3>
<p>The Storage and retrieval of application&#x2019;s current and historic information in a generic fashion is addressed in YARN through the Timeline Server. It has two responsibilities:</p>
<div class="section">
<h4><a name="Persisting_Application_Specific_Information"></a>Persisting Application Specific Information</h4>
<p>The collection and retrieval of information completely specific to an application or framework. For example, the Hadoop MapReduce framework can include pieces of information like number of map tasks, reduce tasks, counters&#x2026;etc. Application developers can publish the specific information to the Timeline server via <tt>TimelineClient</tt> in the Application Master and/or the application&#x2019;s containers.</p>
<p>This information is then queryable via REST APIs for rendering by application/framework specific UIs.</p></div>
<div class="section">
<h4><a name="Persisting_Generic_Information_about_Completed_Applications"></a>Persisting Generic Information about Completed Applications</h4>
<p>Previously this was supported purely for MapReduce jobs by the Application History Server. With the introduction of the timeline server, the Application History Server becomes just one use of the Timeline Server.</p>
<p>Generic information includes application level data such as</p>
<ul>
<li>queue-name,</li>
<li>user information and the like set in the <tt>ApplicationSubmissionContext</tt>,</li>
<li>a list of application-attempts that ran for an application</li>
<li>information about each application-attempt</li>
<li>the list of containers run under each application-attempt</li>
<li>information about each container.</li>
</ul>
<p>Generic data is published by the YARN Resource Manager to the timeline store and used by its web-UI to display information about completed applications.</p></div></div>
<div class="section">
<h3><a name="Current_Status_and_Future_Plans"></a><a name="Current_Status"></a>Current Status and Future Plans</h3>
<p>Current status</p>
<ol style="list-style-type: decimal">
<li>The core functionality of the timeline server has been completed.</li>
<li>It works in both secure and non secure clusters.</li>
<li>The generic history service is built on the timeline store.</li>
<li>The history can be stored in memory or in a leveldb database store; the latter ensures the history is preserved over Timeline Server restarts.</li>
<li>The ability to install framework specific UIs in YARN is not supported.</li>
<li>Application specific information is only available via RESTful APIs using JSON type content.</li>
<li>The &#x201c;Timeline Server v1&#x201d; REST API has been declared one of the REST APIs whose compatibility will be maintained in future releases.</li>
<li>The single-server implementation of the Timeline Server places a limit on the scalability of the service; it also prevents the service being High-Availability component of the YARN infrastructure.</li>
</ol>
<p>Future Plans</p>
<ol style="list-style-type: decimal">
<li>Future releases will introduce a next generation timeline service which is scalable and reliable, <a href="./TimelineServiceV2.html">&#x201c;Timeline Service v2&#x201d;</a>.</li>
<li>The expanded features of this service <i>may not</i> be available to applications using the Timeline Server v1 REST API. That includes extended data structures as well as the ability of the client to failover between Timeline Server instances.</li>
</ol></div>
<div class="section">
<h3><a name="Timeline_Structure"></a>Timeline Structure</h3>
<p><img src="./images/timeline_structure.jpg" alt="Timeline Structure" /></p>
<div class="section">
<h4><a name="Timeline_Domain"></a>Timeline Domain</h4>
<p>The Timeline Domain offers a namespace for Timeline server allowing users to host multiple entities, isolating them from other users and applications. Timeline server Security is defined at this level.</p>
<p>A &#x201c;Domain&#x201d; primarily stores owner info, read and&amp; write ACL information, created and modified time stamp information. Each Domain is identified by an ID which must be unique across all users in the YARN cluster.</p></div>
<div class="section">
<h4><a name="Timeline_Entity"></a>Timeline Entity</h4>
<p>A Timeline Entity contains the the meta information of a conceptual entity and its related events.</p>
<p>The entity can be an application, an application attempt, a container or any user-defined object.</p>
<p>It contains <b>Primary filters</b> which will be used to index the entities in the Timeline Store. Accordingly, users/applications should carefully choose the information they want to store as the primary filters.</p>
<p>The remaining data can be stored as unindexed information. Each Entity is uniquely identified by an <tt>EntityId</tt> and <tt>EntityType</tt>.</p></div>
<div class="section">
<h4><a name="Timeline_Events"></a>Timeline Events</h4>
<p>A Timeline Event describes an event that is related to a specific Timeline Entity of an application.</p>
<p>Users are free to define what an event means &#x2014;such as starting an application, getting allocated a container, an operation failures or other information considered relevant to users and cluster operators.</p></div></div></div>
<div class="section">
<h2><a name="Deployment"></a>Deployment</h2>
<div class="section">
<h3><a name="Configurations"></a>Configurations</h3>
<div class="section">
<h4><a name="Basic_Configuration"></a>Basic Configuration</h4>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Configuration Property </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.enabled</tt> </td>
<td align="left"> In the server side it indicates whether timeline service is enabled or not. And in the client side, users can enable it to indicate whether client wants to use timeline service. If it&#x2019;s enabled in the client side along with security, then yarn client tries to fetch the delegation tokens for the timeline server. Defaults to <tt>false</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.resourcemanager.system-metrics-publisher.enabled</tt> </td>
<td align="left"> The setting that controls whether or not YARN system metrics are published on the timeline server by RM. Defaults to <tt>false</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.generic-application-history.enabled</tt> </td>
<td align="left"> Indicate to clients whether to query generic application data from timeline history-service or not. If not enabled then application data is queried only from Resource Manager. Defaults to <tt>false</tt>. </td></tr>
</tbody>
</table></div>
<div class="section">
<h4><a name="Timeline_store_and_state_store_configuration"></a>Timeline store and state store configuration</h4>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Configuration Property </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.store-class</tt> </td>
<td align="left"> Store class name for timeline store. Defaults to <tt>org.apache.hadoop.yarn.server.timeline.LeveldbTimelineStore</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.leveldb-timeline-store.path</tt> </td>
<td align="left"> Store file name for leveldb timeline store. Defaults to <tt>${hadoop.tmp.dir}/yarn/timeline</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.leveldb-timeline-store.ttl-interval-ms</tt> </td>
<td align="left"> Length of time to wait between deletion cycles of leveldb timeline store in milliseconds. Defaults to <tt>300000</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.leveldb-timeline-store.read-cache-size</tt> </td>
<td align="left"> Size of read cache for uncompressed blocks for leveldb timeline store in bytes. Defaults to <tt>104857600</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.leveldb-timeline-store.start-time-read-cache-size</tt> </td>
<td align="left"> Size of cache for recently read entity start times for leveldb timeline store in number of entities. Defaults to <tt>10000</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.leveldb-timeline-store.start-time-write-cache-size</tt> </td>
<td align="left"> Size of cache for recently written entity start times for leveldb timeline store in number of entities. Defaults to <tt>10000</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.recovery.enabled</tt> </td>
<td align="left"> Defaults to <tt>false</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.state-store-class</tt> </td>
<td align="left"> Store class name for timeline state store. Defaults to <tt>org.apache.hadoop.yarn.server.timeline.recovery.LeveldbTimelineStateStore</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.leveldb-state-store.path</tt> </td>
<td align="left"> Store file name for leveldb timeline state store. </td></tr>
</tbody>
</table></div>
<div class="section">
<h4><a name="Web_and_RPC_Configuration"></a>Web and RPC Configuration</h4>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Configuration Property </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.hostname</tt> </td>
<td align="left"> The hostname of the Timeline service web application. Defaults to <tt>0.0.0.0</tt> </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.address</tt> </td>
<td align="left"> Address for the Timeline server to start the RPC server. Defaults to <tt>${yarn.timeline-service.hostname}:10200</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.webapp.address</tt> </td>
<td align="left"> The http address of the Timeline service web application. Defaults to <tt>${yarn.timeline-service.hostname}:8188</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.webapp.https.address</tt> </td>
<td align="left"> The https address of the Timeline service web application. Defaults to <tt>${yarn.timeline-service.hostname}:8190</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.bind-host</tt> </td>
<td align="left"> The actual address the server will bind to. If this optional address is set, the RPC and webapp servers will bind to this address and the port specified in <tt>yarn.timeline-service.address</tt> and <tt>yarn.timeline-service.webapp.address</tt>, respectively. This is most useful for making the service listen on all interfaces by setting to <tt>0.0.0.0</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.http-cross-origin.enabled</tt> </td>
<td align="left"> Enables cross-origin support (CORS) for web services where cross-origin web response headers are needed. For example, javascript making a web services request to the timeline server. Defaults to <tt>false</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.http-cross-origin.allowed-origins</tt> </td>
<td align="left"> Comma separated list of origins that are allowed. Values prefixed with <tt>regex:</tt> are interpreted as regular expressions. Values containing wildcards (<tt>*</tt>) are possible as well, here a regular expression is generated, the use is discouraged and support is only available for backward compatibility. Defaults to <tt>*</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.http-cross-origin.allowed-methods</tt> </td>
<td align="left"> Comma separated list of methods that are allowed for web services needing cross-origin (CORS) support. Defaults to <tt>GET,POST,HEAD</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.http-cross-origin.allowed-headers</tt> </td>
<td align="left"> Comma separated list of headers that are allowed for web services needing cross-origin (CORS) support. Defaults to <tt>X-Requested-With,Content-Type,Accept,Origin</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.http-cross-origin.max-age</tt> </td>
<td align="left"> The number of seconds a pre-flighted request can be cached for web services needing cross-origin (CORS) support. Defaults to <tt>1800</tt>. </td></tr>
</tbody>
</table>
<p>Note that the selection between the HTTP and HTTPS binding is made in the <tt>TimelineClient</tt> based upon the value of the YARN-wide configuration option <tt>yarn.http.policy</tt>; the HTTPS endpoint will be selected if this policy is <tt>HTTPS_ONLY</tt>.</p></div>
<div class="section">
<h4><a name="Advanced_Server-side_configuration"></a>Advanced Server-side configuration</h4>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Configuration Property </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.ttl-enable</tt> </td>
<td align="left"> Enable deletion of aged data within the timeline store. Defaults to <tt>true</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.ttl-ms</tt> </td>
<td align="left"> Time to live for timeline store data in milliseconds. Defaults to <tt>604800000</tt> (7 days). </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.handler-thread-count</tt> </td>
<td align="left"> Handler thread count to serve the client RPC requests. Defaults to <tt>10</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.client.max-retries</tt> </td>
<td align="left"> The maximum number of retries for attempts to publish data to the timeline service.Defaults to <tt>30</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.client.retry-interval-ms</tt> </td>
<td align="left"> The interval in milliseconds between retries for the timeline service client. Defaults to <tt>1000</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.generic-application-history.max-applications</tt> </td>
<td align="left"> The max number of applications could be fetched by using REST API or application history protocol and shown in timeline server web ui. Defaults to <tt>10000</tt>. </td></tr>
</tbody>
</table></div>
<div class="section">
<h4><a name="UI_Hosting_Configuration"></a>UI Hosting Configuration</h4>
<p>The timeline service can host multiple UIs if enabled. The service can support both static web sites hosted in a directory or war files bundled. The web UI is then hosted on the timeline service HTTP port under the path configured.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Configuration Property </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.ui-names</tt> </td>
<td align="left"> Comma separated list of UIs that will be hosted. Defaults to <tt>none</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.ui-on-disk-path.$name</tt> </td>
<td align="left"> For each of the ui-names, an on disk path should be specified to the directory service static content or the location of a web archive (war file). </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.ui-web-path.$name</tt> </td>
<td align="left"> For each of the ui-names, the web path should be specified relative to the Timeline server root. Paths should begin with a starting slash. </td></tr>
</tbody>
</table></div>
<div class="section">
<h4><a name="Security_Configuration"></a>Security Configuration</h4>
<p>Security can be enabled by setting <tt>yarn.timeline-service.http-authentication.type</tt> to <tt>kerberos</tt>, after which the following configuration options are available:</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Configuration Property </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.http-authentication.type</tt> </td>
<td align="left"> Defines authentication used for the timeline server HTTP endpoint. Supported values are: <tt>simple</tt> / <tt>kerberos</tt> / #AUTHENTICATION_HANDLER_CLASSNAME#. Defaults to <tt>simple</tt>. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.http-authentication.simple.anonymous.allowed</tt> </td>
<td align="left"> Indicates if anonymous requests are allowed by the timeline server when using &#x2018;simple&#x2019; authentication. Defaults to <tt>true</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.principal</tt> </td>
<td align="left"> The Kerberos principal for the timeline server. </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.keytab</tt> </td>
<td align="left"> The Kerberos keytab for the timeline server. Defaults on Unix to to <tt>/etc/krb5.keytab</tt>. </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.delegation.key.update-interval</tt> </td>
<td align="left"> Defaults to <tt>86400000</tt> (1 day). </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.delegation.token.renew-interval</tt> </td>
<td align="left"> Defaults to <tt>86400000</tt> (1 day). </td></tr>
<tr class="b">
<td align="left"> <tt>yarn.timeline-service.delegation.token.max-lifetime</tt> </td>
<td align="left"> Defaults to <tt>604800000</tt> (7 days). </td></tr>
<tr class="a">
<td align="left"> <tt>yarn.timeline-service.client.best-effort</tt> </td>
<td align="left"> Should the failure to obtain a delegation token be considered an application failure (option = false), or should the client attempt to continue to publish information without it (option=true). Default: <tt>false</tt> </td></tr>
</tbody>
</table></div>
<div class="section">
<h4><a name="Enabling_the_timeline_service_and_the_generic_history_service"></a>Enabling the timeline service and the generic history service</h4>
<p>Following are the basic configuration to start Timeline server.</p>
<div>
<div>
<pre class="source">&lt;property&gt;
&lt;description&gt;Indicate to clients whether Timeline service is enabled or not.
If enabled, the TimelineClient library used by end-users will post entities
and events to the Timeline server.&lt;/description&gt;
&lt;name&gt;yarn.timeline-service.enabled&lt;/name&gt;
&lt;value&gt;true&lt;/value&gt;
&lt;/property&gt;
&lt;property&gt;
&lt;description&gt;The setting that controls whether yarn system metrics is
published on the timeline server or not by RM.&lt;/description&gt;
&lt;name&gt;yarn.resourcemanager.system-metrics-publisher.enabled&lt;/name&gt;
&lt;value&gt;true&lt;/value&gt;
&lt;/property&gt;
&lt;property&gt;
&lt;description&gt;Indicate to clients whether to query generic application
data from timeline history-service or not. If not enabled then application
data is queried only from Resource Manager.&lt;/description&gt;
&lt;name&gt;yarn.timeline-service.generic-application-history.enabled&lt;/name&gt;
&lt;value&gt;true&lt;/value&gt;
&lt;/property&gt;
</pre></div></div>
</div></div>
<div class="section">
<h3><a name="Running_the_Timeline_Server"></a><a name="Running_Timeline_Server"></a> Running the Timeline Server</h3>
<p>Assuming all the aforementioned configurations are set properly admins can start the Timeline server/history service with the following command:</p>
<div>
<div>
<pre class="source">yarn timelineserver
</pre></div></div>
<p>To start the Timeline server / history service as a daemon, the command is</p>
<div>
<div>
<pre class="source">$HADOOP_YARN_HOME/sbin/yarn-daemon.sh start timelineserver
</pre></div></div>
</div>
<div class="section">
<h3><a name="Accessing_generic-data_via_command-line"></a> Accessing generic-data via command-line</h3>
<p>Users can access applications&#x2019; generic historic data via the command line below</p>
<div>
<div>
<pre class="source">$ yarn application -status &lt;Application ID&gt;
$ yarn applicationattempt -list &lt;Application ID&gt;
$ yarn applicationattempt -status &lt;Application Attempt ID&gt;
$ yarn container -list &lt;Application Attempt ID&gt;
$ yarn container -status &lt;Container ID&gt;
</pre></div></div>
<p>Note that the same commands are usable to obtain the corresponding information about running applications.</p></div>
<div class="section">
<h3><a name="Publishing_application_specific_data"></a><a name="Publishing_of_application_specific_data"></a> Publishing application specific data</h3>
<p>Developers can define what information they want to record for their applications by constructing <tt>TimelineEntity</tt> and <tt>TimelineEvent</tt> objects then publishing the entities and events to the Timeline Server via the <tt>TimelineClient</tt> API.</p>
<p>Here is an example:</p>
<div>
<div>
<pre class="source">// Create and start the Timeline client
TimelineClient client = TimelineClient.createTimelineClient();
client.init(conf);
client.start();
try {
TimelineDomain myDomain = new TimelineDomain();
myDomain.setId(&quot;MyDomain&quot;);
// Compose other Domain info ....
client.putDomain(myDomain);
TimelineEntity myEntity = new TimelineEntity();
myEntity.setDomainId(myDomain.getId());
myEntity.setEntityType(&quot;APPLICATION&quot;);
myEntity.setEntityId(&quot;MyApp1&quot;);
// Compose other entity info
TimelinePutResponse response = client.putEntities(entity);
TimelineEvent event = new TimelineEvent();
event.setEventType(&quot;APP_FINISHED&quot;);
event.setTimestamp(System.currentTimeMillis());
event.addEventInfo(&quot;Exit Status&quot;, &quot;SUCCESS&quot;);
// Compose other Event info ....
myEntity.addEvent(event);
TimelinePutResponse response = timelineClient.putEntities(entity);
} catch (IOException e) {
// Handle the exception
} catch (RuntimeException e) {
// In Hadoop 2.6, if attempts submit information to the Timeline Server fail more than the retry limit,
// a RuntimeException will be raised. This may change in future releases, being
// replaced with a IOException that is (or wraps) that which triggered retry failures.
} catch (YarnException e) {
// Handle the exception
} finally {
// Stop the Timeline client
client.stop();
}
</pre></div></div>
<ol style="list-style-type: decimal">
<li>Publishing of data to Timeline Server is a synchronous operation; the call will not return until successful.</li>
<li>The <tt>TimelineClient</tt> implementation class is a subclass of the YARN <tt>Service</tt> API; it can be placed under a <tt>CompositeService</tt> to ease its lifecycle management.</li>
<li>The result of a <tt>putEntities()</tt> call is a <tt>TimelinePutResponse</tt> object. This contains a (hopefully empty) list of those timeline entities reject by the timeline server, along with an error code indicating the cause of each failure.</li>
</ol>
<p>In Hadoop 2.6 and 2.7, the error codes are:</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Error Code </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left">1 </td>
<td align="left"> No start time </td></tr>
<tr class="a">
<td align="left">2 </td>
<td align="left"> IOException </td></tr>
<tr class="b">
<td align="left">3 </td>
<td align="left"> System Filter conflict (reserved filter key used) </td></tr>
<tr class="a">
<td align="left">4 </td>
<td align="left"> Access Denied </td></tr>
<tr class="b">
<td align="left">5 </td>
<td align="left"> No domain </td></tr>
<tr class="a">
<td align="left">6 </td>
<td align="left"> Forbidden relation </td></tr>
</tbody>
</table>
<p>Further error codes may be defined in future.</p>
<p><b>Note</b> : Following are the points which need to be observed when updating a entity.</p>
<ul>
<li>Domain ID should not be modified for already existing entity.</li>
<li>After a modification of a Primary filter value, the new value will be appended to the old value; the original value will not be replaced.</li>
<li>It&#x2019;s advisable to have same primary filters for all updates on entity. Any on modification of a primary filter by in an update will result in queries with updated primary filter to not fetching the information before the update</li>
</ul>
<h1>Generic Data Web UI</h1>
<p>Users can access the generic historic information of applications via web UI:</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/applicationhistory
</pre></div></div>
</div></div>
<div class="section">
<h2><a name="Timeline_Server_REST_API_V1"></a><a name="Timeline_Server_REST_API_v1"></a>Timeline Server REST API V1</h2>
<p>Querying the timeline server is currently only supported via REST API calls; there is no API client implemented in the YARN libraries. In Java, the Jersey client is effective at querying the server, even in secure mode (provided the caller has the appropriate Kerberos tokens or keytab).</p>
<p>The v1 REST API is implemented at under the path, <tt>/ws/v1/timeline/</tt> on the Timeline Server web service.</p>
<p>Here is a non-normative description of the API.</p>
<div class="section">
<h3><a name="Root_path"></a>Root path</h3>
<div>
<div>
<pre class="source">GET /ws/v1/timeline/
</pre></div></div>
<p>Returns a JSON object describing the server instance and version information.</p>
<div>
<div>
<pre class="source"> {
About: &quot;Timeline API&quot;,
timeline-service-version: &quot;3.0.0-SNAPSHOT&quot;,
timeline-service-build-version: &quot;3.0.0-SNAPSHOT from fcd0702c10ce574b887280476aba63d6682d5271 by zshen source checksum e9ec74ea3ff7bc9f3d35e9cac694fb&quot;,
timeline-service-version-built-on: &quot;2015-05-13T19:45Z&quot;,
hadoop-version: &quot;3.0.0-SNAPSHOT&quot;,
hadoop-build-version: &quot;3.0.0-SNAPSHOT from fcd0702c10ce574b887280476aba63d6682d5271 by zshen source checksum 95874b192923b43cdb96a6e483afd60&quot;,
hadoop-version-built-on: &quot;2015-05-13T19:44Z&quot;
}
</pre></div></div>
</div></div>
<div class="section">
<h2><a name="Domains_.2Fws.2Fv1.2Ftimeline.2Fdomain"></a><a name="REST_API_DOMAINS"></a>Domains <tt>/ws/v1/timeline/domain</tt></h2>
<div class="section">
<h3><a name="Domain_summary_information_.2Fws.2Fv1.2Ftimeline.2Fdomain"></a>Domain summary information <tt>/ws/v1/timeline/domain</tt></h3>
<div>
<div>
<pre class="source">GET /ws/v1/timeline/domain?owner=$OWNER
</pre></div></div>
<p>Returns a list of domains belonging to a specific user, in the JSON-marshalled <tt>TimelineDomains</tt> data structure.</p>
<p>The <tt>owner</tt> MUST be set on a GET which is not authenticated.</p>
<p>On an authenticated request, the <tt>owner</tt> defaults to the caller.</p>
<div>
<div>
<pre class="source">PUT /ws/v1/timeline/domain
</pre></div></div>
<p>A PUT of a serialized <tt>TimelineDomain</tt> structure to this path will add the domain to the list of domains owned by the specified/current user. A successful operation returns status code of 200 and a <tt>TimelinePutResponse</tt> containing no errors.</p></div>
<div class="section">
<h3><a name="Specific_information_about_a_Domain_.2Fws.2Fv1.2Ftimeline.2Fdomain.2F.7BdomainId.7D"></a>Specific information about a Domain <tt>/ws/v1/timeline/domain/{domainId}</tt></h3>
<p>Returns a JSON-marshalled <tt>TimelineDomain</tt> structure describing a domain.</p>
<p>If the domain is not found, then an HTTP 404 response is returned.</p></div>
<div class="section">
<h3><a name="POST_new_domain_.2Fws.2Fv1.2Ftimeline.2Fdomain"></a>POST new domain <tt>/ws/v1/timeline/domain</tt></h3>
<p>Creates a new timeline domain, or overrides an existing one.</p>
<p>When attempting to create a new domain, the ID in the submission MUST be unique across all domains in the cluster.</p>
<p>When attempting to update an existing domain, the ID of that domain must be set. The submitter must have the appropriate permissions to update the domain.</p>
<p>submission: <tt>TimelineDomain</tt></p>
<p>response: <tt>TimelinePutResponse</tt></p></div>
<div class="section">
<h3><a name="List_domains_of_a_user:_GET_.2Fws.2Fv1.2Ftimeline.2Fdomain"></a>List domains of a user: GET <tt>/ws/v1/timeline/domain</tt></h3>
<p>Retrieves a list of all domains of a user.</p>
<p>If an owner is specified, that owner name overrides that of the caller.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Query Parameter </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>owner</tt></td>
<td align="left"> owner of the domains to list</td></tr>
</tbody>
</table>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/timeline/domain?owner=alice
{
&quot;domains&quot;:
[
{
&quot;id&quot;:&quot;DS_DOMAIN_2&quot;,
&quot;owner&quot;:&quot;alice&quot;,
&quot;readers&quot;:&quot;peter&quot;,
&quot;writers&quot;:&quot;john&quot;,
&quot;createdtime&quot;:1430425000337,
&quot;modifiedtime&quot;:1430425000337
},
{
&quot;id&quot;:&quot;DS_DOMAIN_1&quot;,
&quot;owner&quot;:&quot;alice&quot;,
&quot;readers&quot;:&quot;bar&quot;,
&quot;writers&quot;:&quot;foo&quot;,
&quot;createdtime&quot;:1430424955963,
&quot;modifiedtime&quot;:1430424955963
}
,
{&quot;id&quot;:&quot;DEFAULT&quot;,
&quot;description&quot;:&quot;System Default Domain&quot;,
&quot;owner&quot;:&quot;alice&quot;,
&quot;readers&quot;:&quot;*&quot;,
&quot;writers&quot;:&quot;*&quot;,
&quot;createdtime&quot;:1430424022699,
&quot;modifiedtime&quot;:1430424022699
}
]
}
</pre></div></div>
<p>response: <tt>TimelineDomains</tt></p>
<p>If the user lacks the permission to list the domains of the specified owner, an <tt>TimelineDomains</tt> response with no domain listings is returned.</p>
<div class="section">
<h4><a name="Retrieve_details_of_a_specific_domain:_GET_.2Fws.2Fv1.2Ftimeline.2Fdomain.2F.7BdomainId.7D"></a>Retrieve details of a specific domain: GET <tt>/ws/v1/timeline/domain/{domainId}</tt></h4>
<p>Retrieves the details of a single domain</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/timeline/domain/DS_DOMAIN_1
</pre></div></div>
<p>Response: <tt>TimelineDomain</tt></p>
<div>
<div>
<pre class="source">{
&quot;id&quot;:&quot;DS_DOMAIN_1&quot;,
&quot;owner&quot;:&quot;zshen&quot;,
&quot;readers&quot;:&quot;bar&quot;,
&quot;writers&quot;:&quot;foo&quot;,
&quot;createdtime&quot;:1430424955963,
&quot;modifiedtime&quot;:1430424955963
}
</pre></div></div>
<p>If the user lacks the permission to query the details of that domain, a 404, not found exception is returned &#x2014;the same response which is returned if there is no entry with that ID.</p></div></div></div>
<div class="section">
<h2><a name="Posting_Timeline_Entities"></a><a name="REST_API_POST_TIMELINE_ENTITIES"></a> Posting Timeline Entities</h2>
<p>With the Posting Entities API, you can post the entities and events, which contain the per-framework information you want to record, to the timeline server.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/timeline
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">POST
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<p>None</p></div>
<div class="section">
<h3><a name="response:_TimelinePutResponse"></a>response: <tt>TimelinePutResponse</tt></h3></div>
<div class="section">
<h3><a name="Request_Examples:"></a>Request Examples:</h3>
<div class="section">
<h4><a name="JSON_request"></a>JSON request</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">POST http://&lt;timeline server http address:port&gt;/ws/v1/timeline
</pre></div></div>
<p>Request Header:</p>
<div>
<div>
<pre class="source">POST /ws/v1/timeline HTTP/1.1
Accept: application/json
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Request Body:</p>
<div>
<div>
<pre class="source">{
&quot;entities&quot; : [ {
&quot;entity&quot; : &quot;entity id 0&quot;,
&quot;entitytype&quot; : &quot;entity type 0&quot;,
&quot;relatedentities&quot; : {
&quot;test ref type 2&quot; : [ &quot;test ref id 2&quot; ],
&quot;test ref type 1&quot; : [ &quot;test ref id 1&quot; ]
},
&quot;events&quot; : [ {
&quot;timestamp&quot; : 1395818851590,
&quot;eventtype&quot; : &quot;event type 0&quot;,
&quot;eventinfo&quot; : {
&quot;key2&quot; : &quot;val2&quot;,
&quot;key1&quot; : &quot;val1&quot;
}
}, {
&quot;timestamp&quot; : 1395818851590,
&quot;eventtype&quot; : &quot;event type 1&quot;,
&quot;eventinfo&quot; : {
&quot;key2&quot; : &quot;val2&quot;,
&quot;key1&quot; : &quot;val1&quot;
}
} ],
&quot;primaryfilters&quot; : {
&quot;pkey2&quot; : [ &quot;pval2&quot; ],
&quot;pkey1&quot; : [ &quot;pval1&quot; ]
},
&quot;otherinfo&quot; : {
&quot;okey2&quot; : &quot;oval2&quot;,
&quot;okey1&quot; : &quot;oval1&quot;
},
&quot;starttime&quot; : 1395818851588
}, {
&quot;entity&quot; : &quot;entity id 1&quot;,
&quot;entitytype&quot; : &quot;entity type 0&quot;,
&quot;relatedentities&quot; : {
&quot;test ref type 2&quot; : [ &quot;test ref id 2&quot; ],
&quot;test ref type 1&quot; : [ &quot;test ref id 1&quot; ]
},
&quot;events&quot; : [ {
&quot;timestamp&quot; : 1395818851590,
&quot;eventtype&quot; : &quot;event type 0&quot;,
&quot;eventinfo&quot; : {
&quot;key2&quot; : &quot;val2&quot;,
&quot;key1&quot; : &quot;val1&quot;
}
}, {
&quot;timestamp&quot; : 1395818851590,
&quot;eventtype&quot; : &quot;event type 1&quot;,
&quot;eventinfo&quot; : {
&quot;key2&quot; : &quot;val2&quot;,
&quot;key1&quot; : &quot;val1&quot;
}
} ],
&quot;primaryfilters&quot; : {
&quot;pkey2&quot; : [ &quot;pval2&quot; ],
&quot;pkey1&quot; : [ &quot;pval1&quot; ]
},
&quot;otherinfo&quot; : {
&quot;okey2&quot; : &quot;oval2&quot;,
&quot;okey1&quot; : &quot;oval1&quot;
},
&quot;starttime&quot; : 1395818851590
} ]
}
</pre></div></div>
<p>Required fields</p>
<p>Entity: <tt>type</tt> and <tt>id</tt>. <tt>starttime</tt> is required unless the entity contains one or more event). Event: <tt>type</tt> and <tt>timestamp</tt>.</p></div></div></div>
<div class="section">
<h2><a name="Timeline_Entity_List"></a><a name="REST_API_LIST_TIMELINE_ENTITIES"></a>Timeline Entity List</h2>
<p>With the Timeline Entity List API, you can retrieve a list of entity object, sorted by the starting timestamp for the entity, descending. The starting timestamp of an entity can be a timestamp specified by the your application. If it is not explicitly specified, it will be chosen by the store to be the earliest timestamp of the events received in the first post for the entity.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<p>Use the following URI to obtain all the entity objects of a given <tt>entityType</tt>.</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/timeline/{entityType}
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">GET
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<ol style="list-style-type: decimal">
<li><tt>limit</tt> - A limit on the number of entities to return. If null, defaults to 100.</li>
<li><tt>windowStart</tt> - The earliest start timestamp to retrieve (exclusive). If null, defaults to retrieving all entities until the limit is reached.</li>
<li><tt>windowEnd</tt> - The latest start timestamp to retrieve (inclusive). If null, defaults to the max value of Long.</li>
<li><tt>fromId</tt> - If <tt>fromId</tt> is not null, retrieve entities earlier than and including the specified ID. If no start time is found for the specified ID, an empty list of entities will be returned. The <tt>windowEnd</tt> parameter will take precedence if the start time of this entity falls later than <tt>windowEnd</tt>.</li>
<li><tt>fromTs</tt> - If <tt>fromTs</tt> is not null, ignore entities that were inserted into the store after the given timestamp. The entity&#x2019;s insert timestamp used for this comparison is the store&#x2019;s system time when the first put for the entity was received (not the entity&#x2019;s start time).</li>
<li><tt>primaryFilter</tt> - Retrieves only entities that have the specified primary filter. If null, retrieves all entities. This is an indexed retrieval, and no entities that do not match the filter are scanned.</li>
<li><tt>secondaryFilters</tt> - Retrieves only entities that have exact matches for all the specified filters in their primary filters or other info. This is not an indexed retrieval, so all entities are scanned but only those matching the filters are returned.</li>
<li>fields - Specifies which fields of the entity object to retrieve: <tt>EVENTS</tt>, <tt>RELATED_ENTITIES</tt>, <tt>PRIMARY_FILTERS</tt>, <tt>OTHER_INFO</tt>, <tt>LAST_EVENT_ONLY</tt>. If the set of fields contains <tt>LAST_EVENT_ONLY</tt> and not <tt>EVENTS</tt>, the most recent event for each entity is retrieved. If null, retrieves all fields.</li>
</ol>
<p>Note that the value of the key/value pair for <tt>primaryFilter</tt> and <tt>secondaryFilters</tt> parameters can be of different data types, and matching is data type sensitive. Users need to format the value properly. For example, <tt>123</tt> and <tt>&quot;123&quot;</tt> means an integer and a string respectively. If the entity has a string <tt>&quot;123&quot;</tt> for <tt>primaryFilter</tt>, but the parameter is set to the integer <tt>123</tt>, the entity will not be matched. Similarly, <tt>true</tt> means a boolean while <tt>&quot;true&quot;</tt> means a string. In general, the value will be casted as a certain Java type in consistent with <tt>jackson</tt> library parsing a JSON clip.</p></div>
<div class="section">
<h3><a name="Elements_of_the_entities_.28Timeline_Entity_List.29_Object"></a>Elements of the <tt>entities</tt> (Timeline Entity List) Object</h3>
<p>When you make a request for the list of timeline entities, the information will be returned as a collection of container objects. See also <tt>Timeline Entity</tt> for syntax of the timeline entity object.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description</th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>entities</tt> </td>
<td align="left"> array of timeline entity objects(JSON) </td>
<td align="left"> The collection of timeline entity objects </td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/timeline/DS_APP_ATTEMPT
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
&quot;entities&quot;:[
{
&quot;entitytype&quot;:&quot;DS_APP_ATTEMPT&quot;,
&quot;entity&quot;:&quot;appattempt_1430424020775_0004_000001&quot;,
&quot;events&quot;:[
{
&quot;timestamp&quot;:1430425008796,
&quot;eventtype&quot;:&quot;DS_APP_ATTEMPT_END&quot;,
&quot;eventinfo&quot;: { }
}
{
&quot;timestamp&quot;:1430425004161,
&quot;eventtype&quot;:&quot;DS_APP_ATTEMPT_START&quot;,
&quot;eventinfo&quot;: { }
}
]
&quot;starttime&quot;:1430425004161,
&quot;domain&quot;:&quot;DS_DOMAIN_2&quot;,
&quot;relatedentities&quot;: { },
&quot;primaryfilters&quot;:
{
&quot;user&quot;:[&quot;zshen&quot;]
},
&quot;otherinfo&quot;: { }
}
{
&quot;entitytype&quot;:&quot;DS_APP_ATTEMPT&quot;,
&quot;entity&quot;:&quot;appattempt_1430424020775_0003_000001&quot;,
&quot;starttime&quot;:1430424959169,
&quot;domain&quot;:&quot;DS_DOMAIN_1&quot;,
&quot;events&quot;:[
{
&quot;timestamp&quot;:1430424963836,
&quot;eventinfo&quot;: { }
}
{
&quot;timestamp&quot;:1430424959169,
&quot;eventinfo&quot;: { }
}
]
&quot;relatedentities&quot;: { },
&quot;primaryfilters&quot;: {
&quot;user&quot;:[&quot;zshen&quot;]
},
&quot;otherinfo&quot;: { }
}
]
}
</pre></div></div>
</div></div></div>
<div class="section">
<h2><a name="Timeline_Entity"></a><a name="REST_API_GET_TIMELINE_ENTITY"></a>Timeline Entity</h2>
<p>With the Timeline Entity API, you can retrieve the entity information for a given entity identifier.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<p>Use the following URI to obtain the entity object identified by the <tt>entityType</tt> value and the <tt>entityId</tt> value.</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/timeline/{entityType}/{entityId}
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">GET
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<ol style="list-style-type: decimal">
<li>fields - Specifies which fields of the entity object to retrieve: <tt>EVENTS</tt>, <tt>RELATED_ENTITIES</tt>, <tt>PRIMARY_FILTERS</tt>, <tt>OTHER_INFO</tt>, <tt>LAST_EVENT_ONLY</tt>. If the set of fields contains LAST_EVENT_ONLY and not EVENTS, the most recent event for each entity is retrieved. If null, retrieves all fields.</li>
</ol></div>
<div class="section">
<h3><a name="Elements_of_the_entity_.28Timeline_Entity.29_Object:"></a>Elements of the <tt>entity</tt> (Timeline Entity) Object:</h3>
<p>See also <tt>Timeline Event List</tt> for syntax of the timeline event object. Note that <tt>value</tt> of <tt>primaryfilters</tt> and <tt>otherinfo</tt> is an Object instead of a String.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description</th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>entity</tt> </td>
<td align="left"> string </td>
<td align="left"> The entity id </td></tr>
<tr class="a">
<td align="left"> <tt>entitytype</tt> </td>
<td align="left"> string </td>
<td align="left"> The entity type </td></tr>
<tr class="b">
<td align="left"> <tt>relatedentities</tt> </td>
<td align="left"> map </td>
<td align="left"> The related entities&#x2019; identifiers, which are organized in a map of entityType : [entity1, entity2, &#x2026;] </td></tr>
<tr class="a">
<td align="left"> <tt>events</tt> </td>
<td align="left"> list </td>
<td align="left"> The events of the entity </td></tr>
<tr class="b">
<td align="left"> <tt>primaryfilters</tt> </td>
<td align="left"> map </td>
<td align="left"> The primary filters of the entity, which are organized in a map of key : [value1, value2, &#x2026;] </td></tr>
<tr class="a">
<td align="left"> <tt>otherinfo</tt> </td>
<td align="left"> map </td>
<td align="left"> The other information of the entity, which is organized in a map of key : value </td></tr>
<tr class="b">
<td align="left"> <tt>starttime</tt> </td>
<td align="left"> long </td>
<td align="left"> The start time of the entity </td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/timeline/DS_APP_ATTEMPT/appattempt_1430424020775_0003_000001
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
&quot;events&quot;:[
{
&quot;timestamp&quot;:1430424959169,
&quot;eventtype&quot;:&quot;DS_APP_ATTEMPT_START&quot;,
&quot;eventinfo&quot;: {}}],
&quot;entitytype&quot;:&quot;DS_APP_ATTEMPT&quot;,
&quot;entity&quot;:&quot;appattempt_1430424020775_0003_000001&quot;,
&quot;starttime&quot;:1430424959169,
&quot;domain&quot;:&quot;DS_DOMAIN_1&quot;,
&quot;relatedentities&quot;: {},
&quot;primaryfilters&quot;: {
&quot;user&quot;:[&quot;zshen&quot;]
},
&quot;otherinfo&quot;: {}
}
]
}
</pre></div></div>
</div></div></div>
<div class="section">
<h2><a name="Timeline_Event_List"></a><a name="REST_API_LIST_TIMELINE_EVENTS"></a>Timeline Event List</h2>
<p>With the Timeline Events API, you can retrieve the event objects for a list of entities all of the same entity type. The events for each entity are sorted in order of their timestamps, descending.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<p>Use the following URI to obtain the event objects of the given <tt>entityType</tt>.</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/timeline/{entityType}/events
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">GET
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<ol style="list-style-type: decimal">
<li><tt>entityId</tt> - The entity IDs to retrieve events for. If null, no events will be returned. Multiple entityIds can be given as comma separated values.</li>
<li><tt>limit</tt> - A limit on the number of events to return for each entity. If null, defaults to 100 events per entity.</li>
<li><tt>windowStart</tt> - If not null, retrieves only events later than the given time (exclusive)</li>
<li><tt>windowEnd</tt> - If not null, retrieves only events earlier than the given time (inclusive)</li>
<li><tt>eventType</tt> - Restricts the events returned to the given types. If null, events of all types will be returned. Multiple eventTypes can be given as comma separated values.</li>
</ol></div>
<div class="section">
<h3><a name="Elements_of_the_events_.28Timeline_Entity_List.29_Object"></a>Elements of the <tt>events</tt> (Timeline Entity List) Object</h3>
<p>When you make a request for the list of timeline events, the information will be returned as a collection of event objects.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description</th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>events</tt> </td>
<td align="left"> array of timeline event objects(JSON) </td>
<td align="left"> The collection of timeline event objects </td></tr>
</tbody>
</table>
<p>Below is the elements of a single event object. Note that <tt>value</tt> of <tt>eventinfo</tt> and <tt>otherinfo</tt> is an Object instead of a String.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description</th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>eventtype</tt> </td>
<td align="left"> string </td>
<td align="left"> The event type </td></tr>
<tr class="a">
<td align="left"> <tt>eventinfo</tt> </td>
<td align="left"> map </td>
<td align="left"> The information of the event, which is orgainzied in a map of <tt>key</tt> : <tt>value</tt> </td></tr>
<tr class="b">
<td align="left"> <tt>timestamp</tt> </td>
<td align="left"> long </td>
<td align="left"> The timestamp of the event </td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/timeline/DS_APP_ATTEMPT/events?entityId=appattempt_1430424020775_0003_000001
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
&quot;events&quot;: [
{
&quot;entity&quot;:&quot;appattempt_1430424020775_0003_000001&quot;,
&quot;entitytype&quot;:&quot;DS_APP_ATTEMPT&quot;}
&quot;events&quot;:[
{
&quot;timestamp&quot;:1430424963836,
&quot;eventtype&quot;:&quot;DS_APP_ATTEMPT_END&quot;,
&quot;eventinfo&quot;:{}},
{
&quot;timestamp&quot;:1430424959169,
&quot;eventtype&quot;:&quot;DS_APP_ATTEMPT_START&quot;,
&quot;eventinfo&quot;:{}}
],
}
]
}
</pre></div></div>
<h1><a name="GENERIC_DATA_REST_APIS"></a> Generic Data REST APIs</h1>
<p>Users can access the generic historic information of applications via REST APIs.</p></div></div></div>
<div class="section">
<h2><a name="About"></a><a name="REST_API_ABOUT"></a>About</h2>
<p>With the about API, you can get an timeline about resource that contains generic history REST API description and version information.</p>
<p>It is essentially a XML/JSON-serialized form of the YARN <tt>TimelineAbout</tt> structure.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<p>Use the following URI to obtain an timeline about object.</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/applicationhistory/about
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">GET
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<p>None</p></div>
<div class="section">
<h3><a name="Elements_of_the_about_.28Application.29_Object:"></a>Elements of the <tt>about</tt> (Application) Object:</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>About</tt> </td>
<td align="left"> string </td>
<td align="left"> The description about the service </td></tr>
<tr class="a">
<td align="left"> <tt>timeline-service-version</tt> </td>
<td align="left"> string </td>
<td align="left"> The timeline service version </td></tr>
<tr class="b">
<td align="left"> <tt>timeline-service-build-version</tt> </td>
<td align="left"> string </td>
<td align="left"> The timeline service build version </td></tr>
<tr class="a">
<td align="left"> <tt>timeline-service-version-built-on</tt> </td>
<td align="left"> string </td>
<td align="left"> On what time the timeline service is built </td></tr>
<tr class="b">
<td align="left"> <tt>hadoop-version</tt> </td>
<td align="left"> string </td>
<td align="left"> Hadoop version </td></tr>
<tr class="a">
<td align="left"> <tt>hadoop-build-version</tt> </td>
<td align="left"> string </td>
<td align="left"> Hadoop build version </td></tr>
<tr class="b">
<td align="left"> <tt>hadoop-version-built-on</tt> </td>
<td align="left"> string </td>
<td align="left"> On what time Hadoop is built </td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">http://localhost:8188/ws/v1/applicationhistory/about
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
About: &quot;Generic History Service API&quot;,
timeline-service-version: &quot;3.0.0-SNAPSHOT&quot;,
timeline-service-build-version: &quot;3.0.0-SNAPSHOT from fcd0702c10ce574b887280476aba63d6682d5271 by zshen source checksum e9ec74ea3ff7bc9f3d35e9cac694fb&quot;,
timeline-service-version-built-on: &quot;2015-05-13T19:45Z&quot;,
hadoop-version: &quot;3.0.0-SNAPSHOT&quot;,
hadoop-build-version: &quot;3.0.0-SNAPSHOT from fcd0702c10ce574b887280476aba63d6682d5271 by zshen source checksum 95874b192923b43cdb96a6e483afd60&quot;,
hadoop-version-built-on: &quot;2015-05-13T19:44Z&quot;
}
</pre></div></div>
</div>
<div class="section">
<h4><a name="XML_response"></a>XML response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/applicationhistory/about
Accept: application/xml
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 748
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;about&gt;
&lt;About&gt;Generic History Service API&lt;/About&gt;
&lt;hadoop-build-version&gt;3.0.0-SNAPSHOT from fcd0702c10ce574b887280476aba63d6682d5271 by zshen source checksum 95874b192923b43cdb96a6e483afd60&lt;/hadoop-build-version&gt;
&lt;hadoop-version&gt;3.0.0-SNAPSHOT&lt;/hadoop-version&gt;
&lt;hadoop-version-built-on&gt;2015-05-13T19:44Z&lt;/hadoop-version-built-on&gt;
&lt;timeline-service-build-version&gt;3.0.0-SNAPSHOT from fcd0702c10ce574b887280476aba63d6682d5271 by zshen source checksum e9ec74ea3ff7bc9f3d35e9cac694fb&lt;/timeline-service-build-version&gt;
&lt;timeline-service-version&gt;3.0.0-SNAPSHOT&lt;/timeline-service-version&gt;
&lt;timeline-service-version-built-on&gt;2015-05-13T19:45Z&lt;/timeline-service-version-built-on&gt;
&lt;/about&gt;
</pre></div></div>
</div></div></div>
<div class="section">
<h2><a name="Application_List"></a><a name="REST_API_LIST_APPLICATIONS"></a>Application List</h2>
<p>With the Application List API, you can obtain a collection of resources, each of which represents an application. When you run a GET operation on this resource, you obtain a collection of application objects.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/applicationhistory/apps
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">GET
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<ol style="list-style-type: decimal">
<li>
<p><tt>states</tt> - applications matching the given application states, specified as a comma-separated list</p>
</li>
<li>
<p><tt>finalStatus</tt> - the final status of the application - reported by the application itself</p>
</li>
<li>
<p><tt>user</tt> - user name</p>
</li>
<li>
<p><tt>queue</tt> - queue name</p>
</li>
<li>
<p><tt>limit</tt> - total number of app objects to be returned</p>
</li>
<li>
<p><tt>startedTimeBegin</tt> - applications with start time beginning with this time, specified in ms since epoch</p>
</li>
<li>
<p><tt>startedTimeEnd</tt> - applications with start time ending with this time, specified in ms since epoch</p>
</li>
<li>
<p><tt>finishedTimeBegin</tt> - applications with finish time beginning with this time, specified in ms since epoch</p>
</li>
<li>
<p><tt>finishedTimeEnd</tt> - applications with finish time ending with this time, specified in ms since epoch</p>
</li>
<li>
<p><tt>applicationTypes</tt> - applications matching the given application types, specified as a comma-separated list</p>
</li>
</ol></div>
<div class="section">
<h3><a name="Elements_of_the_apps_.28Application_List.29_Object"></a>Elements of the <tt>apps</tt> (Application List) Object</h3>
<p>When you make a request for the list of applications, the information will be returned as a collection of application objects. See also <tt>Application</tt> for syntax of the application object.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>app</tt> </td>
<td align="left"> array of app objects(JSON)/zero or more application objects(XML) </td>
<td align="left"> The collection of application objects </td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://&lt;timeline server http address:port&gt;/ws/v1/applicationhistory/apps
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
&quot;app&quot;:
[
{
&quot;appId&quot;:&quot;application_1430424020775_0004&quot;,
&quot;currentAppAttemptId&quot;:&quot;appattempt_1430424020775_0004_000001&quot;,
&quot;user&quot;:&quot;zshen&quot;,
&quot;name&quot;:&quot;DistributedShell&quot;,
&quot;queue&quot;:&quot;default&quot;,
&quot;type&quot;:&quot;YARN&quot;,
&quot;host&quot;:&quot;d-69-91-129-173.dhcp4.washington.edu/69.91.129.173&quot;,
&quot;rpcPort&quot;:-1,
&quot;appState&quot;:&quot;FINISHED&quot;,
&quot;progress&quot;:100.0,
&quot;diagnosticsInfo&quot;:&quot;&quot;,
&quot;originalTrackingUrl&quot;:&quot;N/A&quot;,
&quot;trackingUrl&quot;:&quot;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0004/&quot;,
&quot;finalAppStatus&quot;:&quot;SUCCEEDED&quot;,
&quot;submittedTime&quot;:1430425001004,
&quot;startedTime&quot;:1430425001004,
&quot;finishedTime&quot;:1430425008861,
&quot;elapsedTime&quot;:7857,
&quot;unmanagedApplication&quot;:&quot;false&quot;,
&quot;applicationPriority&quot;:0,
&quot;appNodeLabelExpression&quot;:&quot;&quot;,
&quot;amNodeLabelExpression&quot;:&quot;&quot;
},
{
&quot;appId&quot;:&quot;application_1430424020775_0003&quot;,
&quot;currentAppAttemptId&quot;:&quot;appattempt_1430424020775_0003_000001&quot;,
&quot;user&quot;:&quot;zshen&quot;,
&quot;name&quot;:&quot;DistributedShell&quot;,
&quot;queue&quot;:&quot;default&quot;,
&quot;type&quot;:&quot;YARN&quot;,
&quot;host&quot;:&quot;d-69-91-129-173.dhcp4.washington.edu/69.91.129.173&quot;,
&quot;rpcPort&quot;:-1,
&quot;appState&quot;:&quot;FINISHED&quot;,
&quot;progress&quot;:100.0,
&quot;diagnosticsInfo&quot;:&quot;&quot;,
&quot;originalTrackingUrl&quot;:&quot;N/A&quot;,
&quot;trackingUrl&quot;:&quot;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0003/&quot;,
&quot;finalAppStatus&quot;:&quot;SUCCEEDED&quot;,
&quot;submittedTime&quot;:1430424956650,
&quot;startedTime&quot;:1430424956650,
&quot;finishedTime&quot;:1430424963907,
&quot;elapsedTime&quot;:7257,
&quot;unmanagedApplication&quot;:&quot;false&quot;,
&quot;applicationPriority&quot;:0,
&quot;appNodeLabelExpression&quot;:&quot;&quot;,
&quot;amNodeLabelExpression&quot;:&quot;&quot;
},
{
&quot;appId&quot;:&quot;application_1430424020775_0002&quot;,
&quot;currentAppAttemptId&quot;:&quot;appattempt_1430424020775_0002_000001&quot;,
&quot;user&quot;:&quot;zshen&quot;,
&quot;name&quot;:&quot;DistributedShell&quot;,
&quot;queue&quot;:&quot;default&quot;,
&quot;type&quot;:&quot;YARN&quot;,
&quot;host&quot;:&quot;d-69-91-129-173.dhcp4.washington.edu/69.91.129.173&quot;,
&quot;rpcPort&quot;:-1,
&quot;appState&quot;:&quot;FINISHED&quot;,
&quot;progress&quot;:100.0,
&quot;diagnosticsInfo&quot;:&quot;&quot;,
&quot;originalTrackingUrl&quot;:&quot;N/A&quot;,
&quot;trackingUrl&quot;:&quot;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0002/&quot;,
&quot;finalAppStatus&quot;:&quot;SUCCEEDED&quot;,
&quot;submittedTime&quot;:1430424769395,
&quot;startedTime&quot;:1430424769395,
&quot;finishedTime&quot;:1430424776594,
&quot;elapsedTime&quot;:7199,
&quot;unmanagedApplication&quot;:&quot;false&quot;,
&quot;applicationPriority&quot;:0,
&quot;appNodeLabelExpression&quot;:&quot;&quot;,
&quot;amNodeLabelExpression&quot;:&quot;&quot;
},
{
&quot;appId&quot;:&quot;application_1430424020775_0001&quot;,
&quot;currentAppAttemptId&quot;:&quot;appattempt_1430424020775_0001_000001&quot;,
&quot;user&quot;:&quot;zshen&quot;,
&quot;name&quot;:&quot;QuasiMonteCarlo&quot;,
&quot;queue&quot;:&quot;default&quot;,
&quot;type&quot;:&quot;MAPREDUCE&quot;,
&quot;host&quot;:&quot;localhost&quot;,
&quot;rpcPort&quot;:56264,
&quot;appState&quot;:&quot;FINISHED&quot;,
&quot;progress&quot;:100.0,
&quot;diagnosticsInfo&quot;:&quot;&quot;,
&quot;originalTrackingUrl&quot;:&quot;http://d-69-91-129-173.dhcp4.washington.edu:19888/jobhistory/job/job_1430424020775_0001&quot;,
&quot;trackingUrl&quot;:&quot;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0001/&quot;,
&quot;finalAppStatus&quot;:&quot;SUCCEEDED&quot;,
&quot;submittedTime&quot;:1430424053809,
&quot;startedTime&quot;:1430424072153,
&quot;finishedTime&quot;:1430424776594,
&quot;elapsedTime&quot;:18344,
&quot;applicationTags&quot;:&quot;mrapplication,ta-example&quot;,
&quot;unmanagedApplication&quot;:&quot;false&quot;,
&quot;applicationPriority&quot;:0,
&quot;appNodeLabelExpression&quot;:&quot;&quot;,
&quot;amNodeLabelExpression&quot;:&quot;&quot;
}
]
}
</pre></div></div>
</div>
<div class="section">
<h4><a name="XML_response"></a>XML response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/applicationhistory/apps
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1710
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;apps&gt;
&lt;app&gt;
&lt;appId&gt;application_1430424020775_0004&lt;/appId&gt;
&lt;currentAppAttemptId&gt;appattempt_1430424020775_0004_000001&lt;/currentAppAttemptId&gt;
&lt;user&gt;zshen&lt;/user&gt;
&lt;name&gt;DistributedShell&lt;/name&gt;
&lt;queue&gt;default&lt;/queue&gt;
&lt;type&gt;YARN&lt;/type&gt;
&lt;host&gt;d-69-91-129-173.dhcp4.washington.edu/69.91.129.173&lt;/host&gt;
&lt;rpcPort&gt;-1&lt;/rpcPort&gt;
&lt;appState&gt;FINISHED&lt;/appState&gt;
&lt;progress&gt;100.0&lt;/progress&gt;
&lt;diagnosticsInfo&gt;&lt;/diagnosticsInfo&gt;
&lt;originalTrackingUrl&gt;N/A&lt;/originalTrackingUrl&gt;
&lt;trackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0004/&lt;/trackingUrl&gt;
&lt;finalAppStatus&gt;SUCCEEDED&lt;/finalAppStatus&gt;
&lt;submittedTime&gt;1430425001004&lt;/submittedTime&gt;
&lt;startedTime&gt;1430425001004&lt;/startedTime&gt;
&lt;finishedTime&gt;1430425008861&lt;/finishedTime&gt;
&lt;elapsedTime&gt;7857&lt;/elapsedTime&gt;
&lt;unmanagedApplication&gt;false&lt;/unmanagedApplication&gt;
&lt;applicationPriority&gt;0&lt;/applicationPriority&gt;
&lt;appNodeLabelExpression&gt;&lt;/appNodeLabelExpression&gt;
&lt;amNodeLabelExpression&gt;&lt;/amNodeLabelExpression&gt;
&lt;/app&gt;
&lt;app&gt;
&lt;appId&gt;application_1430424020775_0003&lt;/appId&gt;
&lt;currentAppAttemptId&gt;appattempt_1430424020775_0003_000001&lt;/currentAppAttemptId&gt;
&lt;user&gt;zshen&lt;/user&gt;
&lt;name&gt;DistributedShell&lt;/name&gt;
&lt;queue&gt;default&lt;/queue&gt;
&lt;type&gt;YARN&lt;/type&gt;
&lt;host&gt;d-69-91-129-173.dhcp4.washington.edu/69.91.129.173&lt;/host&gt;
&lt;rpcPort&gt;-1&lt;/rpcPort&gt;
&lt;appState&gt;FINISHED&lt;/appState&gt;
&lt;progress&gt;100.0&lt;/progress&gt;
&lt;diagnosticsInfo&gt;&lt;/diagnosticsInfo&gt;
&lt;originalTrackingUrl&gt;N/A&lt;/originalTrackingUrl&gt;
&lt;trackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0003/&lt;/trackingUrl&gt;
&lt;finalAppStatus&gt;SUCCEEDED&lt;/finalAppStatus&gt;
&lt;submittedTime&gt;1430424956650&lt;/submittedTime&gt;
&lt;startedTime&gt;1430424956650&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424963907&lt;/finishedTime&gt;
&lt;elapsedTime&gt;7257&lt;/elapsedTime&gt;
&lt;unmanagedApplication&gt;false&lt;/unmanagedApplication&gt;
&lt;applicationPriority&gt;0&lt;/applicationPriority&gt;
&lt;appNodeLabelExpression&gt;&lt;/appNodeLabelExpression&gt;
&lt;amNodeLabelExpression&gt;&lt;/amNodeLabelExpression&gt;
&lt;/app&gt;
&lt;app&gt;
&lt;appId&gt;application_1430424020775_0002&lt;/appId&gt;
&lt;currentAppAttemptId&gt;appattempt_1430424020775_0002_000001&lt;/currentAppAttemptId&gt;
&lt;user&gt;zshen&lt;/user&gt;
&lt;name&gt;DistributedShell&lt;/name&gt;
&lt;queue&gt;default&lt;/queue&gt;
&lt;type&gt;YARN&lt;/type&gt;
&lt;host&gt;d-69-91-129-173.dhcp4.washington.edu/69.91.129.173&lt;/host&gt;
&lt;rpcPort&gt;-1&lt;/rpcPort&gt;
&lt;appState&gt;FINISHED&lt;/appState&gt;
&lt;progress&gt;100.0&lt;/progress&gt;
&lt;diagnosticsInfo&gt;&lt;/diagnosticsInfo&gt;
&lt;originalTrackingUrl&gt;N/A&lt;/originalTrackingUrl&gt;
&lt;trackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0002/&lt;/trackingUrl&gt;
&lt;finalAppStatus&gt;SUCCEEDED&lt;/finalAppStatus&gt;
&lt;submittedTime&gt;1430424769395&lt;/submittedTime&gt;
&lt;startedTime&gt;1430424769395&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424776594&lt;/finishedTime&gt;
&lt;elapsedTime&gt;7199&lt;/elapsedTime&gt;
&lt;unmanagedApplication&gt;false&lt;/unmanagedApplication&gt;
&lt;applicationPriority&gt;0&lt;/applicationPriority&gt;
&lt;appNodeLabelExpression&gt;&lt;/appNodeLabelExpression&gt;
&lt;amNodeLabelExpression&gt;&lt;/amNodeLabelExpression&gt;
&lt;/app&gt;
&lt;app&gt;
&lt;appId&gt;application_1430424020775_0001&lt;/appId&gt;
&lt;currentAppAttemptId&gt;appattempt_1430424020775_0001_000001&lt;/currentAppAttemptId&gt;
&lt;user&gt;zshen&lt;/user&gt;
&lt;name&gt;QuasiMonteCarlo&lt;/name&gt;
&lt;queue&gt;default&lt;/queue&gt;
&lt;type&gt;MAPREDUCE&lt;/type&gt;
&lt;host&gt;localhost&lt;/host&gt;
&lt;rpcPort&gt;56264&lt;/rpcPort&gt;
&lt;appState&gt;FINISHED&lt;/appState&gt;
&lt;progress&gt;100.0&lt;/progress&gt;
&lt;diagnosticsInfo&gt;&lt;/diagnosticsInfo&gt;
&lt;originalTrackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:19888/jobhistory/job/job_1430424020775_0001&lt;/originalTrackingUrl&gt;
&lt;trackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0001/&lt;/trackingUrl&gt;
&lt;finalAppStatus&gt;SUCCEEDED&lt;/finalAppStatus&gt;
&lt;submittedTime&gt;1430424053809&lt;/submittedTime&gt;
&lt;startedTime&gt;1430424053809&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424072153&lt;/finishedTime&gt;
&lt;elapsedTime&gt;18344&lt;/elapsedTime&gt;
&lt;applicationTags&gt;mrapplication,ta-example&lt;/applicationTags&gt;
&lt;unmanagedApplication&gt;false&lt;/unmanagedApplication&gt;
&lt;applicationPriority&gt;0&lt;/applicationPriority&gt;
&lt;appNodeLabelExpression&gt;&lt;/appNodeLabelExpression&gt;
&lt;amNodeLabelExpression&gt;&lt;/amNodeLabelExpression&gt;
&lt;/app&gt;
&lt;/apps&gt;
</pre></div></div>
</div></div></div>
<div class="section">
<h2><a name="Application"></a><a name="REST_API_GET_APPLICATION"></a>Application</h2>
<p>With the Application API, you can get an application resource contains information about a particular application that was running on an YARN cluster.</p>
<p>It is essentially a XML/JSON-serialized form of the YARN <tt>ApplicationReport</tt> structure.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<p>Use the following URI to obtain an application object identified by the <tt>appid</tt> value.</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/applicationhistory/apps/{appid}
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">GET
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<p>None</p></div>
<div class="section">
<h3><a name="Elements_of_the_app_.28Application.29_Object:"></a>Elements of the <tt>app</tt> (Application) Object:</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>appId</tt> </td>
<td align="left"> string </td>
<td align="left"> The application ID </td></tr>
<tr class="a">
<td align="left"> <tt>user</tt> </td>
<td align="left"> string </td>
<td align="left"> The user who started the application </td></tr>
<tr class="b">
<td align="left"> <tt>name</tt> </td>
<td align="left"> string </td>
<td align="left"> The application name </td></tr>
<tr class="a">
<td align="left"> <tt>type</tt> </td>
<td align="left"> string </td>
<td align="left"> The application type </td></tr>
<tr class="b">
<td align="left"> <tt>queue</tt> </td>
<td align="left"> string </td>
<td align="left"> The queue to which the application submitted </td></tr>
<tr class="a">
<td align="left"> <tt>appState</tt> </td>
<td align="left"> string </td>
<td align="left"> The application state according to the ResourceManager - valid values are members of the YarnApplicationState enum: <tt>FINISHED</tt>, <tt>FAILED</tt>, <tt>KILLED</tt> </td></tr>
<tr class="b">
<td align="left"> <tt>finalStatus</tt> </td>
<td align="left"> string </td>
<td align="left"> The final status of the application if finished - reported by the application itself - valid values are: <tt>UNDEFINED</tt>, <tt>SUCCEEDED</tt>, <tt>FAILED</tt>, <tt>KILLED</tt> </td></tr>
<tr class="a">
<td align="left"> <tt>progress</tt> </td>
<td align="left"> float </td>
<td align="left"> The reported progress of the application as a percent. Long-lived YARN services may not provide a meaninful value here &#x2014;or use it as a metric of actual vs desired container counts </td></tr>
<tr class="b">
<td align="left"> <tt>trackingUrl</tt> </td>
<td align="left"> string </td>
<td align="left"> The web URL of the application (via the RM Proxy) </td></tr>
<tr class="a">
<td align="left"> <tt>originalTrackingUrl</tt> </td>
<td align="left"> string </td>
<td align="left"> The actual web URL of the application </td></tr>
<tr class="b">
<td align="left"> <tt>diagnosticsInfo</tt> </td>
<td align="left"> string </td>
<td align="left"> Detailed diagnostics information on a completed application</td></tr>
<tr class="a">
<td align="left"> <tt>startedTime</tt> </td>
<td align="left"> long </td>
<td align="left"> The time in which application started (in ms since epoch) </td></tr>
<tr class="b">
<td align="left"> <tt>finishedTime</tt> </td>
<td align="left"> long </td>
<td align="left"> The time in which the application finished (in ms since epoch) </td></tr>
<tr class="a">
<td align="left"> <tt>elapsedTime</tt> </td>
<td align="left"> long </td>
<td align="left"> The elapsed time since the application started (in ms) </td></tr>
<tr class="b">
<td align="left"> <tt>allocatedMB</tt> </td>
<td align="left"> int </td>
<td align="left"> The sum of memory in MB allocated to the application&#x2019;s running containers </td></tr>
<tr class="a">
<td align="left"> <tt>allocatedVCores</tt> </td>
<td align="left"> int </td>
<td align="left"> The sum of virtual cores allocated to the application&#x2019;s running containers </td></tr>
<tr class="b">
<td align="left"> <tt>currentAppAttemptId</tt> </td>
<td align="left"> string </td>
<td align="left"> The latest application attempt ID </td></tr>
<tr class="a">
<td align="left"> <tt>host</tt> </td>
<td align="left"> string </td>
<td align="left"> The host of the ApplicationMaster </td></tr>
<tr class="b">
<td align="left"> <tt>rpcPort</tt> </td>
<td align="left"> int </td>
<td align="left"> The RPC port of the ApplicationMaster; zero if no IPC service declared </td></tr>
<tr class="a">
<td align="left"> <tt>applicationTags</tt> </td>
<td align="left"> string </td>
<td align="left"> The application tags. </td></tr>
<tr class="b">
<td align="left"> <tt>unmanagedApplication</tt> </td>
<td align="left"> boolean </td>
<td align="left"> Is the application unmanaged. </td></tr>
<tr class="a">
<td align="left"> <tt>applicationPriority</tt> </td>
<td align="left"> int </td>
<td align="left"> Priority of the submitted application. </td></tr>
<tr class="b">
<td align="left"> <tt>appNodeLabelExpression</tt> </td>
<td align="left"> string </td>
<td align="left">Node Label expression which is used to identify the nodes on which application&#x2019;s containers are expected to run by default.</td></tr>
<tr class="a">
<td align="left"> <tt>amNodeLabelExpression</tt> </td>
<td align="left"> string </td>
<td align="left"> Node Label expression which is used to identify the node on which application&#x2019;s AM container is expected to run.</td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">http://localhost:8188/ws/v1/applicationhistory/apps/application_1430424020775_0001
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
&quot;appId&quot;: &quot;application_1430424020775_0001&quot;,
&quot;currentAppAttemptId&quot;: &quot;appattempt_1430424020775_0001_000001&quot;,
&quot;user&quot;: &quot;zshen&quot;,
&quot;name&quot;: &quot;QuasiMonteCarlo&quot;,
&quot;queue&quot;: &quot;default&quot;,
&quot;type&quot;: &quot;MAPREDUCE&quot;,
&quot;host&quot;: &quot;localhost&quot;,
&quot;rpcPort&quot;: 56264,
&quot;appState&quot;: &quot;FINISHED&quot;,
&quot;progress&quot;: 100.0,
&quot;diagnosticsInfo&quot;: &quot;&quot;,
&quot;originalTrackingUrl&quot;: &quot;http://d-69-91-129-173.dhcp4.washington.edu:19888/jobhistory/job/job_1430424020775_0001&quot;,
&quot;trackingUrl&quot;: &quot;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0001/&quot;,
&quot;finalAppStatus&quot;: &quot;SUCCEEDED&quot;,
&quot;submittedTime&quot;: 1430424053809,
&quot;startedTime&quot;: 1430424053809,
&quot;finishedTime&quot;: 1430424072153,
&quot;elapsedTime&quot;: 18344,
&quot;applicationTags&quot;: mrapplication,tag-example,
&quot;unmanagedApplication&quot;: &quot;false&quot;,
&quot;applicationPriority&quot;: 0,
&quot;appNodeLabelExpression&quot;: &quot;&quot;,
&quot;amNodeLabelExpression&quot;: &quot;&quot;
}
</pre></div></div>
</div>
<div class="section">
<h4><a name="XML_response"></a>XML response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/applicationhistory/apps/application_1430424020775_0001
Accept: application/xml
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 873
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;app&gt;
&lt;appId&gt;application_1430424020775_0001&lt;/appId&gt;
&lt;currentAppAttemptId&gt;appattempt_1430424020775_0001_000001&lt;/currentAppAttemptId&gt;
&lt;user&gt;zshen&lt;/user&gt;
&lt;name&gt;QuasiMonteCarlo&lt;/name&gt;
&lt;queue&gt;default&lt;/queue&gt;
&lt;type&gt;MAPREDUCE&lt;/type&gt;
&lt;host&gt;localhost&lt;/host&gt;
&lt;rpcPort&gt;56264&lt;/rpcPort&gt;
&lt;appState&gt;FINISHED&lt;/appState&gt;
&lt;progress&gt;100.0&lt;/progress&gt;
&lt;diagnosticsInfo&gt;&lt;/diagnosticsInfo&gt;
&lt;originalTrackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:19888/jobhistory/job/job_1430424020775_0001&lt;/originalTrackingUrl&gt;
&lt;trackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0001/&lt;/trackingUrl&gt;
&lt;finalAppStatus&gt;SUCCEEDED&lt;/finalAppStatus&gt;
&lt;submittedTime&gt;1430424053809&lt;/submittedTime&gt;
&lt;startedTime&gt;1430424053809&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424072153&lt;/finishedTime&gt;
&lt;elapsedTime&gt;18344&lt;/elapsedTime&gt;
&lt;applicationTags&gt;mrapplication,ta-example&lt;/applicationTags&gt;
&lt;unmanagedApplication&gt;false&lt;/unmanagedApplication&gt;
&lt;applicationPriority&gt;0&lt;/applicationPriority&gt;
&lt;appNodeLabelExpression&gt;&lt;appNodeLabelExpression&gt;
&lt;amNodeLabelExpression&gt;&lt;amNodeLabelExpression&gt;
&lt;/app&gt;
</pre></div></div>
</div></div></div>
<div class="section">
<h2><a name="Application_Attempt_List"></a><a name="REST_API_APPLICATION_ATTEMPT_LIST"></a>Application Attempt List</h2>
<p>With the Application Attempt List API, you can obtain a collection of resources, each of which represents an application attempt. When you run a GET operation on this resource, you obtain a collection of application attempt objects.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<p>Use the following URI to obtain all the attempt objects of an application identified by the <tt>appid</tt> value.</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/applicationhistory/apps/{appid}/appattempts
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">GET
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<p>None</p></div>
<div class="section">
<h3><a name="Elements_of_the_appattempts_.28Application_Attempt_List.29_Object"></a>Elements of the <tt>appattempts</tt> (Application Attempt List) Object</h3>
<p>When you make a request for the list of application attempts, the information will be returned as a collection of application attempt objects. See <a href="#REST_API_APPLICATION_ATTEMPT">Application Attempt</a> for the syntax of the application attempt object.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>appattempt</tt> </td>
<td align="left"> array of appattempt objects(JSON)/zero or more application attempt objects(XML) </td>
<td align="left"> The collection of application attempt objects </td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/applicationhistory/apps/application_1430424020775_0001/appattempts
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
&quot;appAttempt&quot;: [
{
&quot;appAttemptId&quot;: &quot;appattempt_1430424020775_0001_000001&quot;,
&quot;host&quot;: &quot;localhost&quot;,
&quot;rpcPort&quot;: 56264,
&quot;trackingUrl&quot;: &quot;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0001/&quot;,
&quot;originalTrackingUrl&quot;: &quot;http://d-69-91-129-173.dhcp4.washington.edu:19888/jobhistory/job/job_1430424020775_0001&quot;,
&quot;diagnosticsInfo&quot;: &quot;&quot;,
&quot;appAttemptState&quot;: &quot;FINISHED&quot;,
&quot;amContainerId&quot;: &quot;container_1430424020775_0001_01_000001&quot;
}
]
}
</pre></div></div>
</div>
<div class="section">
<h4><a name="XML_response"></a>XML response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/applicationhistory/apps/application_1430424020775_0001/appattempts
Accept: application/xml
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/xml
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;appAttempts&gt;
&lt;appAttempt&gt;
&lt;appAttemptId&gt;appattempt_1430424020775_0001_000001&lt;/appAttemptId&gt;
&lt;host&gt;localhost&lt;/host&gt;
&lt;rpcPort&gt;56264&lt;/rpcPort&gt;
&lt;trackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0001/&lt;/trackingUrl&gt;
&lt;originalTrackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:19888/jobhistory/job/job_1430424020775_0001&lt;/originalTrackingUrl&gt;
&lt;diagnosticsInfo&gt;&lt;/diagnosticsInfo&gt;
&lt;appAttemptState&gt;FINISHED&lt;/appAttemptState&gt;
&lt;amContainerId&gt;container_1430424020775_0001_01_000001&lt;/amContainerId&gt;
&lt;/appAttempt&gt;
&lt;/appAttempts&gt;
</pre></div></div>
</div></div></div>
<div class="section">
<h2><a name="Application_Attempt"></a><a name="REST_API_APPLICATION_ATTEMPT"></a>Application Attempt</h2>
<p>With the Application Attempt API, you can get an application attempt resource contains information about a particular application attempt of an application that was running on an YARN cluster.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<p>Use the following URI to obtain an application attempt object identified by the <tt>appid</tt> value and the <tt>appattemptid</tt> value.</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/applicationhistory/apps/{appid}/appattempts/{appattemptid}
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">GET
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<p>None</p></div>
<div class="section">
<h3><a name="Elements_of_the_appattempt_.28Application_Attempt.29_Object:"></a>Elements of the <tt>appattempt</tt> (Application Attempt) Object:</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>appAttemptId</tt> </td>
<td align="left"> string </td>
<td align="left"> The application attempt Id </td></tr>
<tr class="a">
<td align="left"> <tt>amContainerId</tt> </td>
<td align="left"> string </td>
<td align="left"> The ApplicationMaster container Id </td></tr>
<tr class="b">
<td align="left"> <tt>appAttemptState</tt> </td>
<td align="left"> string </td>
<td align="left"> The application attempt state according to the ResourceManager - valid values are members of the YarnApplicationAttemptState enum: FINISHED, FAILED, KILLED </td></tr>
<tr class="a">
<td align="left"> <tt>trackingUrl</tt> </td>
<td align="left"> string </td>
<td align="left"> The web URL that can be used to track the application </td></tr>
<tr class="b">
<td align="left"> <tt>originalTrackingUrl</tt> </td>
<td align="left"> string </td>
<td align="left"> The actual web URL of the application </td></tr>
<tr class="a">
<td align="left"> <tt>diagnosticsInfo</tt> </td>
<td align="left"> string </td>
<td align="left"> Detailed diagnostics information </td></tr>
<tr class="b">
<td align="left"> <tt>host</tt> </td>
<td align="left"> string </td>
<td align="left"> The host of the ApplicationMaster </td></tr>
<tr class="a">
<td align="left"> <tt>rpcPort</tt> </td>
<td align="left"> int </td>
<td align="left"> The rpc port of the ApplicationMaster </td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">http://localhost:8188/ws/v1/applicationhistory/apps/application_1430424020775_0001/appattempts/appattempt_1430424020775_0001_000001
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
&quot;appAttemptId&quot;: &quot;appattempt_1430424020775_0001_000001&quot;,
&quot;host&quot;: &quot;localhost&quot;,
&quot;rpcPort&quot;: 56264,
&quot;trackingUrl&quot;: &quot;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0001/&quot;,
&quot;originalTrackingUrl&quot;: &quot;http://d-69-91-129-173.dhcp4.washington.edu:19888/jobhistory/job/job_1430424020775_0001&quot;,
&quot;diagnosticsInfo&quot;: &quot;&quot;,
&quot;appAttemptState&quot;: &quot;FINISHED&quot;,
&quot;amContainerId&quot;: &quot;container_1430424020775_0001_01_000001&quot;
}
</pre></div></div>
</div>
<div class="section">
<h4><a name="XML_response"></a>XML response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://&lt;timeline server http address:port&gt;/ws/v1/applicationhistory/apps/application_1395789200506_0001/appattempts/appattempt_1395789200506_0001_000001
Accept: application/xml
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 488
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;appAttempt&gt;
&lt;appAttemptId&gt;appattempt_1430424020775_0001_000001&lt;/appAttemptId&gt;
&lt;host&gt;localhost&lt;/host&gt;
&lt;rpcPort&gt;56264&lt;/rpcPort&gt;
&lt;trackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:8088/proxy/application_1430424020775_0001/&lt;/trackingUrl&gt;
&lt;originalTrackingUrl&gt;http://d-69-91-129-173.dhcp4.washington.edu:19888/jobhistory/job/job_1430424020775_0001&lt;/originalTrackingUrl&gt;
&lt;diagnosticsInfo&gt;&lt;/diagnosticsInfo&gt;
&lt;appAttemptState&gt;FINISHED&lt;/appAttemptState&gt;
&lt;amContainerId&gt;container_1430424020775_0001_01_000001&lt;/amContainerId&gt;
&lt;/appAttempt&gt;
</pre></div></div>
</div></div></div>
<div class="section">
<h2><a name="Container_List"></a><a name="REST_API_CONTAINER_LIST"></a>Container List</h2>
<p>With the Container List API, you can obtain a collection of resources, each of which represents a container. When you run a GET operation on this resource, you obtain a collection of container objects.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<p>Use the following URI to obtain all the container objects of an application attempt identified by the <tt>appid</tt> value and the <tt>appattemptid</tt> value.</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/applicationhistory/apps/{appid}/appattempts/{appattemptid}/containers
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<div>
<div>
<pre class="source">GET
</pre></div></div>
</div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<p>None</p></div>
<div class="section">
<h3><a name="Elements_of_the_containers_.28Container_List.29_Object"></a>Elements of the <tt>containers</tt> (Container List) Object</h3>
<p>When you make a request for the list of containers, the information will be returned as a collection of container objects. See also <tt>Container</tt> for syntax of the container object.</p>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>container</tt> </td>
<td align="left"> array of container objects(JSON)/zero or more container objects(XML) </td>
<td align="left"> The collection of container objects </td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/applicationhistory/apps/application_1430424020775_0001/appattempts/appattempt_1430424020775_0001_000001/containers?
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
&quot;container&quot;: [
{
&quot;containerId&quot;: &quot;container_1430424020775_0001_01_000007&quot;,
&quot;allocatedMB&quot;: 1024,
&quot;allocatedVCores&quot;: 1,
&quot;assignedNodeId&quot;: &quot;localhost:9105&quot;,
&quot;priority&quot;: 10,
&quot;startedTime&quot;: 1430424068296,
&quot;finishedTime&quot;: 1430424073006,
&quot;elapsedTime&quot;: 4710,
&quot;diagnosticsInfo&quot;: &quot;Container killed by the ApplicationMaster.\nContainer killed on request. Exit code is 143\nContainer exited with a non-zero exit code 143\n&quot;,
&quot;logUrl&quot;: &quot;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000007/container_1430424020775_0001_01_000007/zshen&quot;,
&quot;containerExitStatus&quot;: -105,
&quot;containerState&quot;: &quot;COMPLETE&quot;,
&quot;nodeHttpAddress&quot;: &quot;http://localhost:8042&quot;
},
{
&quot;containerId&quot;: &quot;container_1430424020775_0001_01_000006&quot;,
&quot;allocatedMB&quot;: 1024,
&quot;allocatedVCores&quot;: 1,
&quot;assignedNodeId&quot;: &quot;localhost:9105&quot;,
&quot;priority&quot;: 20,
&quot;startedTime&quot;: 1430424060317,
&quot;finishedTime&quot;: 1430424068293,
&quot;elapsedTime&quot;: 7976,
&quot;diagnosticsInfo&quot;: &quot;Container killed by the ApplicationMaster.\nContainer killed on request. Exit code is 143\nContainer exited with a non-zero exit code 143\n&quot;,
&quot;logUrl&quot;: &quot;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000006/container_1430424020775_0001_01_000006/zshen&quot;,
&quot;containerExitStatus&quot;: -105,
&quot;containerState&quot;: &quot;COMPLETE&quot;,
&quot;nodeHttpAddress&quot;: &quot;http://localhost:8042&quot;
},
{
&quot;containerId&quot;: &quot;container_1430424020775_0001_01_000005&quot;,
&quot;allocatedMB&quot;: 1024,
&quot;allocatedVCores&quot;: 1,
&quot;assignedNodeId&quot;: &quot;localhost:9105&quot;,
&quot;priority&quot;: 20,
&quot;startedTime&quot;: 1430424060316,
&quot;finishedTime&quot;: 1430424068294,
&quot;elapsedTime&quot;: 7978,
&quot;diagnosticsInfo&quot;: &quot;Container killed by the ApplicationMaster.\nContainer killed on request. Exit code is 143\nContainer exited with a non-zero exit code 143\n&quot;,
&quot;logUrl&quot;: &quot;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000005/container_1430424020775_0001_01_000005/zshen&quot;,
&quot;containerExitStatus&quot;: -105,
&quot;containerState&quot;: &quot;COMPLETE&quot;,
&quot;nodeHttpAddress&quot;: &quot;http://localhost:8042&quot;
},
{
&quot;containerId&quot;: &quot;container_1430424020775_0001_01_000003&quot;,
&quot;allocatedMB&quot;: 1024,
&quot;allocatedVCores&quot;: 1,
&quot;assignedNodeId&quot;: &quot;localhost:9105&quot;,
&quot;priority&quot;: 20,
&quot;startedTime&quot;: 1430424060315,
&quot;finishedTime&quot;: 1430424068289,
&quot;elapsedTime&quot;: 7974,
&quot;diagnosticsInfo&quot;: &quot;Container killed by the ApplicationMaster.\nContainer killed on request. Exit code is 143\nContainer exited with a non-zero exit code 143\n&quot;,
&quot;logUrl&quot;: &quot;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000003/container_1430424020775_0001_01_000003/zshen&quot;,
&quot;containerExitStatus&quot;: -105,
&quot;containerState&quot;: &quot;COMPLETE&quot;,
&quot;nodeHttpAddress&quot;: &quot;http://localhost:8042&quot;
},
{
&quot;containerId&quot;: &quot;container_1430424020775_0001_01_000004&quot;,
&quot;allocatedMB&quot;: 1024,
&quot;allocatedVCores&quot;: 1,
&quot;assignedNodeId&quot;: &quot;localhost:9105&quot;,
&quot;priority&quot;: 20,
&quot;startedTime&quot;: 1430424060315,
&quot;finishedTime&quot;: 1430424068291,
&quot;elapsedTime&quot;: 7976,
&quot;diagnosticsInfo&quot;: &quot;Container killed by the ApplicationMaster.\nContainer killed on request. Exit code is 143\nContainer exited with a non-zero exit code 143\n&quot;,
&quot;logUrl&quot;: &quot;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000004/container_1430424020775_0001_01_000004/zshen&quot;,
&quot;containerExitStatus&quot;: -105,
&quot;containerState&quot;: &quot;COMPLETE&quot;,
&quot;nodeHttpAddress&quot;: &quot;http://localhost:8042&quot;
},
{
&quot;containerId&quot;: &quot;container_1430424020775_0001_01_000002&quot;,
&quot;allocatedMB&quot;: 1024,
&quot;allocatedVCores&quot;: 1,
&quot;assignedNodeId&quot;: &quot;localhost:9105&quot;,
&quot;priority&quot;: 20,
&quot;startedTime&quot;: 1430424060313,
&quot;finishedTime&quot;: 1430424067250,
&quot;elapsedTime&quot;: 6937,
&quot;diagnosticsInfo&quot;: &quot;Container killed by the ApplicationMaster.\nContainer killed on request. Exit code is 143\nContainer exited with a non-zero exit code 143\n&quot;,
&quot;logUrl&quot;: &quot;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000002/container_1430424020775_0001_01_000002/zshen&quot;,
&quot;containerExitStatus&quot;: -105,
&quot;containerState&quot;: &quot;COMPLETE&quot;,
&quot;nodeHttpAddress&quot;: &quot;http://localhost:8042&quot;
},
{
&quot;containerId&quot;: &quot;container_1430424020775_0001_01_000001&quot;,
&quot;allocatedMB&quot;: 2048,
&quot;allocatedVCores&quot;: 1,
&quot;assignedNodeId&quot;: &quot;localhost:9105&quot;,
&quot;priority&quot;: 0,
&quot;startedTime&quot;: 1430424054314,
&quot;finishedTime&quot;: 1430424079022,
&quot;elapsedTime&quot;: 24708,
&quot;diagnosticsInfo&quot;: &quot;&quot;,
&quot;logUrl&quot;: &quot;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000001/container_1430424020775_0001_01_000001/zshen&quot;,
&quot;containerExitStatus&quot;: 0,
&quot;containerState&quot;: &quot;COMPLETE&quot;,
&quot;nodeHttpAddress&quot;: &quot;http://localhost:8042&quot;
}
]
}
</pre></div></div>
</div>
<div class="section">
<h4><a name="XML_response"></a>XML response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/applicationhistory/apps/application_1430424020775_0001/appattempts/appattempt_1430424020775_0001_000001/containers
Accept: application/xml
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source"> HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1428
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;containers&gt;
&lt;container&gt;
&lt;containerId&gt;container_1430424020775_0001_01_000007&lt;/containerId&gt;
&lt;allocatedMB&gt;1024&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;1&lt;/allocatedVCores&gt;
&lt;assignedNodeId&gt;localhost:9105&lt;/assignedNodeId&gt;
&lt;priority&gt;10&lt;/priority&gt;
&lt;startedTime&gt;1430424068296&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424073006&lt;/finishedTime&gt;
&lt;elapsedTime&gt;4710&lt;/elapsedTime&gt;
&lt;diagnosticsInfo&gt;Container killed by the ApplicationMaster.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
&lt;/diagnosticsInfo&gt;
&lt;logUrl&gt;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000007/container_1430424020775_0001_01_000007/zshen&lt;/logUrl&gt;
&lt;containerExitStatus&gt;-105&lt;/containerExitStatus&gt;
&lt;containerState&gt;COMPLETE&lt;/containerState&gt;
&lt;nodeHttpAddress&gt;http://localhost:8042&lt;/nodeHttpAddress&gt;
&lt;/container&gt;
&lt;container&gt;
&lt;containerId&gt;container_1430424020775_0001_01_000006&lt;/containerId&gt;
&lt;allocatedMB&gt;1024&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;1&lt;/allocatedVCores&gt;
&lt;assignedNodeId&gt;localhost:9105&lt;/assignedNodeId&gt;
&lt;priority&gt;20&lt;/priority&gt;
&lt;startedTime&gt;1430424060317&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424068293&lt;/finishedTime&gt;
&lt;elapsedTime&gt;7976&lt;/elapsedTime&gt;
&lt;diagnosticsInfo&gt;Container killed by the ApplicationMaster.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
&lt;/diagnosticsInfo&gt;
&lt;logUrl&gt;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000006/container_1430424020775_0001_01_000006/zshen&lt;/logUrl&gt;
&lt;containerExitStatus&gt;-105&lt;/containerExitStatus&gt;
&lt;containerState&gt;COMPLETE&lt;/containerState&gt;
&lt;nodeHttpAddress&gt;http://localhost:8042&lt;/nodeHttpAddress&gt;
&lt;/container&gt;
&lt;container&gt;
&lt;containerId&gt;container_1430424020775_0001_01_000005&lt;/containerId&gt;
&lt;allocatedMB&gt;1024&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;1&lt;/allocatedVCores&gt;
&lt;assignedNodeId&gt;localhost:9105&lt;/assignedNodeId&gt;
&lt;priority&gt;20&lt;/priority&gt;
&lt;startedTime&gt;1430424060316&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424068294&lt;/finishedTime&gt;
&lt;elapsedTime&gt;7978&lt;/elapsedTime&gt;
&lt;diagnosticsInfo&gt;Container killed by the ApplicationMaster.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
&lt;/diagnosticsInfo&gt;
&lt;logUrl&gt;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000005/container_1430424020775_0001_01_000005/zshen&lt;/logUrl&gt;
&lt;containerExitStatus&gt;-105&lt;/containerExitStatus&gt;
&lt;containerState&gt;COMPLETE&lt;/containerState&gt;
&lt;nodeHttpAddress&gt;http://localhost:8042&lt;/nodeHttpAddress&gt;
&lt;/container&gt;
&lt;container&gt;
&lt;containerId&gt;container_1430424020775_0001_01_000003&lt;/containerId&gt;
&lt;allocatedMB&gt;1024&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;1&lt;/allocatedVCores&gt;
&lt;assignedNodeId&gt;localhost:9105&lt;/assignedNodeId&gt;
&lt;priority&gt;20&lt;/priority&gt;
&lt;startedTime&gt;1430424060315&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424068289&lt;/finishedTime&gt;
&lt;elapsedTime&gt;7974&lt;/elapsedTime&gt;
&lt;diagnosticsInfo&gt;Container killed by the ApplicationMaster.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
&lt;/diagnosticsInfo&gt;
&lt;logUrl&gt;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000003/container_1430424020775_0001_01_000003/zshen&lt;/logUrl&gt;
&lt;containerExitStatus&gt;-105&lt;/containerExitStatus&gt;
&lt;containerState&gt;COMPLETE&lt;/containerState&gt;
&lt;nodeHttpAddress&gt;http://localhost:8042&lt;/nodeHttpAddress&gt;
&lt;/container&gt;
&lt;container&gt;
&lt;containerId&gt;container_1430424020775_0001_01_000004&lt;/containerId&gt;
&lt;allocatedMB&gt;1024&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;1&lt;/allocatedVCores&gt;
&lt;assignedNodeId&gt;localhost:9105&lt;/assignedNodeId&gt;
&lt;priority&gt;20&lt;/priority&gt;
&lt;startedTime&gt;1430424060315&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424068291&lt;/finishedTime&gt;
&lt;elapsedTime&gt;7976&lt;/elapsedTime&gt;
&lt;diagnosticsInfo&gt;Container killed by the ApplicationMaster.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
&lt;/diagnosticsInfo&gt;
&lt;logUrl&gt;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000004/container_1430424020775_0001_01_000004/zshen&lt;/logUrl&gt;
&lt;containerExitStatus&gt;-105&lt;/containerExitStatus&gt;
&lt;containerState&gt;COMPLETE&lt;/containerState&gt;
&lt;nodeHttpAddress&gt;http://localhost:8042&lt;/nodeHttpAddress&gt;
&lt;/container&gt;
&lt;container&gt;
&lt;containerId&gt;container_1430424020775_0001_01_000002&lt;/containerId&gt;
&lt;allocatedMB&gt;1024&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;1&lt;/allocatedVCores&gt;
&lt;assignedNodeId&gt;localhost:9105&lt;/assignedNodeId&gt;
&lt;priority&gt;20&lt;/priority&gt;
&lt;startedTime&gt;1430424060313&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424067250&lt;/finishedTime&gt;
&lt;elapsedTime&gt;6937&lt;/elapsedTime&gt;
&lt;diagnosticsInfo&gt;Container killed by the ApplicationMaster.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
&lt;/diagnosticsInfo&gt;
&lt;logUrl&gt;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000002/container_1430424020775_0001_01_000002/zshen&lt;/logUrl&gt;
&lt;containerExitStatus&gt;-105&lt;/containerExitStatus&gt;
&lt;containerState&gt;COMPLETE&lt;/containerState&gt;
&lt;nodeHttpAddress&gt;http://localhost:8042&lt;/nodeHttpAddress&gt;
&lt;/container&gt;
&lt;container&gt;
&lt;containerId&gt;container_1430424020775_0001_01_000001&lt;/containerId&gt;
&lt;allocatedMB&gt;2048&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;1&lt;/allocatedVCores&gt;
&lt;assignedNodeId&gt;localhost:9105&lt;/assignedNodeId&gt;
&lt;priority&gt;0&lt;/priority&gt;
&lt;startedTime&gt;1430424054314&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424079022&lt;/finishedTime&gt;
&lt;elapsedTime&gt;24708&lt;/elapsedTime&gt;
&lt;diagnosticsInfo&gt;&lt;/diagnosticsInfo&gt;
&lt;logUrl&gt;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000001/container_1430424020775_0001_01_000001/zshen&lt;/logUrl&gt;
&lt;containerExitStatus&gt;0&lt;/containerExitStatus&gt;
&lt;containerState&gt;COMPLETE&lt;/containerState&gt;
&lt;nodeHttpAddress&gt;http://localhost:8042&lt;/nodeHttpAddress&gt;
&lt;/container&gt;
&lt;/containers&gt;
</pre></div></div>
</div></div></div>
<div class="section">
<h2><a name="Container"></a><a name="REST_API_CONTAINER"></a>Container</h2>
<p>With the Container API, you can get a container resource contains information about a particular container of an application attempt of an application that was running on an YARN cluster.</p>
<div class="section">
<h3><a name="URI:"></a>URI:</h3>
<p>Use the following URI to obtain a container object identified by the <tt>appid</tt> value, the <tt>appattemptid</tt> value and the <tt>containerid</tt> value.</p>
<div>
<div>
<pre class="source">http(s)://&lt;timeline server http(s) address:port&gt;/ws/v1/applicationhistory/apps/{appid}/appattempts/{appattemptid}/containers/{containerid}
</pre></div></div>
</div>
<div class="section">
<h3><a name="HTTP_Operations_Supported:"></a>HTTP Operations Supported:</h3>
<p>GET</p></div>
<div class="section">
<h3><a name="Query_Parameters_Supported:"></a>Query Parameters Supported:</h3>
<p>None</p></div>
<div class="section">
<h3><a name="Elements_of_the_container_.28Container.29_Object:"></a>Elements of the <tt>container</tt> (Container) Object:</h3>
<table border="0" class="bodyTable">
<thead>
<tr class="a">
<th align="left"> Item </th>
<th align="left"> Data Type </th>
<th align="left"> Description </th></tr>
</thead><tbody>
<tr class="b">
<td align="left"> <tt>containerId</tt> </td>
<td align="left"> string </td>
<td align="left"> The container Id </td></tr>
<tr class="a">
<td align="left"> <tt>containerState</tt> </td>
<td align="left"> string </td>
<td align="left"> The container state according to the ResourceManager - valid values are members of the ContainerState enum: COMPLETE </td></tr>
<tr class="b">
<td align="left"> <tt>containerExitStatus</tt> </td>
<td align="left"> int </td>
<td align="left"> The container exit status </td></tr>
<tr class="a">
<td align="left"> <tt>logUrl</tt> </td>
<td align="left"> string </td>
<td align="left"> The log URL that can be used to access the container aggregated log </td></tr>
<tr class="b">
<td align="left"> <tt>diagnosticsInfo</tt> </td>
<td align="left"> string </td>
<td align="left"> Detailed diagnostics information </td></tr>
<tr class="a">
<td align="left"> <tt>startedTime</tt> </td>
<td align="left"> long </td>
<td align="left"> The time in which container started (in ms since epoch) </td></tr>
<tr class="b">
<td align="left"> <tt>finishedTime</tt> </td>
<td align="left"> long </td>
<td align="left"> The time in which the container finished (in ms since epoch) </td></tr>
<tr class="a">
<td align="left"> <tt>elapsedTime</tt> </td>
<td align="left"> long </td>
<td align="left"> The elapsed time since the container started (in ms) </td></tr>
<tr class="b">
<td align="left"> <tt>allocatedMB</tt> </td>
<td align="left"> int </td>
<td align="left"> The memory in MB allocated to the container </td></tr>
<tr class="a">
<td align="left"> <tt>allocatedVCores</tt> </td>
<td align="left"> int </td>
<td align="left"> The virtual cores allocated to the container </td></tr>
<tr class="b">
<td align="left"> <tt>priority</tt> </td>
<td align="left"> int </td>
<td align="left"> The priority of the container </td></tr>
<tr class="a">
<td align="left"> <tt>assignedNodeId</tt> </td>
<td align="left"> string </td>
<td align="left"> The assigned node host and port of the container </td></tr>
</tbody>
</table></div>
<div class="section">
<h3><a name="Response_Examples:"></a>Response Examples:</h3>
<div class="section">
<h4><a name="JSON_response"></a>JSON response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/applicationhistory/apps/application_1430424020775_0001/appattempts/appattempt_1430424020775_0001_000001/containers/container_1430424020775_0001_01_000001
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">{
&quot;containerId&quot;: &quot;container_1430424020775_0001_01_000001&quot;,
&quot;allocatedMB&quot;: 2048,
&quot;allocatedVCores&quot;: 1,
&quot;assignedNodeId&quot;: &quot;localhost:9105&quot;,
&quot;priority&quot;: 0,
&quot;startedTime&quot;: 1430424054314,
&quot;finishedTime&quot;: 1430424079022,
&quot;elapsedTime&quot;: 24708,
&quot;diagnosticsInfo&quot;: &quot;&quot;,
&quot;logUrl&quot;: &quot;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000001/container_1430424020775_0001_01_000001/zshen&quot;,
&quot;containerExitStatus&quot;: 0,
&quot;containerState&quot;: &quot;COMPLETE&quot;,
&quot;nodeHttpAddress&quot;: &quot;http://localhost:8042&quot;
}
</pre></div></div>
</div>
<div class="section">
<h4><a name="XML_response"></a>XML response</h4>
<p>HTTP Request:</p>
<div>
<div>
<pre class="source">GET http://localhost:8188/ws/v1/applicationhistory/apps/application_1430424020775_0001/appattempts/appattempt_1430424020775_0001_000001/containers/container_1430424020775_0001_01_000001
Accept: application/xml
</pre></div></div>
<p>Response Header:</p>
<div>
<div>
<pre class="source">HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 669
</pre></div></div>
<p>Response Body:</p>
<div>
<div>
<pre class="source">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;container&gt;
&lt;containerId&gt;container_1430424020775_0001_01_000001&lt;/containerId&gt;
&lt;allocatedMB&gt;2048&lt;/allocatedMB&gt;
&lt;allocatedVCores&gt;1&lt;/allocatedVCores&gt;
&lt;assignedNodeId&gt;localhost:9105&lt;/assignedNodeId&gt;
&lt;priority&gt;0&lt;/priority&gt;
&lt;startedTime&gt;1430424054314&lt;/startedTime&gt;
&lt;finishedTime&gt;1430424079022&lt;/finishedTime&gt;
&lt;elapsedTime&gt;24708&lt;/elapsedTime&gt;
&lt;diagnosticsInfo&gt;&lt;/diagnosticsInfo&gt;
&lt;logUrl&gt;http://0.0.0.0:8188/applicationhistory/logs/localhost:9105/container_1430424020775_0001_01_000001/container_1430424020775_0001_01_000001/zshen&lt;/logUrl&gt;
&lt;containerExitStatus&gt;0&lt;/containerExitStatus&gt;
&lt;containerState&gt;COMPLETE&lt;/containerState&gt;
&lt;nodeHttpAddress&gt;http://localhost:8042&lt;/nodeHttpAddress&gt;
&lt;/container&gt;
</pre></div></div>
</div></div>
<div class="section">
<h3><a name="Response_Codes"></a>Response Codes</h3>
<ol style="list-style-type: decimal">
<li>Queries where a domain, entity type, entity ID or similar cannot be resolved result in HTTP 404, &#x201c;Not Found&#x201d; responses.</li>
<li>Requests in which the path, parameters or values are invalid result in Bad Request, 400, responses.</li>
<li>In a secure cluster, a 401, &#x201c;Forbidden&#x201d;, response is generated when attempting to perform operations to which the caller does not have the sufficient rights. There is an exception to this when querying some entities, such as Domains; here the API deliberately downgrades permission-denied outcomes as empty and not-founds responses. This hides details of other domains from an unauthorized caller.</li>
<li>If the content of timeline entity PUT operations is invalid, this failure <i>will not</i> result in an HTTP error code being retured. A status code of 200 will be returned &#x2014;however, there will be an error code in the list of failed entities for each entity which could not be added.</li>
</ol></div></div>
<div class="section">
<h2><a name="Timeline_Server_Performance_Test_Tool"></a><a name="TIMELINE_SERVER_PERFORMANCE_TEST_TOOL"></a> Timeline Server Performance Test Tool</h2>
<div class="section">
<h3><a name="Highlights"></a><a name="HIGHLIGHTS"></a>Highlights</h3>
<p>The timeline server performance test tool helps measure timeline server&#x2019;s write performance. The test launches SimpleEntityWriter mappers or JobHistoryFileReplay mappers to write timeline entities to the timeline server. At the end, the transaction rate(ops/s) per mapper and the total transaction rate will be measured and printed out. Running the test with SimpleEntityWriter mappers will also measure and show the IO rate(KB/s) per mapper and the total IO rate.</p></div>
<div class="section">
<h3><a name="Usage"></a><a name="USAGE"></a>Usage</h3>
<p>Mapper Types Description:</p>
<ol style="list-style-type: decimal">
<li>SimpleEntityWriter mapper Each mapper writes a user-specified number of timeline entities with a user-specified size to the timeline server. SimpleEntityWrite is a default mapper of the performance test tool.
<ol style="list-style-type: decimal">
<li>JobHistoryFileReplay mapper Each mapper replays jobhistory files under a specified directory (both the jhist file and its corresponding conf.xml are required to be present in order to be replayed. The number of mappers should be no more than the number of jobhistory files). Each mapper will get assigned some jobhistory files to replay. For each job history file, a mapper will parse it to get jobinfo and then create timeline entities. Each mapper also has the choice to write all the timeline entities created at once or one at a time.</li>
</ol>
</li>
</ol>
<p>Options:</p>
<div>
<div>
<pre class="source">[-m &lt;maps&gt;] number of mappers (default: 1)
[-v] timeline service version
[-mtype &lt;mapper type in integer&gt;]
1. simple entity write mapper (default)
2. jobhistory files replay mapper
[-s &lt;(KBs)test&gt;] number of KB per put (mtype=1, default: 1 KB)
[-t] package sending iterations per mapper (mtype=1, default: 100)
[-d &lt;path&gt;] root path of job history files (mtype=2)
[-r &lt;replay mode&gt;] (mtype=2)
1. write all entities for a job in one put (default)
2. write one entity at a time
</pre></div></div>
</div>
<div class="section">
<h3><a name="Sample_Runs"></a><a name="SAMPLE_RUNS"></a>Sample Runs</h3>
<p>Run SimpleEntityWriter test:</p>
<div>
<div>
<pre class="source">bin/hadoop jar performanceTest.jar timelineperformance -m 4 -mtype 1 -s 3 -t 200
</pre></div></div>
<p>Example output of SimpleEntityWriter test :</p>
<div>
<div>
<pre class="source">TRANSACTION RATE (per mapper): 20000.0 ops/s
IO RATE (per mapper): 60000.0 KB/s
TRANSACTION RATE (total): 80000.0 ops/s
IO RATE (total): 240000.0 KB/s
</pre></div></div>
<p>Run JobHistoryFileReplay mapper test</p>
<div>
<div>
<pre class="source">$ bin/hadoop jar performanceTest.jar timelineperformance -m 2 -mtype 2 -d /testInput -r 2
</pre></div></div>
<p>Example input of JobHistoryFileReplay mapper test:</p>
<div>
<div>
<pre class="source">$ bin/hadoop fs -ls /testInput
/testInput/job_1.jhist
/testInput/job_1_conf.xml
/testInput/job_2.jhist
/testInput/job_2_conf.xml
</pre></div></div>
<p>Example output of JobHistoryFileReplay test:</p>
<div>
<div>
<pre class="source">TRANSACTION RATE (per mapper): 4000.0 ops/s
IO RATE (per mapper): 0.0 KB/s
TRANSACTION RATE (total): 8000.0 ops/s
IO RATE (total): 0.0 KB/s
</pre></div></div></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
&#169; 2008-2021
Apache Software Foundation
- <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
</div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>