props.put(entry.getKey(), entry.getValue()); return new HadoopDefaultJobInfo(jobConf.getJobName(), jobConf.getUser(), hasCombiner, numReduces, props, credentials);
/** * Get the reported username for this job. * * @return the username */ public String getUser() { return conf.getUser(); }
private String getUserName(JobConf jobConf) { String user = jobConf.getUser(); if (user == null) { user = ""; } return user; }
/** * Get the reported username for this job. * * @return the username */ public String getUser() { return conf.getUser(); }
/** * Get the reported username for this job. * * @return the username */ public String getUser() { return conf.getUser(); }
/** * Get the reported username for this job. * * @return the username */ public String getUser() { return conf.getUser(); }
when(jobConf.getUser()).thenReturn(TEST_USER_NAME); when(jobConf.getJobName()).thenReturn(TEST_JOB_NAME);
/** * Get the user name from the job conf */ public static String getUserName(JobConf jobConf) { String user = jobConf.getUser(); if (user == null || user.length() == 0) { user = "NA"; } return user; }
/** * Obtain username from TaskId * @param taskId * @return username */ public String getUserName(TaskAttemptID taskId) { TaskInProgress tip = tasks.get(taskId); if (tip != null) { return tip.getJobConf().getUser(); } return null; }
private void createTask() throws IOException { task = new MapTask(jobConfFile.toURI().toString(), taskId, 1, null, 1); task.setConf(jobConf); // Set conf. Set user name in particular. task.setUser(jobConf.getUser()); }
MyFakeJobInProgress(JobConf jc, JobTracker jt) throws IOException { super((jobid = new JobID(jtIdentifier, jobCounter ++)), jc, jt); Path jobFile = new Path("Dummy"); this.profile = new JobProfile(jc.getUser(), jobid, jobFile.toString(), null, jc.getJobName(), jc.getQueueName()); this.jobHistory = new FakeJobHistory(); }
/** Creates the working directory pathname for a task attempt. */ static File formWorkDir(LocalDirAllocator lDirAlloc, TaskAttemptID task, boolean isCleanup, JobConf conf) throws IOException { Path workDir = lDirAlloc.getLocalPathToRead(TaskTracker.getTaskWorkDir( conf.getUser(), task.getJobID().toString(), task.toString(), isCleanup), conf); return new File(workDir.toString()); }
@SuppressWarnings("deprecation") FakeJobInProgress(JobConf jobConf, JobTracker tracker) throws IOException { super(new JobID(jtIdentifier, ++jobCounter), jobConf, tracker); Path jobFile = new Path("Dummy"); this.profile = new JobProfile(jobConf.getUser(), getJobID(), jobFile.toString(), null, jobConf.getJobName(), jobConf.getQueueName()); this.jobHistory = new FakeJobHistory(); }
public FakeJobInProgress(JobConf jobConf, FakeTaskTrackerManager taskTrackerManager, JobTracker jt) throws IOException { super(new JobID("test", ++jobCounter), jobConf, jt); this.taskTrackerManager = taskTrackerManager; this.startTime = System.currentTimeMillis(); this.status = new JobStatus(getJobID(), 0f, 0f, JobStatus.PREP, jobConf.getUser(), jobConf.getJobName(), "", ""); this.status.setJobPriority(JobPriority.NORMAL); this.status.setStartTime(startTime); }
public Void run() throws IOException { taskDistributedCacheManager = tracker.getTrackerDistributedCacheManager() .newTaskDistributedCacheManager(conf); taskDistributedCacheManager.setup(lDirAlloc, workDir, TaskTracker .getPrivateDistributedCacheDir(conf.getUser()), TaskTracker.getPublicDistributedCacheDir()); return null; } });
public FakeJobInProgress(JobConf jobConf, FakeTaskTrackerManager taskTrackerManager, JobTracker jt) throws IOException { super(new JobID("test", ++jobCounter), jobConf, jt); this.startTime = System.currentTimeMillis(); this.status = new JobStatus(getJobID(), 0f, 0f, JobStatus.PREP, jobConf.getUser(), jobConf.getJobName(), "", ""); this.status.setJobPriority(JobPriority.NORMAL); this.status.setStartTime(startTime); this.jobHistory = new FakeJobHistory(); }
void logSubmissionToJobHistory() throws IOException { // log job info String username = conf.getUser(); if (username == null) { username = ""; } String jobname = conf.getJobName(); String jobQueueName = conf.getQueueName(); setUpLocalizedJobConf(conf, jobId); jobHistory.setupEventWriter(jobId, conf); JobSubmittedEvent jse = new JobSubmittedEvent(jobId, jobname, username, this.startTime, jobFile.toString(), status.getJobACLs(), jobQueueName); jobHistory.logEvent(jse, jobId); }
ShuffleClientMetrics(TaskAttemptID reduceId, JobConf jobConf) { this.numCopiers = jobConf.getInt(MRJobConfig.SHUFFLE_PARALLEL_COPIES, 5); MetricsContext metricsContext = MetricsUtil.getContext("mapred"); this.shuffleMetrics = MetricsUtil.createRecord(metricsContext, "shuffleInput"); this.shuffleMetrics.setTag("user", jobConf.getUser()); this.shuffleMetrics.setTag("jobName", jobConf.getJobName()); this.shuffleMetrics.setTag("jobId", reduceId.getJobID().toString()); this.shuffleMetrics.setTag("taskId", reduceId.toString()); this.shuffleMetrics.setTag("sessionId", jobConf.getSessionId()); metricsContext.registerUpdater(this); } public synchronized void inputBytes(long numBytes) {
ShuffleClientMetrics(TaskAttemptID reduceId, JobConf jobConf) { this.numCopiers = jobConf.getInt(MRJobConfig.SHUFFLE_PARALLEL_COPIES, 5); MetricsContext metricsContext = MetricsUtil.getContext("mapred"); this.shuffleMetrics = MetricsUtil.createRecord(metricsContext, "shuffleInput"); this.shuffleMetrics.setTag("user", jobConf.getUser()); this.shuffleMetrics.setTag("jobName", jobConf.getJobName()); this.shuffleMetrics.setTag("jobId", reduceId.getJobID().toString()); this.shuffleMetrics.setTag("taskId", reduceId.toString()); this.shuffleMetrics.setTag("sessionId", jobConf.getSessionId()); metricsContext.registerUpdater(this); } public synchronized void inputBytes(long numBytes) {
ShuffleClientMetrics(TaskAttemptID reduceId, JobConf jobConf) { this.numCopiers = jobConf.getInt(MRJobConfig.SHUFFLE_PARALLEL_COPIES, 5); MetricsContext metricsContext = MetricsUtil.getContext("mapred"); this.shuffleMetrics = MetricsUtil.createRecord(metricsContext, "shuffleInput"); this.shuffleMetrics.setTag("user", jobConf.getUser()); this.shuffleMetrics.setTag("jobName", jobConf.getJobName()); this.shuffleMetrics.setTag("jobId", reduceId.getJobID().toString()); this.shuffleMetrics.setTag("taskId", reduceId.toString()); this.shuffleMetrics.setTag("sessionId", jobConf.getSessionId()); metricsContext.registerUpdater(this); } public synchronized void inputBytes(long numBytes) {