Merge branch 'gerrit/stabilization-f69489' into 'gerrit/mad-hatter'

Change-Id: I5ce1030bd01df920f4faa3317e6e5a31d67e0dc4
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/comm/io/AbstractFrameAppender.java b/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/comm/io/AbstractFrameAppender.java
index 18ddf3e..a9371e9 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/comm/io/AbstractFrameAppender.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/comm/io/AbstractFrameAppender.java
@@ -89,6 +89,7 @@
 
     @Override
     public void write(IFrameWriter outWriter, boolean clearFrame) throws HyracksDataException {
+        failIfInterrupted();
         getBuffer().clear();
         outWriter.nextFrame(getBuffer());
         if (clearFrame) {
@@ -126,4 +127,10 @@
             tracer.durationE(tid, traceCategory, args);
         }
     }
+
+    protected void failIfInterrupted() throws HyracksDataException {
+        if (Thread.currentThread().isInterrupted()) {
+            throw HyracksDataException.create(new InterruptedException());
+        }
+    }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/io/MessagingFrameTupleAppender.java b/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/io/MessagingFrameTupleAppender.java
index 77020f8..c27a7e6 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/io/MessagingFrameTupleAppender.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/io/MessagingFrameTupleAppender.java
@@ -110,6 +110,7 @@
 
     @Override
     public void write(IFrameWriter outWriter, boolean clearFrame) throws HyracksDataException {
+        failIfInterrupted();
         if (!initialized) {
             init();
         }