asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhub...@apache.org
Subject incubator-asterixdb-hyracks git commit: ASTERIXDB-1002: Fix exception handling in EmptyTupleSourceRuntimeFactory
Date Wed, 30 Sep 2015 04:03:33 GMT
Repository: incubator-asterixdb-hyracks
Updated Branches:
  refs/heads/master 9295be1ab -> 9c569a23d


ASTERIXDB-1002: Fix exception handling in EmptyTupleSourceRuntimeFactory

Change-Id: Ibc9da24ceca87c6a8ec4bae16a0579312c27b668
Reviewed-on: https://asterix-gerrit.ics.uci.edu/416
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/commit/9c569a23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/tree/9c569a23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/diff/9c569a23

Branch: refs/heads/master
Commit: 9c569a23dae62cd5b5c8e6ff14be05f8c7c8276d
Parents: 9295be1
Author: Murtadha Hubail <mhubail@uci.edu>
Authored: Tue Sep 29 17:51:11 2015 -0700
Committer: Murtadha Hubail <hubailmor@gmail.com>
Committed: Tue Sep 29 20:59:09 2015 -0700

----------------------------------------------------------------------
 .../operators/std/EmptyTupleSourceRuntimeFactory.java   | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/9c569a23/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
index b5d717a..5b66736 100644
--- a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
+++ b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
@@ -49,13 +49,15 @@ public class EmptyTupleSourceRuntimeFactory implements IPushRuntimeFactory
{
             @Override
             public void open() throws HyracksDataException {
                 writer.open();
-                if (!appender.append(tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize()))
{
-                    throw new IllegalStateException();
+                try {
+                    if (!appender.append(tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize()))
{
+                        throw new IllegalStateException();
+                    }
+                    appender.flush(writer, true);
+                } finally {
+                    writer.close();
                 }
-                appender.flush(writer, true);
-                writer.close();
             }
         };
     }
-
 }


Mime
View raw message