/** * Implements the core-execution. Creates the file-list for copy, * and launches the Hadoop-job, to do the copy. * @return Job handle * @throws Exception */ public Job execute() throws Exception { Preconditions.checkState(context != null, "The DistCpContext should have been created before running DistCp!"); Job job = createAndSubmitJob(); if (context.shouldBlock()) { waitForJobCompletion(job); } return job; }
/** * Implements the core-execution. Creates the file-list for copy, * and launches the Hadoop-job, to do the copy. * @return Job handle * @throws Exception */ public Job execute() throws Exception { Job job = createAndSubmitJob(); if (inputOptions.shouldBlock()) { waitForJobCompletion(job); } return job; }