Author: rohini Date: Tue Jan 9 13:26:39 2018 New Revision: 1820659 URL: http://svn.apache.org/viewvc?rev=1820659&view=rev Log: PIG-5327: Check for DAG status before trying to kill (rohini)
Modified: pig/trunk/CHANGES.txt pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezJob.java Modified: pig/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1820659&r1=1820658&r2=1820659&view=diff ============================================================================== --- pig/trunk/CHANGES.txt (original) +++ pig/trunk/CHANGES.txt Tue Jan 9 13:26:39 2018 @@ -64,6 +64,8 @@ OPTIMIZATIONS BUG FIXES +PIG-5327: Check for DAG status before trying to kill (rohini) + PIG-5325: Schema disambiguation can't be turned off for nested schemas (szita) PIG-5311: POReservoirSample fails for more than Integer.MAX_VALUE records (rohini) Modified: pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezJob.java URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezJob.java?rev=1820659&r1=1820658&r2=1820659&view=diff ============================================================================== --- pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezJob.java (original) +++ pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezJob.java Tue Jan 9 13:26:39 2018 @@ -283,11 +283,11 @@ public class TezJob implements Runnable public void killJob() throws IOException { try { - if (dagClient != null) { + if (dagClient != null && (dagStatus == null || !dagStatus.isCompleted())) { dagClient.tryKillDAG(); } if (tezClient != null) { - tezClient.stop(); + TezSessionManager.stopSession(tezClient); } } catch (TezException e) { throw new IOException("Cannot kill DAG - Application Id: " + appId, e);