List of usage examples for org.apache.hadoop.util StringUtils formatTime
public static String formatTime(long timeDiff)
From source file:com.kylinolap.job.hadoop.AbstractHadoopJob.java
License:Apache License
protected int waitForCompletion(Job job) throws IOException, InterruptedException, ClassNotFoundException { int retVal = 0; long start = System.nanoTime(); if (isAsync) { job.submit();/*w w w . ja v a 2s.c om*/ } else { job.waitForCompletion(true); retVal = job.isSuccessful() ? 0 : 1; } log.debug("Job '" + job.getJobName() + "' finished " + (job.isSuccessful() ? "successfully in " : "with failures. Time taken ") + StringUtils.formatTime((System.nanoTime() - start) / 1000000L)); return retVal; }