| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Collections; |
| | 10 | | using System.Collections.Generic; |
| | 11 | | using Azure.Core; |
| | 12 | |
|
| | 13 | | namespace Azure.Analytics.Synapse.Artifacts.Models |
| | 14 | | { |
| | 15 | | /// <summary> The properties of the Spark job. </summary> |
| | 16 | | public partial class SparkJobProperties : IDictionary<string, object> |
| | 17 | | { |
| | 18 | | /// <summary> Initializes a new instance of SparkJobProperties. </summary> |
| | 19 | | /// <param name="file"> File containing the application to execute. </param> |
| | 20 | | /// <param name="driverMemory"> Amount of memory to use for the driver process. </param> |
| | 21 | | /// <param name="driverCores"> Number of cores to use for the driver. </param> |
| | 22 | | /// <param name="executorMemory"> Amount of memory to use per executor process. </param> |
| | 23 | | /// <param name="executorCores"> Number of cores to use for each executor. </param> |
| | 24 | | /// <param name="numExecutors"> Number of executors to launch for this job. </param> |
| | 25 | | /// <exception cref="ArgumentNullException"> <paramref name="file"/>, <paramref name="driverMemory"/>, or <param |
| 0 | 26 | | public SparkJobProperties(string file, string driverMemory, int driverCores, string executorMemory, int executor |
| | 27 | | { |
| 0 | 28 | | if (file == null) |
| | 29 | | { |
| 0 | 30 | | throw new ArgumentNullException(nameof(file)); |
| | 31 | | } |
| 0 | 32 | | if (driverMemory == null) |
| | 33 | | { |
| 0 | 34 | | throw new ArgumentNullException(nameof(driverMemory)); |
| | 35 | | } |
| 0 | 36 | | if (executorMemory == null) |
| | 37 | | { |
| 0 | 38 | | throw new ArgumentNullException(nameof(executorMemory)); |
| | 39 | | } |
| | 40 | |
|
| 0 | 41 | | File = file; |
| 0 | 42 | | Args = new ChangeTrackingList<string>(); |
| 0 | 43 | | Jars = new ChangeTrackingList<string>(); |
| 0 | 44 | | Files = new ChangeTrackingList<string>(); |
| 0 | 45 | | Archives = new ChangeTrackingList<string>(); |
| 0 | 46 | | DriverMemory = driverMemory; |
| 0 | 47 | | DriverCores = driverCores; |
| 0 | 48 | | ExecutorMemory = executorMemory; |
| 0 | 49 | | ExecutorCores = executorCores; |
| 0 | 50 | | NumExecutors = numExecutors; |
| 0 | 51 | | AdditionalProperties = new ChangeTrackingDictionary<string, object>(); |
| 0 | 52 | | } |
| | 53 | |
|
| | 54 | | /// <summary> Initializes a new instance of SparkJobProperties. </summary> |
| | 55 | | /// <param name="name"> The name of the job. </param> |
| | 56 | | /// <param name="file"> File containing the application to execute. </param> |
| | 57 | | /// <param name="className"> Main class for Java/Scala application. </param> |
| | 58 | | /// <param name="conf"> Spark configuration properties. </param> |
| | 59 | | /// <param name="args"> Command line arguments for the application. </param> |
| | 60 | | /// <param name="jars"> Jars to be used in this job. </param> |
| | 61 | | /// <param name="files"> files to be used in this job. </param> |
| | 62 | | /// <param name="archives"> Archives to be used in this job. </param> |
| | 63 | | /// <param name="driverMemory"> Amount of memory to use for the driver process. </param> |
| | 64 | | /// <param name="driverCores"> Number of cores to use for the driver. </param> |
| | 65 | | /// <param name="executorMemory"> Amount of memory to use per executor process. </param> |
| | 66 | | /// <param name="executorCores"> Number of cores to use for each executor. </param> |
| | 67 | | /// <param name="numExecutors"> Number of executors to launch for this job. </param> |
| | 68 | | /// <param name="additionalProperties"> . </param> |
| 0 | 69 | | internal SparkJobProperties(string name, string file, string className, object conf, IList<string> args, IList<s |
| | 70 | | { |
| 0 | 71 | | Name = name; |
| 0 | 72 | | File = file; |
| 0 | 73 | | ClassName = className; |
| 0 | 74 | | Conf = conf; |
| 0 | 75 | | Args = args; |
| 0 | 76 | | Jars = jars; |
| 0 | 77 | | Files = files; |
| 0 | 78 | | Archives = archives; |
| 0 | 79 | | DriverMemory = driverMemory; |
| 0 | 80 | | DriverCores = driverCores; |
| 0 | 81 | | ExecutorMemory = executorMemory; |
| 0 | 82 | | ExecutorCores = executorCores; |
| 0 | 83 | | NumExecutors = numExecutors; |
| 0 | 84 | | AdditionalProperties = additionalProperties; |
| 0 | 85 | | } |
| | 86 | |
|
| | 87 | | /// <summary> The name of the job. </summary> |
| 0 | 88 | | public string Name { get; set; } |
| | 89 | | /// <summary> File containing the application to execute. </summary> |
| 0 | 90 | | public string File { get; set; } |
| | 91 | | /// <summary> Main class for Java/Scala application. </summary> |
| 0 | 92 | | public string ClassName { get; set; } |
| | 93 | | /// <summary> Spark configuration properties. </summary> |
| 0 | 94 | | public object Conf { get; set; } |
| | 95 | | /// <summary> Command line arguments for the application. </summary> |
| 0 | 96 | | public IList<string> Args { get; } |
| | 97 | | /// <summary> Jars to be used in this job. </summary> |
| 0 | 98 | | public IList<string> Jars { get; } |
| | 99 | | /// <summary> files to be used in this job. </summary> |
| 0 | 100 | | public IList<string> Files { get; } |
| | 101 | | /// <summary> Archives to be used in this job. </summary> |
| 0 | 102 | | public IList<string> Archives { get; } |
| | 103 | | /// <summary> Amount of memory to use for the driver process. </summary> |
| 0 | 104 | | public string DriverMemory { get; set; } |
| | 105 | | /// <summary> Number of cores to use for the driver. </summary> |
| 0 | 106 | | public int DriverCores { get; set; } |
| | 107 | | /// <summary> Amount of memory to use per executor process. </summary> |
| 0 | 108 | | public string ExecutorMemory { get; set; } |
| | 109 | | /// <summary> Number of cores to use for each executor. </summary> |
| 0 | 110 | | public int ExecutorCores { get; set; } |
| | 111 | | /// <summary> Number of executors to launch for this job. </summary> |
| 0 | 112 | | public int NumExecutors { get; set; } |
| 0 | 113 | | internal IDictionary<string, object> AdditionalProperties { get; } |
| | 114 | | /// <inheritdoc /> |
| 0 | 115 | | public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator(); |
| | 116 | | /// <inheritdoc /> |
| 0 | 117 | | IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); |
| | 118 | | /// <inheritdoc /> |
| 0 | 119 | | public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); |
| | 120 | | /// <inheritdoc /> |
| 0 | 121 | | public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); |
| | 122 | | /// <inheritdoc /> |
| 0 | 123 | | public ICollection<string> Keys => AdditionalProperties.Keys; |
| | 124 | | /// <inheritdoc /> |
| 0 | 125 | | public ICollection<object> Values => AdditionalProperties.Values; |
| | 126 | | /// <inheritdoc /> |
| 0 | 127 | | int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count; |
| | 128 | | /// <inheritdoc /> |
| 0 | 129 | | public void Add(string key, object value) => AdditionalProperties.Add(key, value); |
| | 130 | | /// <inheritdoc /> |
| 0 | 131 | | public bool Remove(string key) => AdditionalProperties.Remove(key); |
| | 132 | | /// <inheritdoc /> |
| 0 | 133 | | bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly; |
| | 134 | | /// <inheritdoc /> |
| 0 | 135 | | void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A |
| | 136 | | /// <inheritdoc /> |
| 0 | 137 | | bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie |
| | 138 | | /// <inheritdoc /> |
| 0 | 139 | | bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert |
| | 140 | | /// <inheritdoc /> |
| 0 | 141 | | void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) => |
| | 142 | | /// <inheritdoc /> |
| 0 | 143 | | void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear(); |
| | 144 | | /// <inheritdoc /> |
| | 145 | | public object this[string key] |
| | 146 | | { |
| 0 | 147 | | get => AdditionalProperties[key]; |
| 0 | 148 | | set => AdditionalProperties[key] = value; |
| | 149 | | } |
| | 150 | | } |
| | 151 | | } |