HIVE-16067. LLAP: send out container complete messages after a fragment completes. (Siddharth Seth, reviewed by Sergey Shelukhin)
(cherry picked from commit ba5397a7819ca0388c147cd1ab53c4d102b35132) Change-Id: Ibbcc4cb01a6a6c81cd4845899e31c9ad765225ed Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/d17a144f Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/d17a144f Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/d17a144f Branch: refs/heads/branch-2.2 Commit: d17a144f46b57c5494d08f3e10dd40797f672d56 Parents: 996efbc Author: Siddharth Seth <ss...@apache.org> Authored: Wed Mar 1 09:10:47 2017 -0800 Committer: Owen O'Malley <omal...@apache.org> Committed: Tue Mar 28 14:02:45 2017 -0700 ---------------------------------------------------------------------- .../hive/llap/tezplugins/LlapContainerLauncher.java | 14 ++++++++++---- .../llap/tezplugins/LlapTaskSchedulerService.java | 9 ++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/d17a144f/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapContainerLauncher.java ---------------------------------------------------------------------- diff --git a/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapContainerLauncher.java b/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapContainerLauncher.java index 07703a2..9e928e6 100644 --- a/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapContainerLauncher.java +++ b/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapContainerLauncher.java @@ -30,14 +30,20 @@ public class LlapContainerLauncher extends ContainerLauncher { @Override public void launchContainer(ContainerLaunchRequest containerLaunchRequest) { - LOG.info("No-op launch for container: " + containerLaunchRequest.getContainerId() + - " succeeded on host: " + containerLaunchRequest.getNodeId()); + if (LOG.isDebugEnabled()) { + LOG.debug("No-op launch for container: " + + containerLaunchRequest.getContainerId() + + " succeeded on host: " + containerLaunchRequest.getNodeId()); + } getContext().containerLaunched(containerLaunchRequest.getContainerId()); } @Override public void stopContainer(ContainerStopRequest containerStopRequest) { - LOG.info("DEBUG: Ignoring STOP_REQUEST for event: " + containerStopRequest); - getContext().containerStopRequested(containerStopRequest.getContainerId()); + if (LOG.isDebugEnabled()) { + LOG.debug("No-op stopContainer invocation for containerId={}", + containerStopRequest.getContainerId()); + } + // Nothing to do here. } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hive/blob/d17a144f/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java ---------------------------------------------------------------------- diff --git a/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java b/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java index 9d8840c..f29c1d0 100644 --- a/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java +++ b/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java @@ -72,6 +72,8 @@ import org.apache.hadoop.hive.llap.tezplugins.metrics.LlapTaskSchedulerMetrics; import org.apache.hadoop.util.JvmPauseMonitor; import org.apache.hadoop.yarn.api.records.Container; import org.apache.hadoop.yarn.api.records.ContainerId; +import org.apache.hadoop.yarn.api.records.ContainerState; +import org.apache.hadoop.yarn.api.records.ContainerStatus; import org.apache.hadoop.yarn.api.records.NodeId; import org.apache.hadoop.yarn.api.records.NodeReport; import org.apache.hadoop.yarn.api.records.NodeState; @@ -703,12 +705,17 @@ public class LlapTaskSchedulerService extends TaskScheduler { writeLock.unlock(); } getContext().containerBeingReleased(taskInfo.containerId); + getContext().containerCompleted(taskInfo.task, ContainerStatus.newInstance(taskInfo.containerId, + ContainerState.COMPLETE, "", 0)); return true; } @Override public Object deallocateContainer(ContainerId containerId) { - LOG.debug("Ignoring deallocateContainer for containerId: " + containerId); + if (LOG.isDebugEnabled()) { + LOG.debug("Ignoring deallocateContainer for containerId: {}", + containerId); + } // Containers are not being tracked for re-use. // This is safe to ignore since a deallocate task will come in. return null;