[REEF-1930] Update environmentVariablesMap name in .NET code * Rename envMap to environmentVariablesMap * Remove the real env variable in HelloREEFYarn as it impacts the testing.
JIRA: [REEF-1930](https://issues.apache.org/jira/browse/REEF-1930) Pull Request: This closes #1399 Project: http://git-wip-us.apache.org/repos/asf/reef/repo Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/daf33d56 Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/daf33d56 Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/daf33d56 Branch: refs/heads/REEF-335 Commit: daf33d56ca5937f49392bb1e950ab6456a81983a Parents: e147293 Author: Julia Wang <[email protected]> Authored: Tue Oct 24 21:59:22 2017 -0700 Committer: Markus Weimer <[email protected]> Committed: Wed Oct 25 15:29:33 2017 -0700 ---------------------------------------------------------------------- .../YarnREEFParamSerializerTests.cs | 2 +- .../Avro/YARN/AvroYarnClusterJobSubmissionParameters.cs | 6 +++--- lang/cs/Org.Apache.REEF.Client/YARN/YarnREEFParamSerializer.cs | 2 +- lang/cs/Org.Apache.REEF.Examples.HelloREEF/HelloREEFYarn.cs | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/reef/blob/daf33d56/lang/cs/Org.Apache.REEF.Client.Tests/YarnREEFParamSerializerTests.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Client.Tests/YarnREEFParamSerializerTests.cs b/lang/cs/Org.Apache.REEF.Client.Tests/YarnREEFParamSerializerTests.cs index 040a9f8..76c591d 100644 --- a/lang/cs/Org.Apache.REEF.Client.Tests/YarnREEFParamSerializerTests.cs +++ b/lang/cs/Org.Apache.REEF.Client.Tests/YarnREEFParamSerializerTests.cs @@ -159,7 +159,7 @@ namespace Org.Apache.REEF.Client.Tests "\"securityTokenService\":\"{0}\"," + "\"maxApplicationSubmissions\":{1}," + "\"driverMemory\":{1}," + - "\"envMap\":{{\"key1\":\"{0}\",\"key2\":\"{0}\"}}," + + "\"environmentVariablesMap\":{{\"key1\":\"{0}\",\"key2\":\"{0}\"}}," + "\"driverStdoutFilePath\":\"{0}\"," + "\"driverStderrFilePath\":\"{0}\"" + "}}"; http://git-wip-us.apache.org/repos/asf/reef/blob/daf33d56/lang/cs/Org.Apache.REEF.Client/Avro/YARN/AvroYarnClusterJobSubmissionParameters.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Client/Avro/YARN/AvroYarnClusterJobSubmissionParameters.cs b/lang/cs/Org.Apache.REEF.Client/Avro/YARN/AvroYarnClusterJobSubmissionParameters.cs index 9bf2a64..d344c4b 100644 --- a/lang/cs/Org.Apache.REEF.Client/Avro/YARN/AvroYarnClusterJobSubmissionParameters.cs +++ b/lang/cs/Org.Apache.REEF.Client/Avro/YARN/AvroYarnClusterJobSubmissionParameters.cs @@ -29,7 +29,7 @@ namespace Org.Apache.REEF.Client.Avro.YARN [DataContract(Namespace = "org.apache.reef.reef.bridge.client.avro")] public sealed class AvroYarnClusterJobSubmissionParameters { - private const string JsonSchema = @"{""type"":""record"",""name"":""org.apache.reef.reef.bridge.client.avro.AvroYarnClusterJobSubmissionParameters"",""doc"":""Cross-language submission parameters to the YARN runtime using Hadoop's submission client"",""fields"":[{""name"":""yarnJobSubmissionParameters"",""type"":{""type"":""record"",""name"":""org.apache.reef.reef.bridge.client.avro.AvroYarnJobSubmissionParameters"",""doc"":""General cross-language submission parameters to the YARN runtime"",""fields"":[{""name"":""sharedJobSubmissionParameters"",""type"":{""type"":""record"",""name"":""org.apache.reef.reef.bridge.client.avro.AvroJobSubmissionParameters"",""doc"":""General cross-language job submission parameters shared by all runtimes"",""fields"":[{""name"":""jobId"",""type"":""string""},{""name"":""jobSubmissionFolder"",""type"":""string""}]}},{""name"":""dfsJobSubmissionFolder"",""type"":""string""},{""name"":""fileSystemUrl"",""type"":""string""},{""name"":""jobSubmissi onDirectoryPrefix"",""type"":""string""}]}},{""name"":""securityTokenKind"",""type"":""string""},{""name"":""securityTokenService"",""type"":""string""},{""name"":""driverMemory"",""type"":""int""},{""name"":""envMap"",""type"":{""type"":""map"",""values"":""string""}},{""name"":""maxApplicationSubmissions"",""type"":""int""},{""name"":""driverStdoutFilePath"",""type"":""string""},{""name"":""driverStderrFilePath"",""type"":""string""}]}"; + private const string JsonSchema = @"{""type"":""record"",""name"":""org.apache.reef.reef.bridge.client.avro.AvroYarnClusterJobSubmissionParameters"",""doc"":""Cross-language submission parameters to the YARN runtime using Hadoop's submission client"",""fields"":[{""name"":""yarnJobSubmissionParameters"",""type"":{""type"":""record"",""name"":""org.apache.reef.reef.bridge.client.avro.AvroYarnJobSubmissionParameters"",""doc"":""General cross-language submission parameters to the YARN runtime"",""fields"":[{""name"":""sharedJobSubmissionParameters"",""type"":{""type"":""record"",""name"":""org.apache.reef.reef.bridge.client.avro.AvroJobSubmissionParameters"",""doc"":""General cross-language job submission parameters shared by all runtimes"",""fields"":[{""name"":""jobId"",""type"":""string""},{""name"":""jobSubmissionFolder"",""type"":""string""}]}},{""name"":""dfsJobSubmissionFolder"",""type"":""string""},{""name"":""fileSystemUrl"",""type"":""string""},{""name"":""jobSubmissi onDirectoryPrefix"",""type"":""string""}]}},{""name"":""securityTokenKind"",""type"":""string""},{""name"":""securityTokenService"",""type"":""string""},{""name"":""driverMemory"",""type"":""int""},{""name"":""environmentVariablesMap"",""type"":{""type"":""map"",""values"":""string""}},{""name"":""maxApplicationSubmissions"",""type"":""int""},{""name"":""driverStdoutFilePath"",""type"":""string""},{""name"":""driverStderrFilePath"",""type"":""string""}]}"; /// <summary> /// Gets the schema. @@ -70,7 +70,7 @@ namespace Org.Apache.REEF.Client.Avro.YARN /// Gets or sets the envMap field. /// </summary> [DataMember] - public IDictionary<string, string> envMap { get; set; } + public IDictionary<string, string> environmentVariablesMap { get; set; } /// <summary> /// Gets or sets the maxApplicationSubmissions field. @@ -116,7 +116,7 @@ namespace Org.Apache.REEF.Client.Avro.YARN this.securityTokenKind = securityTokenKind; this.securityTokenService = securityTokenService; this.driverMemory = driverMemory; - this.envMap = envMap; + this.environmentVariablesMap = envMap; this.maxApplicationSubmissions = maxApplicationSubmissions; this.driverStdoutFilePath = driverStdoutFilePath; this.driverStderrFilePath = driverStderrFilePath; http://git-wip-us.apache.org/repos/asf/reef/blob/daf33d56/lang/cs/Org.Apache.REEF.Client/YARN/YarnREEFParamSerializer.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Client/YARN/YarnREEFParamSerializer.cs b/lang/cs/Org.Apache.REEF.Client/YARN/YarnREEFParamSerializer.cs index 8fd6a4f..49285bc 100644 --- a/lang/cs/Org.Apache.REEF.Client/YARN/YarnREEFParamSerializer.cs +++ b/lang/cs/Org.Apache.REEF.Client/YARN/YarnREEFParamSerializer.cs @@ -168,7 +168,7 @@ namespace Org.Apache.REEF.Client.YARN yarnJobSubmissionParameters = avroYarnJobSubmissionParameters, driverMemory = jobParameters.DriverMemoryInMB, - envMap = jobParameters.JobSubmissionEnvMap, + environmentVariablesMap = jobParameters.JobSubmissionEnvMap, maxApplicationSubmissions = jobParameters.MaxApplicationSubmissions, driverStdoutFilePath = string.IsNullOrWhiteSpace(jobParameters.StdoutFilePath.Value) ? _fileNames.GetDefaultYarnDriverStdoutFilePath() : jobParameters.StdoutFilePath.Value, http://git-wip-us.apache.org/repos/asf/reef/blob/daf33d56/lang/cs/Org.Apache.REEF.Examples.HelloREEF/HelloREEFYarn.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples.HelloREEF/HelloREEFYarn.cs b/lang/cs/Org.Apache.REEF.Examples.HelloREEF/HelloREEFYarn.cs index 2285a50..e7dfcf0 100644 --- a/lang/cs/Org.Apache.REEF.Examples.HelloREEF/HelloREEFYarn.cs +++ b/lang/cs/Org.Apache.REEF.Examples.HelloREEF/HelloREEFYarn.cs @@ -94,8 +94,7 @@ namespace Org.Apache.REEF.Examples.HelloREEF .AddDriverConfiguration(driverConfig.Build()) .AddGlobalAssemblyForType(typeof(HelloDriverYarn)) .SetJobIdentifier("HelloREEF") - .SetJobSubmissionEnvironmentVariable(Environment.PATH.ToString(), "value1") - .SetJobSubmissionEnvironmentVariable("UserDefineKey", "value2") + .SetJobSubmissionEnvironmentVariable("UserDefineKey", "value1") .SetJavaLogLevel(JavaLoggingSetting.Verbose) .Build();
