public override ByteBuffer GetTokens() { YarnProtos.ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder; if (this.tokens != null) { return(this.tokens); } if (!p.HasTokens()) { return(null); } this.tokens = ConvertFromProtoFormat(p.GetTokens()); return(this.tokens); }
private void InitEnv() { if (this.environment != null) { return; } YarnProtos.ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder; IList <YarnProtos.StringStringMapProto> list = p.GetEnvironmentList(); this.environment = new Dictionary <string, string>(); foreach (YarnProtos.StringStringMapProto c in list) { this.environment[c.GetKey()] = c.GetValue(); } }
private void InitServiceData() { if (this.serviceData != null) { return; } YarnProtos.ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder; IList <YarnProtos.StringBytesMapProto> list = p.GetServiceDataList(); this.serviceData = new Dictionary <string, ByteBuffer>(); foreach (YarnProtos.StringBytesMapProto c in list) { this.serviceData[c.GetKey()] = ConvertFromProtoFormat(c.GetValue()); } }
private void InitLocalResources() { if (this.localResources != null) { return; } YarnProtos.ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder; IList <YarnProtos.StringLocalResourceMapProto> list = p.GetLocalResourcesList(); this.localResources = new Dictionary <string, LocalResource>(); foreach (YarnProtos.StringLocalResourceMapProto c in list) { this.localResources[c.GetKey()] = ConvertFromProtoFormat(c.GetValue()); } }
private void InitCommands() { if (this.commands != null) { return; } YarnProtos.ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder; IList <string> list = p.GetCommandList(); this.commands = new AList <string>(); foreach (string c in list) { this.commands.AddItem(c); } }
private void InitApplicationACLs() { if (this.applicationACLS != null) { return; } YarnProtos.ContainerLaunchContextProtoOrBuilder 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(); } }