You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
+21-2Lines changed: 21 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,8 @@ public class ApplicationMaster {
180
180
privateintnumTotalContainers = 1;
181
181
// Memory to request for the container on which the shell command will run
182
182
privateintcontainerMemory = 10;
183
+
// VirtualCores to request for the container on which the shell command will run
Copy file name to clipboardExpand all lines: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java
+31-4Lines changed: 31 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,8 @@ public class Client {
121
121
privateStringamQueue = "";
122
122
// Amt. of memory resource to request for to run the App Master
123
123
privateintamMemory = 10;
124
+
// Amt. of virtual core resource to request for to run the App Master
125
+
privateintamVCores = 1;
124
126
125
127
// Application master jar file
126
128
privateStringappMasterJar = "";
@@ -140,6 +142,8 @@ public class Client {
140
142
141
143
// Amt of memory to request for container in which shell script will be executed
142
144
privateintcontainerMemory = 10;
145
+
// Amt. of virtual cores to request for container in which shell script will be executed
146
+
privateintcontainerVirtualCores = 1;
143
147
// No. of containers in which the shell script needs to be executed
144
148
privateintnumContainers = 1;
145
149
@@ -208,13 +212,15 @@ public Client(Configuration conf) throws Exception {
208
212
opts.addOption("queue", true, "RM Queue in which this application is to be submitted");
209
213
opts.addOption("timeout", true, "Application timeout in milliseconds");
210
214
opts.addOption("master_memory", true, "Amount of memory in MB to be requested to run the application master");
215
+
opts.addOption("master_vcores", true, "Amount of virtual cores to be requested to run the application master");
211
216
opts.addOption("jar", true, "Jar file containing the application master");
212
217
opts.addOption("shell_command", true, "Shell command to be executed by the Application Master");
213
218
opts.addOption("shell_script", true, "Location of the shell script to be executed");
214
219
opts.addOption("shell_args", true, "Command line args for the shell script");
215
220
opts.addOption("shell_env", true, "Environment for shell script. Specified as env_key=env_val pairs");
216
221
opts.addOption("shell_cmd_priority", true, "Priority for the shell command containers");
217
222
opts.addOption("container_memory", true, "Amount of memory in MB to be requested to run the shell command");
223
+
opts.addOption("container_vcores", true, "Amount of virtual cores to be requested to run the shell command");
218
224
opts.addOption("num_containers", true, "No. of containers on which the shell command needs to be executed");
Copy file name to clipboardExpand all lines: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/TestDistributedShell.java
0 commit comments