目录



1 概述

YARN Timeline Service 2.0 是 1.0 和 1.5 版本之后的一个主要 Timeline Service,它使用分布式 writer 构建后端存储,它比早期的版本更具可伸缩性。

YARN Timeline Service 2.0 解决了与 Timeline Server 早期版本相关的以下两个主要挑战:

  1. 可扩展性(Scalability)
    1.0 限制于 writer 或者 reader 以及存储的单个实例,因此它不能很好的扩展到小型集群之外。YARN Timeline 服务 2.0 将数据 writer 与数据 reader 分开,它使用分布式 collectors,每个 YARN 应用实例实质上是一个 collector,reader 专用于通过 REST API 服务查询的单实例。
    YARN Timeline Service 2.0 使用 Apache HBase 作为主要的后端存储,因为 Apache HBase 可以很好地扩展到较大的大小,同时保持良好的读写响应时间。
  2. 可用性(Usability)
    YARN Timeline Service 2.0 提供了更改的可用性,因为它支持 YARN 应用程序的 flows 或 logical 组级别信息的聚合,它支持配置信息和指标。
    体系结构:YARN Timeline Service 2.0 使用一组 collectors 或 writers 将数据写入后端存储,collectors 位于单个应用程序或 ResourceManager 的级别。
    安装:使用 Ambari 部署 HDP 群集时,Timeline Service 2.0 将作为 YARN 安装过程的一部分自动安装。
    启用 System Service Mode:仅当 HDP 3.0群集满足容量要求时,才以 System Service 模式安装与 Timeline Service 2.0 相关联的 HBase组件。ats-hbase 的部署会有所不同,具体取决于你是部署新的 HDP 3.0 群集还是将群集从 HDP 2.6.5 升级到 HDP 3.0。
    ats-hbase 的生命周期管理:根据需求 yarn-ats 用户可以在 ats-hbase 服务上执行以下生命周期管理操作:start、stop 或 destroy 该服务;并扩大或缩小服务的 HBase 组件实例。
    集群之间切换前删除 ats-hbase :在安全和非安全群集之间或高可用性和非高可用性群集之间迁移之前,必须从源群集中删除 ats-hbase,否则 Timeline Service 2.0 可能会停止工作。
    发布 Application-Specific 数据TimelineV2Client API 可帮助你将特定于应用程序的数据发布到 Timeline Service 2.0,对于你的应用程序,你必须定义一个TimelineEntity 对象,并将事件发布到 Timeline Service 2.0。
    查询 Timeline Service 2.0 的 REST API:你必须使用 REST API 来查询 Timeline Service 2.0 并检索有关应用程序的信息。该 API 在 timeline 服务的 Web 服务上的路径 /ws/v2/timeline/ 上实现。

2 Timeline Service 2.0 体系结构

YARN Timeline Service 2.0 使用一组 collectors 或 writers 将数据写入后端存储,collectors 位于单个应用程序或 ResourceManager 的级别。

应用程序级别的 collectors 是分布式的,并且与专用的 ApplicationManager 位于同一位置。这些 collectors 收集属于应用程序的数据,对于给定的应用程序 ApplicationMaster 可以将数据写入位于同一位置的 timeline collector。此外运行该应用程序容器的其他节点的 NodeManagers 可以将数据写入运行 ApplicationMaster 的节点上的 timeline collector。

与 ResourceManager 关联的 collector 收集通用生命周期事件。

除 collectors 外,还有单独的守护程序称为 timeline readers ,专用于通过 REST API 服务查询。

Architecture of Timeline Service 2.0


3 Timeline Service 2.0 安装

使用 Ambari 部署 HDP 群集时 Timeline Service 2.0 将作为 YARN 安装过程的一部分自动安装。

Timeline Service 2.0 使用 HBase 作为主要的后备存储,因此可以使用以下两种方法之一为 Timeline Service 2.0 配置HBase:

  • 在YARN安装过程中,将 HBase 与 Timeline Service 2.0 一起自动安装,这与你使用 Ambari 安装的 HBase 服务不同。
  • 配置 YARN 以指向使用 Ambari 安装的 HBase 服务的外部实例。

3.1 与 Timeline Service 2.0 关联的 HBase 的安装模式

根据群集容量 Timeline Service 2.0 附带的 HBase 组件会自动以嵌入式模式(embedded mode)安装或作为单独的系统服务( separate system service)安装。

  • 嵌入式模式(Embedded mode):这种安装模式适用于较小的群集,该群集的总群集容量小于 50 GB,NodeManager 的容量小于12 GB。 该 HBase 群集与 Timeline Service V2.0 Reader 组件一起运行。
  • 系统服务模式 (System service mode):此安装模式适用于每个节点上的容量至少为 10 GB 并且群集总容量至少为 50 GB的群集。在这种模式下,HBase 在 YARN 上作为名为 ats-hbase 的单独服务运行。 为了可伸缩性,建议在大型群集上安装系统服务模式。

ats-hbase on yarn

3.2 为 Timeline Service 2.0 配置外部 HBase

根据你的需求可以将 YARN 配置为指向 HBase 服务的外部实例,而不是使用 Timeline Service 2.0 随附的 HBase 实例。

开始之前
在为 Timeline Service 2.0 配置实例之前,你必须在 Hortonworks Data Platform(HDP)群集上安装了HBase。

关于此任务
您可以在安装 YARN 之前或之后在 HDP 群集上为 Timeline Service 2.0 配置 HBase 服务。

步骤

  1. Advanced yarn-hbase-env 下启用 use_external_hbase 属性。
    根据你的要求,使用以下两个选项之一来使用 Ambari 访问 use_external_hbase 属性:
if…Then…
YARN 已安装在 HDP 群集上Ambari Web中,浏览到 Services> YARN > Configs,然后展开 Advanced yarn-hbase-env
你正在使用 Ambari 在 HDP 群集上安装 YARNAdd Service 向导的 Customize Services 界面上,浏览到YARN > Configs,然后展开 Advanced yarn-hbase-env

注意
您必须执行此步骤作为使用 Ambari 将 YARN 安装为服务的过程的一部分。有关使用 Ambari 添加服务的更多信息,请参阅《Managing and Monitoring Ambari》文档。
  1. 更新 Advanced yarn-hbase-env 下的以下属性以匹配外部 HBase 实例中相应属性的值:
  • hbase.zookeeper.quorum
  • hbase.zookeeper.property.clientPort
  • zookeeper.znode.parent
  1. 保存配置的属性更改,然后重新启动所有 YARN。
  2. hbase-site.xml 文件复制到时间轴服务器配置目录。
mv /usr/hdp/current/hadoop/conf/embedded-yarn-ats-hbase/hbase-site.xml /usr/hdp/current/hadoop/conf/embedded-yarn-ats-hbase/hbase-site.xml.bak
cp /etc/hbase/conf/hbase-site.xml /usr/hdp/current/hadoop/conf/embedded-yarn-ats-hbase/
  1. 登录到群集节点并创建所需的HBase表。
export HBASE_CLASSPATH_PREFIX=/usr/hdp/current/hadoop-yarn-client/timelineservice/*; /usr/hdp/current/hbase-client/bin/hbase org.apache.hadoop.yarn.server.timelineservice.storage.TimelineSchemaCreator -Dhbase.client.retries.number=35 -create -s
  1. 在 HBase Shell 中,为 yarn 用户授予访问步骤4中创建的 HBase 表所需的权限。
#	R - represents read privilege.
#	W - represents write privilege.
#	X - represents execute privilege.
#	C - represents create privilege.
#	A - represents admin privilege.
grant 'yarn','yarn-ats','RWXCA'

结果
Timeline Service V2.0 Reader 组件访问新的 HBase 实例并从中读取数据。
【注意】如果要更新 YARN 配置以指向嵌入式 HBase 实例,则必须将 use_external_hbasehbase.zookeeper.quorumhbase.zookeeper.property.clientPortzookeeper.znode.parent 属性恢复为其先前的值。


4 启用 System Service Mode

仅当 HDP 3.0群集满足容量要求时,才以 System Service 模式安装与 Timeline Service 2.0 相关联的 HBase组件。ats-hbase 的部署会有所不同,具体取决于你是部署新的 HDP 3.0 群集还是将群集从 HDP 2.6.5 升级到 HDP 3.0。

在满足 HBase 在 System Service 模式下运行的容量要求的新 HDP 3.0 群集上,ats-hbase 会自动提交到默认队列,而无需配置任何ACL。因此你必须为 ats-hbase 配置一个单独的队列,为该队列分配容量和最高优先级,设置ACL,并在该队列上禁用抢占。

在从 2.6.5 升级到 3.0 并满足 HBase 在 System Service 模式下运行的容量要求的 HDP 群集上,将自动为 ats-hbase 服务创建一个单独的零容量队列。队列自动配置了必需的 ACL 和优先级,并且抢占被禁用。您必须为特定队列分配容量并启用 System Service 模式,以便将 ats-hbase 提交到该队列。

4.1 在新安装的群集上启用 System Service 模式

在满足 HBase 在 System Service 模式下运行的容量要求的新 HDP 3.0 群集上,必须为运行 ats-hbase 配置一个单独的队列。

安装 HDP 3.0 之后,请执行以下建议的步骤在群集上运行 ats-hbase

步骤

  1. 在 root 级别为 ats-hbase 服务配置一个单独的队列,例如 yarn-system,而不使用默认队列。
  2. 将所需资源分配给 yarn-system 队列以启动 ats-hbase 服务。
    启动 ats-hbase 所需的最小内存量为 12 GB。
    要分配资源,请更新 capacity-scheduler.xml 中的 yarn.scheduler.capacity.root.<queue_path>.capacity 属性的值。 以下是一个示例:
    yarn.scheduler.capacity.root.yarn-system.capacity=10
    
  3. yarn-system 队列上设置 ACL,以便 yarn-ats 用户可以管理 ats-hbase 服务。
    要在队列上设置 ACL,请更新 capacity-scheduler.xml 中的 yarn.scheduler.capacity.root.<queue-path>.acl_submit_applicationsyarn.scheduler.capacity.root.<queue-path>.acl_administer_queue 的值。
    yarn.scheduler.capacity.root.yarn-system.acl_submit_applications=yarn-ats,yarn
    yarn.scheduler.capacity.root.yarn-system.acl_administer_queue=yarn-ats,yarn
    
  4. yarn-system 队列上禁用抢占。
    capacity-scheduler.xml 中的 yarn.scheduler.capacity.root.<queue-path>.disable_preemptionyarn.scheduler.capacity.root.<queue-path>.intra-queue-preemption.disable_preemption 设置为 true。
    yarn.scheduler.capacity.root.yarn-system.disable_preemption=true
    yarn.scheduler.capacity.root.yarn-system.intra-queue-preemption.disable_preemption=true
    
  5. 将最高优先级分配给 yarn-system 队列,以防止意外删除或抢占。
    capacity-scheduler.xml 中设置 yarn.scheduler.capacity.root.<queue-path>.priority 的值。
    yarn.scheduler.capacity.root.yarn-system.priority=<maximum-integer-value>
    
  6. 重新启动 YARN,以使所有配置更改生效。
  7. ats-hbase 从默认队列移至 yarn-system 队列。
    # 在这里 <app-id> 是 ats-hbase 服务的 ID。
    yarn application -changeQueue yarn-system -appId <app-id>
    

4.2 在升级的群集上启用 System Service 模式

在从 HDP 2.6.5 升级到 HDP 3.0 且满足 HBase 在 System Service 模式下运行的容量要求的群集上,必须将容量分配给 yarn-system 队列并启用系统服务模式。

步骤

  1. 将所需资源分配给 yarn-system 队列以启动 ats-hbase 服务。
    启动 ats-hbase 所需的最小内存量为 12 GB。
    要分配资源,请更新 capacity-scheduler.xml 中的 yarn.scheduler.capacity.root.<queue_path>.capacity 属性的值。 以下是一个示例:
    yarn.scheduler.capacity.root.yarn-system.capacity=10
    
  2. yarn-hbase.env 中启用 is_hbase_system_service_launch 属性。
  3. 重新启动 YARN。

5 ats-hbase 的生命周期管理

根据需求 yarn-ats 用户可以在 ats-hbase 服务上执行以下生命周期管理操作:start、stop 或 destroy 该服务;并扩大或缩小服务的 HBase 组件实例。

yarn-ats 用户可以使用 REST API 或命令行界面执行生命周期管理操作。

5.1 停止 ats-hbase 服务

REST API
考虑以下使用 PUT 方法停止服务的示例:

  • 安全集群:
    确保使用 /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab 运行 kinit。
    curl -k --negotiate -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase -d '{
    "state": "STOPPED"
    }'
    
  • 安全集群
    curl -k -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase?user.name=yarn-ats -d '{
    "state": "STOPPED"
    }'
    

命令
使用 yarn app -stop 命令停止服务。

yarn app -stop ats-hbase

5.2 开始 ats-hbase 服务

REST API
考虑以下使用 PUT 方法启动停止服务的示例:

  • 安全集群:
    确保使用 /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab 运行 kinit
    curl -k --negotiate -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase -d '{
    "state": "STARTED"
    }'
    
  • 安全集群
    curl -k -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase?user.name=yarn-ats -d '{
    "state": "STARTED"
    }'
    

命令
使用 yarn app -start 命令开始服务。

yarn app -start ats-hbase

5.3 扩大或缩小 ats-hbase 服务的 HBase 组件实例

你可以按比例扩展或按比例缩小组件实例,例如 ats-hbase 的 HBase 的 master 或 region 服务。
【注意】HBase master 组件实例的数量不能一次增加两个以上。

REST API
在以下示例中,region 服务实例的数量缩放为 10:

  • 安全集群:
    确保使用 /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab 运行 kinit
    curl -k --negotiate -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase/components/<component> -d '{
    "number_of_containers": "10"
    }'
    
  • 安全集群
    curl -k -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase/components/<component>?user.name=yarn-ats -d '{
    "number_of_containers": "10"
    }'
    

命令
使用 yarn app -flex 命令并指定要缩放的组件实例数。

yarn app -flex ats-hbase regionserver 10

5.4 销毁 ats-hbase 服务

REST API
考虑以下使用 PUT 方法销毁服务的示例:

  • 安全集群:
    确保使用 /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab 运行 kinit
    curl -k --negotiate -u: -H "Content-Type: application/json" -X DELETE http://
    <ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase
    
  • 安全集群
    curl -k -u: -H "Content-Type: application/json" -X DELETE http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase?user.name=yarn-ats
    

命令
使用 yarn app -destroy 命令销毁该服务。

yarn app -destroy ats-hbase

【注意】

  • 当 ResourceManager 重新启动时或在 ResourceManager HA 故障转移期间,ats-hbase 服务可以在没有任何用户干预的情况下重新启动。
  • 当诸如 ZooKeeper 或 HDFS之 类的相关服务重新启动时,或者当 NameNode 移至其他主机或安全模式时,ats-hbase服务将继续保留先前的配置,因此变得不可访问。在这种情况下 Hortonworks 建议您手动重新启动 ats-hbase

6 集群之间切换前删除 ats-hbase

在安全和非安全群集之间或高可用性和非高可用性群集之间迁移之前,必须从源群集中删除 ats-hbase,否则 Timeline Service 2.0 可能会停止工作。

关于此任务
您必须销毁 ats-hbase 服务,从 HDFS 中删除其配置并从 HDFS 中删除其规范文件。

【注意】
以下过程以示例方式说明了为 yarn-ats用户删除 ats-hbase 服务的过程。如果需要,你必须根据你的部署更改用户。同样根据安全群集的部署,你必须使用与以下示例中给出的名称不同的 principalkeytab 名称。

步骤

  1. 使用 yarn app -destroy 命令销毁 ats-hbase 服务
    su - yarn-ats
    yarn app -destroy ats-hbase
    
    su - yarn-ats
    kinit -kt /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab yarn-ats@EXAMPLE.COM
    yarn app -destroy ats-hbase
    
  2. 从 HDFS 删除 ats-hbase 配置
    su - yarn-ats
    hadoop fs -rm -R ./{stack_version}/*  #{stack_version} is 3.0.0.0-1557
    
    su - yarn-ats
    kinit -kt /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab yarn-ats@EXAMPLE.COM
    hadoop fs -rm -R ./{stack_version}/*  #{stack_version} is 3.0.0.0-1557
    
  3. 从 HDFS 删除 ats-hbase 的规范文件
    【注意】您必须以 hdfs 用户身份登录才能执行此步骤。
    su - hdfs
    hadoop fs -rm -R /services/sync/yarn-ats/hbase.yarnfile
    
    su - hdfs
    kinit -kt /etc/security/keytabs/hdfs.headless.keytab hdfs@EXAMPLE.COM
    hadoop fs -rm -R /services/sync/yarn-ats/hbase.yarnfile
    

7 发布 Application-Specific 数据

TimelineV2Client API 可帮助你将特定于应用程序的数据发布到 Timeline Service 2.0,对于你的应用程序,你必须定义一个TimelineEntity 对象,并将事件发布到 Timeline Service 2.0。

关于此任务
写入 Timeline Service 2.0 的 YARN 应用程序必须在群集上运行。

步骤

  1. 创建并启动 timeline 客户端。
    你必须指定应用程序 ID 才能写入 Timeline Service 2.0。
    以下是定义 timeline 客户端的示例:
    // 创建并启动 Timeline client v.2
    TimelineV2Client timelineClient =
        TimelineV2Client.createTimelineClient(appId);
    timelineClient.init(conf);
    timelineClient.start();
    
    try {
      TimelineEntity myEntity = new TimelineEntity();
      myEntity.setType("MY_APPLICATION");
      myEntity.setId("MyApp1");
      // 编写其它实体信息
    
      // Blocking write
      timelineClient.putEntities(myEntity);
    
      TimelineEntity myEntity2 = new TimelineEntity();
      // 编写其它信息
    
      // Non-blocking write
      timelineClient.putEntitiesAsync(myEntity2);
    
    } catch (IOException | YarnException e) {
      // 处理异常
    } finally {
      // 停止 Timeline client
      timelineClient.stop();
    }
    
  2. 设置 timeline collector 信息
    你可以使用 amRMClient 并注册 timeline 客户端,也可以在 timeline 客户端中显式设置信息。
    amRMClient.registerTimelineV2Client(timelineClient);
    
    timelineClient.setTimelineCollectorInfo(response.getCollectorInfo());
    

7.1 Timeline Service 2.0 应用程序信息

你可以发布有关你的应用程序的不同类型的信息,诸如此类的实体、事件和指标,将其添加到 Timeline Service 2.0 中。

7.1.1 Timeline 实体对象

你可以通过 timeline 实体对象中的以下字段提供应用程序信息:

  • 事件(events):一组 timeline 事件,按事件的时间戳降序排列,每个事件都包含一个 ID 和一个用于存储相关信息的映射,并且与一个时间戳相关联。
  • configs:从配置名到配置值的映射,表示与该实体关联的所有配置。用户可以在此字段中发布整个配置或部分配置,应用程序和通用实体均支持该字段。
  • 指标(metrics):与特定实体相关的一组指标。metrics 有两种类型:单值指标和时间序列指标。每个指标项目都包含指标名称、值以及要在指标中执行的聚合操作的类型。flow run、应用程序和通用实体均支持该字段。
  • info:从 info key 名到 info 值对象的映射,该 info 值对象保存有关实体的相关信息。该字段受应用程序和通用实体支持。
  • isrelatedtoEntitiesrelatedtoEntities:每个实体都包含 relatedtoEntitiesisrelatedtoEntities 字段以表示与其他实体的关系。这两个字段均由从关系名称字符串到时间轴实体的映射表示。

7.1.2 Timeline 指标

发布 timeline 指标时你可以选择如何汇总每个指标,术语 aggregate 是指对一组实体应用 TimelineMetricOperation。 通过 Timeline Service 2.0,可以在一个 YARN 应用程序中聚合来自不同 timeline 实体的指标。 以下是 TimelineMetricOperation 支持的操作类型:

  • MAX:检索所有 TimelineMetric 对象之间的最大值。
  • SUM:检索所有 TimelineMetric 对象的总和。

NOP 的默认值表示不执行实时聚合操作。

7.1.3 Flow 上下文

为了利用 Timeline Service 2.0 提供的流支持,应用程序框架必须尽可能地设置流上下文。 流上下文包括以下内容:

  • 流名称(Flow Name):用于标识高级流的字符串;例如 distributed grep 或可以唯一表示应用程序的任何可识别名称。如果未设置名称,则默认值为应用程序的名称或应用程序的ID。
  • **Flow Run ID(流量运行ID):一个单调递增的数字序列,用于区分同一流的不同运行。缺省值是应用程序时间,以 UNIX 时间(毫秒)为单位。
  • 流版本(Flow Version):此可选值是一个字符串标识符,表示流的版本。流版本可用于标识流中的更改,例如代码更改或脚本更改。默认版本号是1。

您可以通过 YARN 应用程序标签提供流上下文,如以下示例所示:

ApplicationSubmissionContext appContext = app.getApplicationSubmissionContext();

// 将流上下文设置为 YARN application tags
Set<String> tags = new HashSet<>();
tags.add(TimelineUtils.generateFlowNameTag("distributed grep"));
tags.add(Timelineutils.generateFlowVersionTag
("3df8b0d6100530080d2e0decf9e528e57c42a90a"));
tags.add(TimelineUtils.generateFlowRunIdTag(System.currentTimeMillis()));

appContext.setApplicationTags(tags);

【注意】
ResourceManager 在存储 YARN 应用程序标签之前将其转换为小写值。因此必须在 REST API 查询中使用流名称和版本之前将其转换为小写。


8 查询 Timeline Service 2.0 的 REST API

你必须使用 REST API 来查询 Timeline Service 2.0 并检索有关应用程序的信息。该 API 在 timeline 服务的 Web 服务上的路径 /ws/v2/timeline/ 上实现。

下表列出了针对 Timeline Service 2.0 的 REST API 支持的不同类型的查询:

如果要查询…使用此 HTTP 请求语法…
API 的根路径GET /ws/v2/timeline/
Active flowsGET /ws/v2/timeline/clusters/{cluster name}/flows/
OR
GET /ws/v2/timeline/flows/
Active flow runsGET /ws/v2/timeline/clusters/{cluster name}/users/{user name}/flows/{flow name}/runs/
OR
GET /ws/v2/timeline/users/{user name}/flows/{flow name}/runs/
特定流运行GET /ws/v2/timeline/clusters/{cluster name}/users/{user name}/flows/{flow name}/runs/{run id}
OR
GET /ws/v2/timeline/users/{user name}/flows/{flow name}/runs/{run id}
属于流的 YARN 应用程序GET /ws/v2/timeline/clusters/{cluster name}/users/{user name}/flows/{flow name}/apps
OR
GET /ws/v2/timeline/users/{user name}/flows/{flow name}/apps
属于流运行的 YARN 应用程序GET /ws/v2/timeline/clusters/{cluster name}/users/{user name}/flows/{flow name}/runs/{run id}/apps
OR
GET /ws/v2/timeline/users/{user name}/flows/{flow name}/runs/{run id}/apps/
特定的 YARN 应用程序GET /ws/v2/timeline/clusters/{cluster name}/apps/{app id}
OR
GET /ws/v2/timeline/apps/{app id}
应用程序范围内的通用 timeline 实体GET /ws/v2/timeline/clusters/{cluster name}/apps/{app id}/entities/{entity type}
OR
GET /ws/v2/timeline/apps/{app id}/entities/{entity type}
每个用户的通用 timeline 实体GET /ws/v2/timeline/clusters/{cluster name}/users/{userid}/entities/{entitytype}
OR
GET /ws/v2/timeline/users/{userid}/entities/{entitytype}
特定的 timeline 实体GET /ws/v2/timeline/clusters/{cluster name}/apps/{app id}/entities/{entity type}/{entity id}
OR
GET /ws/v2/timeline/apps/{app id}/entities/{entity type}/{entity id}
每个用户的通用 timeline 实体GET /ws/v2/timeline/clusters/{cluster name}/users/{userid}/entities/{entitytype}/{entityid}
OR
GET /ws/v2/timeline/users/{userid}/entities/{entitytype}/{entityid}
应用程序 ID 的一组可用实体类型GET /ws/v2/timeline/apps/{appid}/entity-types
OR
GET /ws/v2/timeline/clusters/{clusterid}/apps/{appid}/entity-types

【注意】
有关这些 API 查询类型的更多信息,请参阅 https://hadoop.apache.org/docs/r3.1.0/hadoop-yarn/hadoop-yarn-site/TimelineServiceV2.html#Timeline_Service_v.2_REST_API


资料

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐