Job job = new Job(conf,"job_name"), is just used for setting the user-specified job name. SEtting the job name is not mandatory since the job will be assigned a job id anyways. But, if we set a job name it becomes easier to track the status of the job while the job is running. This may not be useful a single small job running but this becomes an essential when multiple large jobs are running on the cluster. The job status can be checked using the below command:
yarn application -appStates RUNNING -list
Eclipse shows the statement as deprecated because the construction of the Job class that is Job(Confiuration conf, String jobName) is now deprecated. Instead of this, if you use the below code, most probably you will not be getting deprecated warning:
job.setJobName("mywc");