Murtadha Hubail has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/416
Change subject: ASTERIXDB-1002: Fix exception handling in
EmptyTupleSourceRuntimeFactory
......................................................................
ASTERIXDB-1002: Fix exception handling in EmptyTupleSourceRuntimeFactory
Change-Id: Ibc9da24ceca87c6a8ec4bae16a0579312c27b668
---
M
algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
1 file changed, 9 insertions(+), 5 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/hyracks refs/changes/16/416/1
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..9f9e836 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,17 @@
@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);
+ } catch (Exception e) {
+ throw new HyracksDataException(e);
+ } finally {
+ writer.close();
}
- appender.flush(writer, true);
- writer.close();
}
};
}
-
}
--
To view, visit https://asterix-gerrit.ics.uci.edu/416
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc9da24ceca87c6a8ec4bae16a0579312c27b668
Gerrit-PatchSet: 1
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <[email protected]>