HIVE-10730. LLAP: fix guava stopwatch conflict. (Siddharth Seth)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/0db5368c Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/0db5368c Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/0db5368c Branch: refs/heads/llap Commit: 0db5368c0cc0f4329916a72a11c9d99a02971bac Parents: 6701aa0 Author: Prasanth Jayachandran <j.prasant...@gmail.com> Authored: Fri May 15 15:36:08 2015 -0700 Committer: Prasanth Jayachandran <j.prasant...@gmail.com> Committed: Fri May 15 15:36:08 2015 -0700 ---------------------------------------------------------------------- .../hive/llap/daemon/impl/TaskRunnerCallable.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/0db5368c/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java ---------------------------------------------------------------------- diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java index b16a5c4..72fcf3b 100644 --- a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java +++ b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java @@ -26,7 +26,6 @@ import java.util.Map; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import org.apache.hadoop.conf.Configuration; @@ -59,6 +58,9 @@ import org.apache.tez.runtime.internals.api.TaskReporterInterface; import org.apache.tez.runtime.library.input.UnorderedKVInput; import org.apache.tez.runtime.task.EndReason; import org.apache.tez.runtime.task.TaskRunner2Result; +import org.apache.tez.runtime.task.TezTaskRunner2; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.common.base.Stopwatch; import com.google.common.collect.HashMultimap; @@ -67,9 +69,6 @@ import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.ThreadFactoryBuilder; -import org.apache.tez.runtime.task.TezTaskRunner2; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * @@ -212,7 +211,7 @@ public class TaskRunnerCallable extends CallableWithNdc<TaskRunner2Result> { // TODO Fix UGI and FS Handling. Closing UGI here causes some errors right now. // FileSystem.closeAllForUGI(taskUgi); LOG.info("ExecutionTime for Container: " + request.getContainerIdString() + "=" + - runtimeWatch.stop().elapsed(TimeUnit.MILLISECONDS)); + runtimeWatch.stop().elapsedMillis()); if (LOG.isDebugEnabled()) { LOG.debug("canFinish post completion: " + taskSpec.getTaskAttemptID() + ": " + canFinish()); } @@ -377,10 +376,10 @@ public class TaskRunnerCallable extends CallableWithNdc<TaskRunner2Result> { LOG.info("Killed task {}", requestId); if (killtimerWatch.isRunning()) { killtimerWatch.stop(); - long elapsed = killtimerWatch.elapsed(TimeUnit.MILLISECONDS); + long elapsed = killtimerWatch.elapsedMillis(); LOG.info("Time to die for task {}", elapsed); } - metrics.incrPreemptionTimeLost(runtimeWatch.elapsed(TimeUnit.MILLISECONDS)); + metrics.incrPreemptionTimeLost(runtimeWatch.elapsedMillis()); metrics.incrExecutorTotalKilled(); break; case COMMUNICATION_FAILURE: