YARN-10448. SLS should set default user to handle SYNTH format. Contributed by zhuqi

This commit is contained in:
Adam Antal 2020-10-13 17:54:15 +02:00
parent c4fff74cc5
commit bd8cf7fd4c

View File

@ -143,6 +143,8 @@ public class SLSRunner extends Configured implements Tool {
private static boolean exitAtTheFinish = false; private static boolean exitAtTheFinish = false;
private static final String DEFAULT_USER = "default";
/** /**
* The type of trace in input. * The type of trace in input.
*/ */
@ -732,7 +734,8 @@ public class SLSRunner extends Configured implements Tool {
// creation // creation
while ((job = (SynthJob) stjp.getNextJob()) != null) { while ((job = (SynthJob) stjp.getNextJob()) != null) {
// only support MapReduce currently // only support MapReduce currently
String user = job.getUser(); String user = job.getUser() == null ? DEFAULT_USER :
job.getUser();
String jobQueue = job.getQueueName(); String jobQueue = job.getQueueName();
String oldJobId = job.getJobID().toString(); String oldJobId = job.getJobID().toString();
long jobStartTimeMS = job.getSubmissionTime(); long jobStartTimeMS = job.getSubmissionTime();