How to find Id of hadoop job job in code?

I have a Hadoop program in which there is a loop. At each iteration of the loop, a task is created. How to find job id in code?

+1
source share
1 answer

When submitting a Job instance, you can get information about the job ID using the getJobID method:

 Configuration config = new Configuration(); Job job = new Job(config); // configure your job job.submit(); // at that point your job is submitted but not finished and should have your job id String jobid = job.getJobID().toString(); 

Note that there was an error described in MAPREDUCE-118 that affected Hadoop versions prior to 0.20.204, where getJobID returned only null .

+2
source

Source: https://habr.com/ru/post/1482665/


All Articles