private void InitScope() { if (this.scope != null) { return; } YarnServiceProtos.GetApplicationsRequestProtoOrBuilder p = viaProto ? proto : builder; this.scope = ProtoUtils.ConvertFromProtoFormat(p.GetScope()); }
public override AMCommand GetAMCommand() { lock (this) { YarnServiceProtos.AllocateResponseProtoOrBuilder p = viaProto ? proto : builder; if (!p.HasAMCommand()) { return(null); } return(ProtoUtils.ConvertFromProtoFormat(p.GetAMCommand())); } }
private void InitNodeStates() { if (this.states != null) { return; } YarnServiceProtos.GetClusterNodesRequestProtoOrBuilder p = viaProto ? proto : builder; IList <YarnProtos.NodeStateProto> list = p.GetNodeStatesList(); this.states = EnumSet.NoneOf <NodeState>(); foreach (YarnProtos.NodeStateProto c in list) { this.states.AddItem(ProtoUtils.ConvertFromProtoFormat(c)); } }
private void InitApplicationStates() { if (this.applicationStates != null) { return; } YarnServiceProtos.GetApplicationsRequestProtoOrBuilder p = viaProto ? proto : builder; IList <YarnProtos.YarnApplicationStateProto> appStatesList = p.GetApplicationStatesList (); this.applicationStates = EnumSet.NoneOf <YarnApplicationState>(); foreach (YarnProtos.YarnApplicationStateProto c in appStatesList) { this.applicationStates.AddItem(ProtoUtils.ConvertFromProtoFormat(c)); } }
public override Credentials GetAppAttemptTokens() { YarnServerResourceManagerRecoveryProtos.ApplicationAttemptStateDataProtoOrBuilder p = viaProto ? proto : builder; if (appAttemptTokens != null) { return(ConvertCredentialsFromByteBuffer(appAttemptTokens)); } if (!p.HasAppAttemptTokens()) { return(null); } this.appAttemptTokens = ProtoUtils.ConvertFromProtoFormat(p.GetAppAttemptTokens() ); return(ConvertCredentialsFromByteBuffer(appAttemptTokens)); }
private void InitSystemCredentials() { YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder; IList <YarnServerCommonServiceProtos.SystemCredentialsForAppsProto> list = p.GetSystemCredentialsForAppsList (); this.systemCredentials = new Dictionary <ApplicationId, ByteBuffer>(); foreach (YarnServerCommonServiceProtos.SystemCredentialsForAppsProto c in list) { ApplicationId appId = ConvertFromProtoFormat(c.GetAppId()); ByteBuffer byteBuffer = ProtoUtils.ConvertFromProtoFormat(c.GetCredentialsForApp( )); this.systemCredentials[appId] = byteBuffer; } }
private void InitApplicationACLs() { if (this.applicationACLS != null) { return; } YarnServiceProtos.RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder; IList <YarnProtos.ApplicationACLMapProto> list = p.GetApplicationACLsList(); this.applicationACLS = new Dictionary <ApplicationAccessType, string>(list.Count); foreach (YarnProtos.ApplicationACLMapProto aclProto in list) { this.applicationACLS[ProtoUtils.ConvertFromProtoFormat(aclProto.GetAccessType())] = aclProto.GetAcl(); } }
protected internal ByteBuffer ConvertFromProtoFormat(ByteString byteString) { return(ProtoUtils.ConvertFromProtoFormat(byteString)); }
private ContainerState ConvertFromProtoFormat(YarnProtos.ContainerStateProto containerState ) { return(ProtoUtils.ConvertFromProtoFormat(containerState)); }
private FinalApplicationStatus ConvertFromProtoFormat(YarnProtos.FinalApplicationStatusProto s) { return(ProtoUtils.ConvertFromProtoFormat(s)); }
private YarnApplicationAttemptState ConvertFromProtoFormat(YarnProtos.YarnApplicationAttemptStateProto yarnApplicationAttemptState) { return(ProtoUtils.ConvertFromProtoFormat(yarnApplicationAttemptState)); }