Skip to main content

Report

Sends a status report from a host.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const InitActsState = cloudApi.dataproc.manager_manager_service.InitActsState;
const ReportRequest = cloudApi.dataproc.manager_manager_service.ReportRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.DataprocManagerServiceClient);

const result = await client.report(
ReportRequest.fromPartial({
// cid: "cid",
// topologyRevision: 0,
// info: {
// hdfs: {
// available: true,
// percentRemaining: 0,
// used: 0,
// free: 0,
// totalBlocks: 0,
// missingBlocks: 0,
// missingBlocksReplicaOne: 0,
// liveNodes: [{
// name: "name",
// used: 0,
// remaining: 0,
// capacity: 0,
// numBlocks: 0,
// state: "state"
// }],
// deadNodes: [{
// name: "name",
// used: 0,
// remaining: 0,
// capacity: 0,
// numBlocks: 0,
// state: "state"
// }],
// safemode: "safemode",
// decommissioningNodes: [{
// name: "name",
// used: 0,
// remaining: 0,
// capacity: 0,
// numBlocks: 0,
// state: "state"
// }],
// decommissionedNodes: [{
// name: "name",
// used: 0,
// remaining: 0,
// capacity: 0,
// numBlocks: 0,
// state: "state"
// }],
// requestedDecommissionHosts: ["requestedDecommissionHosts"]
// },
// yarn: {
// available: true,
// liveNodes: [{
// name: "name",
// state: "state",
// numContainers: 0,
// usedMemoryMb: 0,
// availableMemoryMb: 0,
// updateTime: 0
// }],
// requestedDecommissionHosts: ["requestedDecommissionHosts"]
// },
// hive: {
// available: true,
// queriesSucceeded: 0,
// queriesFailed: 0,
// queriesExecuting: 0,
// sessionsOpen: 0,
// sessionsActive: 0
// },
// zookeeper: {
// alive: true
// },
// hbase: {
// available: true,
// regions: 0,
// requests: 0,
// averageLoad: 0,
// liveNodes: [{
// name: "name",
// requests: 0,
// heapSizeMb: 0,
// maxHeapSizeMb: 0
// }],
// deadNodes: [{
// name: "name",
// requests: 0,
// heapSizeMb: 0,
// maxHeapSizeMb: 0
// }]
// },
// oozie: {
// alive: true
// },
// reportCount: 0,
// livy: {
// alive: true
// },
// initActs: {
// state: InitActsState.FAILED,
// fqdns: ["fqdns"]
// }
// },
// collectedAt: {
// seconds: 0,
// nanos: 0
// }
})
);
console.log(result);
})();

ReportRequest

The request message containing the host status report.

cid : string
topologyRevision : int64
info : Info
collectedAt : google.protobuf.Timestamp

Info

hdfs : HDFSInfo
yarn : YarnInfo
hive : HiveInfo
zookeeper : ZookeeperInfo
hbase : HbaseInfo
oozie : OozieInfo
reportCount : int64

Report count is incremented every time report is sent by Dataproc Agent. So Worker can use this property to make sure that Dataproc Agent got data sent by Worker through Dataproc Manager for synchronization purposes

livy : LivyInfo
initActs : InitActs

HDFSInfo

available : bool
percentRemaining : double
used : int64
free : int64
totalBlocks : int64
missingBlocks : int64
missingBlocksReplicaOne : int64
liveNodes : HDFSNodeInfo
deadNodes : HDFSNodeInfo
safemode : string
decommissioningNodes : HDFSNodeInfo
decommissionedNodes : HDFSNodeInfo
requestedDecommissionHosts : string

Actual list of decommission hosts in HDFS namenode memory

YarnInfo

available : bool
liveNodes : YarnNodeInfo
requestedDecommissionHosts : string

Actual list of decommission hosts in Yarn resource manager memory

HiveInfo

available : bool
queriesSucceeded : int64
queriesFailed : int64
queriesExecuting : int64
sessionsOpen : int64
sessionsActive : int64

ZookeeperInfo

alive : bool

HbaseInfo

available : bool
regions : int64
requests : int64
averageLoad : double
liveNodes : HbaseNodeInfo
deadNodes : HbaseNodeInfo

OozieInfo

alive : bool

LivyInfo

alive : bool

InitActs

state : InitActsState
fqdns : string

fqdns of nodes for error message

HDFSNodeInfo

name : string
used : int64
remaining : int64
capacity : int64
numBlocks : int64
state : string

YarnNodeInfo

name : string
state : string
numContainers : int64
usedMemoryMb : int64
availableMemoryMb : int64
updateTime : int64

HbaseNodeInfo

name : string
requests : int64
heapSizeMb : int64
maxHeapSizeMb : int64

ReportReply

The response message containing the agent commands to apply on host.

decommissionTimeout : int64
yarnHostsToDecommission : string
hdfsHostsToDecommission : string