All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.hadoop.yarn.api.records.NodeReport Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.hadoop.yarn.api.records;

import org.apache.hadoop.classification.InterfaceAudience.Private;
import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.hadoop.classification.InterfaceStability.Stable;
import org.apache.hadoop.classification.InterfaceStability.Unstable;
import org.apache.hadoop.yarn.api.ApplicationClientProtocol;
import org.apache.hadoop.yarn.util.Records;

/**
 * 

NodeReport is a summary of runtime information of a * node in the cluster.

* *

It includes details such as: *

    *
  • {@link NodeId} of the node.
  • *
  • HTTP Tracking URL of the node.
  • *
  • Rack name for the node.
  • *
  • Used {@link Resource} on the node.
  • *
  • Total available {@link Resource} of the node.
  • *
  • Number of running containers on the node.
  • *
*

* * @see ApplicationClientProtocol#getClusterNodes(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest) */ @Public @Stable public abstract class NodeReport { @Private @Unstable public static NodeReport newInstance(NodeId nodeId, NodeState nodeState, String httpAddress, String rackName, Resource used, Resource capability, int numContainers, String healthReport, long lastHealthReportTime) { NodeReport nodeReport = Records.newRecord(NodeReport.class); nodeReport.setNodeId(nodeId); nodeReport.setNodeState(nodeState); nodeReport.setHttpAddress(httpAddress); nodeReport.setRackName(rackName); nodeReport.setUsed(used); nodeReport.setCapability(capability); nodeReport.setNumContainers(numContainers); nodeReport.setHealthReport(healthReport); nodeReport.setLastHealthReportTime(lastHealthReportTime); return nodeReport; } /** * Get the NodeId of the node. * @return NodeId of the node */ @Public @Stable public abstract NodeId getNodeId(); @Private @Unstable public abstract void setNodeId(NodeId nodeId); /** * Get the NodeState of the node. * @return NodeState of the node */ @Public @Stable public abstract NodeState getNodeState(); @Private @Unstable public abstract void setNodeState(NodeState nodeState); /** * Get the http address of the node. * @return http address of the node */ @Public @Stable public abstract String getHttpAddress(); @Private @Unstable public abstract void setHttpAddress(String httpAddress); /** * Get the rack name for the node. * @return rack name for the node */ @Public @Stable public abstract String getRackName(); @Private @Unstable public abstract void setRackName(String rackName); /** * Get used Resource on the node. * @return used Resource on the node */ @Public @Stable public abstract Resource getUsed(); @Private @Unstable public abstract void setUsed(Resource used); /** * Get the total Resource on the node. * @return total Resource on the node */ @Public @Stable public abstract Resource getCapability(); @Private @Unstable public abstract void setCapability(Resource capability); /** * Get the number of allocated containers on the node. * @return number of allocated containers on the node */ @Private @Unstable public abstract int getNumContainers(); @Private @Unstable public abstract void setNumContainers(int numContainers); /** * Get the diagnostic health report of the node. * @return diagnostic health report of the node */ @Public @Stable public abstract String getHealthReport(); @Private @Unstable public abstract void setHealthReport(String healthReport); /** * Get the last timestamp at which the health report was received. * @return last timestamp at which the health report was received */ @Public @Stable public abstract long getLastHealthReportTime(); @Private @Unstable public abstract void setLastHealthReportTime(long lastHealthReport); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy