Class YarnServerBuilderUtils
java.lang.Object
org.apache.hadoop.yarn.server.utils.YarnServerBuilderUtils
Server Builder utilities to construct various objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<org.apache.hadoop.yarn.api.records.ApplicationId,ByteBuffer> convertFromProtoFormat(Collection<org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProto> systemCredentials) Convert Collection of SystemCredentialsForAppsProto proto objects to a Map of ApplicationId to ByteBuffer.static List<org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProto>convertToProtoFormat(Map<org.apache.hadoop.yarn.api.records.ApplicationId, ByteBuffer> systemCredentialsForApps) Convert Map of Application Id to ByteBuffer to Collection of SystemCredentialsForAppsProto proto objects.static NodeHeartbeatResponsenewNodeHeartbeatResponse(int responseId, NodeAction action, List<org.apache.hadoop.yarn.api.records.ContainerId> containersToCleanUp, List<org.apache.hadoop.yarn.api.records.ApplicationId> applicationsToCleanUp, MasterKey containerTokenMasterKey, MasterKey nmTokenMasterKey, long nextHeartbeatInterval) static NodeHeartbeatResponsenewNodeHeartbeatResponse(NodeAction action, String diagnosticsMessage) static org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProtonewSystemCredentialsForAppsProto(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, ByteBuffer credentials) Build SystemCredentialsForAppsProto objects.
-
Constructor Details
-
YarnServerBuilderUtils
public YarnServerBuilderUtils()
-
-
Method Details
-
newNodeHeartbeatResponse
public static NodeHeartbeatResponse newNodeHeartbeatResponse(NodeAction action, String diagnosticsMessage) -
newNodeHeartbeatResponse
public static NodeHeartbeatResponse newNodeHeartbeatResponse(int responseId, NodeAction action, List<org.apache.hadoop.yarn.api.records.ContainerId> containersToCleanUp, List<org.apache.hadoop.yarn.api.records.ApplicationId> applicationsToCleanUp, MasterKey containerTokenMasterKey, MasterKey nmTokenMasterKey, long nextHeartbeatInterval) -
newSystemCredentialsForAppsProto
public static org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProto newSystemCredentialsForAppsProto(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, ByteBuffer credentials) Build SystemCredentialsForAppsProto objects.- Parameters:
applicationId- Application IDcredentials- HDFS Tokens- Returns:
- systemCredentialsForAppsProto
-
convertFromProtoFormat
public static Map<org.apache.hadoop.yarn.api.records.ApplicationId,ByteBuffer> convertFromProtoFormat(Collection<org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProto> systemCredentials) Convert Collection of SystemCredentialsForAppsProto proto objects to a Map of ApplicationId to ByteBuffer.- Parameters:
systemCredentials- List of SystemCredentialsForAppsProto proto objects- Returns:
- systemCredentialsForApps Map of Application Id to ByteBuffer
-
convertToProtoFormat
public static List<org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProto> convertToProtoFormat(Map<org.apache.hadoop.yarn.api.records.ApplicationId, ByteBuffer> systemCredentialsForApps) Convert Map of Application Id to ByteBuffer to Collection of SystemCredentialsForAppsProto proto objects.- Parameters:
systemCredentialsForApps- Map of Application Id to ByteBuffer- Returns:
- systemCredentials List of SystemCredentialsForAppsProto proto objects
-