You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ti...@apache.org on 2016/02/10 05:58:43 UTC

incubator-asterixdb-hyracks git commit: IPrinters and IAWriters throw HyracksDataException

Repository: incubator-asterixdb-hyracks
Updated Branches:
  refs/heads/master 6464d723f -> abf0708ca


IPrinters and IAWriters throw HyracksDataException

instead of AlgebricksException (which should be used at compile-time)

Change-Id: I642ff22a4cc30f1fbf0b61f7b5908a7a0c66da6c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/611
Reviewed-by: Yingyi Bu <bu...@gmail.com>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>


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/abf0708c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/tree/abf0708c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/diff/abf0708c

Branch: refs/heads/master
Commit: abf0708ca47ee8238274352b2b3ca7c52dc958a6
Parents: 6464d72
Author: Till Westmann <ti...@apache.org>
Authored: Tue Feb 9 16:04:27 2016 -0800
Committer: Till Westmann <ti...@apache.org>
Committed: Tue Feb 9 20:53:53 2016 -0800

----------------------------------------------------------------------
 .../core/jobgen/impl/JobGenHelper.java          | 23 ++++++++++++--------
 .../hyracks/algebricks/data/IAWriter.java       |  6 ++---
 .../hyracks/algebricks/data/IPrinter.java       |  6 ++---
 .../data/IPrinterFactoryProvider.java           |  4 ++--
 .../data/impl/IntegerPrinterFactory.java        |  7 +++---
 .../data/impl/UTF8StringPrinterFactory.java     |  8 +++----
 .../compiler/PigletPrinterFactoryProvider.java  | 16 ++++++--------
 .../operators/std/SinkWriterRuntime.java        | 13 ++---------
 .../std/StringStreamingRuntimeFactory.java      |  6 +----
 .../ResultSerializerFactoryProvider.java        |  9 +-------
 .../writers/PrinterBasedWriterFactory.java      |  6 ++---
 .../writers/SerializedDataWriterFactory.java    |  8 +++----
 12 files changed, 48 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenHelper.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenHelper.java b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenHelper.java
index 6ee5145..2c2708b 100644
--- a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenHelper.java
+++ b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenHelper.java
@@ -41,6 +41,7 @@ import org.apache.hyracks.api.dataflow.value.INormalizedKeyComputerFactory;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public final class JobGenHelper {
 
@@ -70,12 +71,16 @@ public final class JobGenHelper {
             JobGenContext context, int[] printColumns) throws AlgebricksException {
         IPrinterFactory[] pf = new IPrinterFactory[printColumns.length];
         IPrinterFactoryProvider pff = context.getPrinterFactoryProvider();
-        for (int i = 0; i < pf.length; i++) {
-            LogicalVariable v = opSchema.getVariable(printColumns[i]);
-            Object t = env.getVarType(v);
-            pf[i] = pff.getPrinterFactory(t);
+        try {
+            for (int i = 0; i < pf.length; i++) {
+                LogicalVariable v = opSchema.getVariable(printColumns[i]);
+                Object t = env.getVarType(v);
+                pf[i] = pff.getPrinterFactory(t);
+            }
+            return pf;
+        } catch (HyracksDataException e) {
+            throw new AlgebricksException(e);
         }
-        return pf;
     }
 
     public static int[] variablesToFieldIndexes(Collection<LogicalVariable> varLogical, IOperatorSchema opSchema) {
@@ -90,7 +95,7 @@ public final class JobGenHelper {
 
     public static IBinaryHashFunctionFactory[] variablesToBinaryHashFunctionFactories(
             Collection<LogicalVariable> varLogical, IVariableTypeEnvironment env, JobGenContext context)
-            throws AlgebricksException {
+                    throws AlgebricksException {
         IBinaryHashFunctionFactory[] funFactories = new IBinaryHashFunctionFactory[varLogical.size()];
         int i = 0;
         IBinaryHashFunctionFactoryProvider bhffProvider = context.getBinaryHashFunctionFactoryProvider();
@@ -103,7 +108,7 @@ public final class JobGenHelper {
 
     public static IBinaryHashFunctionFamily[] variablesToBinaryHashFunctionFamilies(
             Collection<LogicalVariable> varLogical, IVariableTypeEnvironment env, JobGenContext context)
-            throws AlgebricksException {
+                    throws AlgebricksException {
         IBinaryHashFunctionFamily[] funFamilies = new IBinaryHashFunctionFamily[varLogical.size()];
         int i = 0;
         IBinaryHashFunctionFamilyProvider bhffProvider = context.getBinaryHashFunctionFamilyProvider();
@@ -116,7 +121,7 @@ public final class JobGenHelper {
 
     public static IBinaryComparatorFactory[] variablesToAscBinaryComparatorFactories(
             Collection<LogicalVariable> varLogical, IVariableTypeEnvironment env, JobGenContext context)
-            throws AlgebricksException {
+                    throws AlgebricksException {
         IBinaryComparatorFactory[] compFactories = new IBinaryComparatorFactory[varLogical.size()];
         IBinaryComparatorFactoryProvider bcfProvider = context.getBinaryComparatorFactoryProvider();
         int i = 0;
@@ -140,7 +145,7 @@ public final class JobGenHelper {
 
     public static INormalizedKeyComputerFactory variablesToAscNormalizedKeyComputerFactory(
             Collection<LogicalVariable> varLogical, IVariableTypeEnvironment env, JobGenContext context)
-            throws AlgebricksException {
+                    throws AlgebricksException {
         INormalizedKeyComputerFactoryProvider nkcfProvider = context.getNormalizedKeyComputerFactoryProvider();
         if (nkcfProvider == null)
             return null;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IAWriter.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IAWriter.java b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IAWriter.java
index cd83d1f..72626ca 100644
--- a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IAWriter.java
+++ b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IAWriter.java
@@ -18,12 +18,12 @@
  */
 package org.apache.hyracks.algebricks.data;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.api.comm.IFrameTupleAccessor;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public interface IAWriter {
 
-    public void init() throws AlgebricksException;
+    void init() throws HyracksDataException;
 
-    public void printTuple(IFrameTupleAccessor tAccess, int tIdx) throws AlgebricksException;
+    void printTuple(IFrameTupleAccessor tAccess, int tIdx) throws HyracksDataException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinter.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinter.java b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinter.java
index 348f7ae..99161eb 100644
--- a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinter.java
+++ b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinter.java
@@ -20,10 +20,10 @@ package org.apache.hyracks.algebricks.data;
 
 import java.io.PrintStream;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public interface IPrinter {
-    public void init() throws AlgebricksException;
+    void init() throws HyracksDataException;
 
-    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException;
+    void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinterFactoryProvider.java b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinterFactoryProvider.java
index 624423e..d428bb0 100644
--- a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinterFactoryProvider.java
+++ b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/IPrinterFactoryProvider.java
@@ -18,8 +18,8 @@
  */
 package org.apache.hyracks.algebricks.data;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public interface IPrinterFactoryProvider {
-    public IPrinterFactory getPrinterFactory(Object type) throws AlgebricksException;
+    IPrinterFactory getPrinterFactory(Object type) throws HyracksDataException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/IntegerPrinterFactory.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/IntegerPrinterFactory.java b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/IntegerPrinterFactory.java
index bdab09d..9c49516 100644
--- a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/IntegerPrinterFactory.java
+++ b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/IntegerPrinterFactory.java
@@ -25,6 +25,7 @@ import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.primitive.IntegerPointable;
 
 public class IntegerPrinterFactory implements IPrinterFactory {
@@ -40,17 +41,17 @@ public class IntegerPrinterFactory implements IPrinterFactory {
         return new IPrinter() {
 
             @Override
-            public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+            public void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException {
                 int d = IntegerPointable.getInteger(b, s);
                 try {
                     WriteValueTools.writeInt(d, ps);
                 } catch (IOException e) {
-                    throw new AlgebricksException(e);
+                    throw new HyracksDataException(e);
                 }
             }
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() {
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/UTF8StringPrinterFactory.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/UTF8StringPrinterFactory.java b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/UTF8StringPrinterFactory.java
index 1aa3370..78f10d1 100644
--- a/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/UTF8StringPrinterFactory.java
+++ b/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/UTF8StringPrinterFactory.java
@@ -21,9 +21,9 @@ package org.apache.hyracks.algebricks.data.impl;
 import java.io.IOException;
 import java.io.PrintStream;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.util.string.UTF8StringUtil;
 
 public class UTF8StringPrinterFactory implements IPrinterFactory {
@@ -40,16 +40,16 @@ public class UTF8StringPrinterFactory implements IPrinterFactory {
         return new IPrinter() {
 
             @Override
-            public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+            public void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException {
                 try {
                     UTF8StringUtil.printUTF8StringWithQuotes(b, s, l, ps);
                 } catch (IOException e) {
-                    throw new AlgebricksException(e);
+                    throw new HyracksDataException(e);
                 }
             }
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() throws HyracksDataException {
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-examples/piglet-example/src/main/java/org/apache/hyracks/algebricks/examples/piglet/compiler/PigletPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-examples/piglet-example/src/main/java/org/apache/hyracks/algebricks/examples/piglet/compiler/PigletPrinterFactoryProvider.java b/algebricks/algebricks-examples/piglet-example/src/main/java/org/apache/hyracks/algebricks/examples/piglet/compiler/PigletPrinterFactoryProvider.java
index 8049594..135a9a7 100644
--- a/algebricks/algebricks-examples/piglet-example/src/main/java/org/apache/hyracks/algebricks/examples/piglet/compiler/PigletPrinterFactoryProvider.java
+++ b/algebricks/algebricks-examples/piglet-example/src/main/java/org/apache/hyracks/algebricks/examples/piglet/compiler/PigletPrinterFactoryProvider.java
@@ -26,11 +26,9 @@ import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.algebricks.data.IPrinterFactoryProvider;
 import org.apache.hyracks.algebricks.data.impl.IntegerPrinterFactory;
-import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
 import org.apache.hyracks.algebricks.examples.piglet.types.Type;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.primitive.FloatPointable;
-import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
-import org.apache.hyracks.dataflow.common.data.marshalling.FloatSerializerDeserializer;
 import org.apache.hyracks.util.string.UTF8StringUtil;
 
 public class PigletPrinterFactoryProvider implements IPrinterFactoryProvider {
@@ -41,7 +39,7 @@ public class PigletPrinterFactoryProvider implements IPrinterFactoryProvider {
     }
 
     @Override
-    public IPrinterFactory getPrinterFactory(Object type) throws AlgebricksException {
+    public IPrinterFactory getPrinterFactory(Object type) {
         Type t = (Type) type;
         switch (t.getTag()) {
             case INTEGER:
@@ -69,15 +67,15 @@ public class PigletPrinterFactoryProvider implements IPrinterFactoryProvider {
         public IPrinter createPrinter() {
             return new IPrinter() {
                 @Override
-                public void init() throws AlgebricksException {
+                public void init() {
                 }
 
                 @Override
-                public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+                public void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException {
                     try {
                         UTF8StringUtil.printUTF8StringWithQuotes(b, s, l, ps);
                     } catch (IOException e) {
-                        throw new AlgebricksException(e);
+                        throw new HyracksDataException(e);
                     }
                 }
             };
@@ -97,11 +95,11 @@ public class PigletPrinterFactoryProvider implements IPrinterFactoryProvider {
         public IPrinter createPrinter() {
             return new IPrinter() {
                 @Override
-                public void init() throws AlgebricksException {
+                public void init() throws HyracksDataException {
                 }
 
                 @Override
-                public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+                public void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException {
                     ps.print(FloatPointable.getFloat(b, s));
                 }
             };

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntime.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntime.java b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntime.java
index 2512c5e..ebf3d3a 100644
--- a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntime.java
+++ b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntime.java
@@ -21,7 +21,6 @@ package org.apache.hyracks.algebricks.runtime.operators.std;
 import java.io.PrintStream;
 import java.nio.ByteBuffer;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IAWriter;
 import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputSinkPushRuntime;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -55,11 +54,7 @@ public class SinkWriterRuntime extends AbstractOneInputSinkPushRuntime {
         if (first) {
             first = false;
             tAccess = new FrameTupleAccessor(inputRecordDesc);
-            try {
-                writer.init();
-            } catch (AlgebricksException e) {
-                throw new HyracksDataException(e);
-            }
+            writer.init();
         }
     }
 
@@ -68,11 +63,7 @@ public class SinkWriterRuntime extends AbstractOneInputSinkPushRuntime {
         tAccess.reset(buffer);
         int nTuple = tAccess.getTupleCount();
         for (int t = 0; t < nTuple; t++) {
-            try {
-                writer.printTuple(tAccess, t);
-            } catch (AlgebricksException ae) {
-                throw new HyracksDataException(ae);
-            }
+            writer.printTuple(tAccess, t);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
index a9f5a21..36d3349 100644
--- a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
+++ b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
@@ -155,11 +155,7 @@ public class StringStreamingRuntimeFactory extends AbstractOneInputOneOutputRunt
                 for (int t = 0; t < nTuple; t++) {
                     tRef.reset(tAccess, t);
                     for (int i = 0; i < printers.length; i++) {
-                        try {
-                            printers[i].print(buffer.array(), tRef.getFieldStart(i), tRef.getFieldLength(i), ps);
-                        } catch (AlgebricksException e) {
-                            throw new HyracksDataException(e);
-                        }
+                        printers[i].print(buffer.array(), tRef.getFieldStart(i), tRef.getFieldLength(i), ps);
                         ps.print(fieldDelimiter);
                         if (i == printers.length - 1) {
                             ps.print('\n');

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/serializer/ResultSerializerFactoryProvider.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/serializer/ResultSerializerFactoryProvider.java b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/serializer/ResultSerializerFactoryProvider.java
index aa1fa6d..0e49d22 100644
--- a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/serializer/ResultSerializerFactoryProvider.java
+++ b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/serializer/ResultSerializerFactoryProvider.java
@@ -21,7 +21,6 @@ package org.apache.hyracks.algebricks.runtime.serializer;
 import java.io.PrintStream;
 import java.nio.BufferOverflowException;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IAWriter;
 import org.apache.hyracks.algebricks.data.IAWriterFactory;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
@@ -56,11 +55,7 @@ public class ResultSerializerFactoryProvider implements IResultSerializerFactory
 
                     @Override
                     public void init() throws HyracksDataException {
-                        try {
-                            writer.init();
-                        } catch (AlgebricksException e) {
-                            throw new HyracksDataException(e);
-                        }
+                        writer.init();
                     }
 
                     @Override
@@ -69,8 +64,6 @@ public class ResultSerializerFactoryProvider implements IResultSerializerFactory
                             writer.printTuple(tAccess, tIdx);
                         } catch (BufferOverflowException e) {
                             return false;
-                        } catch (AlgebricksException e) {
-                            throw new HyracksDataException(e);
                         }
                         return true;
                     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/PrinterBasedWriterFactory.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/PrinterBasedWriterFactory.java b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/PrinterBasedWriterFactory.java
index bad2d3e..015ce73 100644
--- a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/PrinterBasedWriterFactory.java
+++ b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/PrinterBasedWriterFactory.java
@@ -20,13 +20,13 @@ package org.apache.hyracks.algebricks.runtime.writers;
 
 import java.io.PrintStream;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IAWriter;
 import org.apache.hyracks.algebricks.data.IAWriterFactory;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.api.comm.IFrameTupleAccessor;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class PrinterBasedWriterFactory implements IAWriterFactory {
 
@@ -48,14 +48,14 @@ public class PrinterBasedWriterFactory implements IAWriterFactory {
         return new IAWriter() {
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() throws HyracksDataException {
                 for (int i = 0; i < printers.length; i++) {
                     printers[i].init();
                 }
             }
 
             @Override
-            public void printTuple(IFrameTupleAccessor tAccess, int tIdx) throws AlgebricksException {
+            public void printTuple(IFrameTupleAccessor tAccess, int tIdx) throws HyracksDataException {
                 for (int i = 0; i < fields.length; i++) {
                     int fldStart = tAccess.getTupleStartOffset(tIdx) + tAccess.getFieldSlotsLength()
                             + tAccess.getFieldStartOffset(tIdx, fields[i]);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/abf0708c/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/SerializedDataWriterFactory.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/SerializedDataWriterFactory.java b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/SerializedDataWriterFactory.java
index b01237e..585506f 100644
--- a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/SerializedDataWriterFactory.java
+++ b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/SerializedDataWriterFactory.java
@@ -23,12 +23,12 @@ import java.io.IOException;
 import java.io.ObjectOutputStream;
 import java.io.PrintStream;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IAWriter;
 import org.apache.hyracks.algebricks.data.IAWriterFactory;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.api.comm.IFrameTupleAccessor;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SerializedDataWriterFactory implements IAWriterFactory {
 
@@ -40,7 +40,7 @@ public class SerializedDataWriterFactory implements IAWriterFactory {
         return new IAWriter() {
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() throws HyracksDataException {
                 // dump the SerializerDeserializers to disk
                 try {
                     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -49,12 +49,12 @@ public class SerializedDataWriterFactory implements IAWriterFactory {
                     baos.writeTo(ps);
                     oos.close();
                 } catch (IOException e) {
-                    throw new AlgebricksException(e);
+                    throw new HyracksDataException(e);
                 }
             }
 
             @Override
-            public void printTuple(IFrameTupleAccessor tAccess, int tIdx) throws AlgebricksException {
+            public void printTuple(IFrameTupleAccessor tAccess, int tIdx) throws HyracksDataException {
                 for (int i = 0; i < fields.length; i++) {
                     int fldStart = tAccess.getTupleStartOffset(tIdx) + tAccess.getFieldSlotsLength()
                             + tAccess.getFieldStartOffset(tIdx, fields[i]);