asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject [2/3] incubator-asterixdb git commit: IPrinters and IAWriters throw HyracksDataException
Date Wed, 10 Feb 2016 04:59:26 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt16Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt16Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt16Printer.java
index bfa9da7..1349d98 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt16Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt16Printer.java
@@ -21,19 +21,18 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AInt16Printer implements IPrinter {
     public static final AInt16Printer INSTANCE = new AInt16Printer();
 
     @Override
     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 {
         short i = AInt16SerializerDeserializer.getShort(b, s + 1);
         ps.print(i);
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt32Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt32Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt32Printer.java
index bd4d757..01b6c02 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt32Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt32Printer.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AInt32Printer implements IPrinter {
 
@@ -30,11 +30,10 @@ public class AInt32Printer implements IPrinter {
 
     @Override
     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 {
         int d = AInt32SerializerDeserializer.getInt(b, s + 1);
         ps.print(d);
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt64Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt64Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt64Printer.java
index aa99aa2..5b05275 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt64Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt64Printer.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AInt64Printer implements IPrinter {
     public static final AInt64Printer INSTANCE = new AInt64Printer();
@@ -32,7 +32,7 @@ public class AInt64Printer implements 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 {
         long d = AInt64SerializerDeserializer.getLong(b, s + 1);
         ps.print(d);
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt8Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt8Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt8Printer.java
index 1acdf15..3e59811 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt8Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AInt8Printer.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt8SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AInt8Printer implements IPrinter {
 
@@ -30,11 +30,10 @@ public class AInt8Printer implements IPrinter {
 
     @Override
     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 {
         byte o = AInt8SerializerDeserializer.getByte(b, s + 1);
         ps.print(o);
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AIntervalPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AIntervalPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AIntervalPrinter.java
index b9a42ac..ba74790 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AIntervalPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AIntervalPrinter.java
@@ -20,8 +20,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 
 import java.io.PrintStream;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AIntervalPrinter implements IPrinter {
 
@@ -29,11 +29,11 @@ public class AIntervalPrinter implements IPrinter {
 
 
     @Override
-    public void init() throws AlgebricksException {
+    public void init() {
     }
 
     @Override
-    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        throw new AlgebricksException("'Interval' type unsupported for CSV output");
+    public void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException {
+        throw new HyracksDataException("'Interval' type unsupported for CSV output");
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ALinePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ALinePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ALinePrinter.java
index 5241797..a500e58 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ALinePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ALinePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ALinePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ALinePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("\"[ [");
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
         ps.print(", ");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullPrinter.java
index 1182b0a..2acedeb 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullPrinter.java
@@ -20,8 +20,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 
 import java.io.PrintStream;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ANullPrinter implements IPrinter {
 
@@ -29,11 +29,10 @@ public class ANullPrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("null");
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullableFieldPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullableFieldPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullableFieldPrinterFactory.java
index d8969dc..3d76087 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullableFieldPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullableFieldPrinterFactory.java
@@ -24,9 +24,9 @@ import org.apache.asterix.formats.nontagged.AqlCSVPrinterFactoryProvider;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
-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;
 
 public class ANullableFieldPrinterFactory implements IPrinterFactory {
 
@@ -45,7 +45,7 @@ public class ANullableFieldPrinterFactory implements IPrinterFactory {
             private IPrinter fieldPrinter;
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() throws HyracksDataException {
                 nullPrinter = (AqlCSVPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.ANULL))
                         .createPrinter();
                 fieldPrinter = (AqlCSVPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getNullableType()))
@@ -53,12 +53,13 @@ public class ANullableFieldPrinterFactory implements IPrinterFactory {
             }
 
             @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 {
                 fieldPrinter.init();
-                if (b[s] == ATypeTag.NULL.serialize())
+                if (b[s] == ATypeTag.NULL.serialize()) {
                     nullPrinter.print(b, s, l, ps);
-                else
+                } else {
                     fieldPrinter.print(b, s, l, ps);
+                }
             }
 
         };

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AObjectPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AObjectPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AObjectPrinter.java
index 319476f..6587d52 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AObjectPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AObjectPrinter.java
@@ -22,9 +22,9 @@ import java.io.PrintStream;
 
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AObjectPrinter implements IPrinter {
 
@@ -33,12 +33,11 @@ public class AObjectPrinter implements IPrinter {
     private IPrinter recordPrinter = new ARecordPrinterFactory(null).createPrinter();
 
     @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 {
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(b[s]);
         switch (typeTag) {
             case INT8: {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APoint3DPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APoint3DPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APoint3DPrinter.java
index 4ad8da9..296cb41 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APoint3DPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APoint3DPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class APoint3DPrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class APoint3DPrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("\"[");
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
         ps.print(", ");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APointPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APointPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APointPrinter.java
index e3af0f2..bab0ddd 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APointPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APointPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class APointPrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class APointPrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("\"[");
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
         ps.print(", ");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APolygonPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APolygonPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APolygonPrinter.java
index d61d427..493715a 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APolygonPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/APolygonPrinter.java
@@ -22,8 +22,8 @@ import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class APolygonPrinter implements IPrinter {
 
@@ -31,11 +31,10 @@ public class APolygonPrinter implements IPrinter {
 
     @Override
     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 {
         short numberOfPoints = AInt16SerializerDeserializer.getShort(b, s + 1);
         s += 3;
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARecordPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARecordPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARecordPrinterFactory.java
index af4ebec..ad513a5 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARecordPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARecordPrinterFactory.java
@@ -20,6 +20,7 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 
 import java.io.PrintStream;
 
+import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.pointables.PointableAllocator;
 import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
 import org.apache.asterix.om.pointables.base.IVisitablePointable;
@@ -27,10 +28,10 @@ import org.apache.asterix.om.pointables.printer.csv.APrintVisitor;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ARecordPrinterFactory implements IPrinterFactory {
 
@@ -54,18 +55,18 @@ public class ARecordPrinterFactory implements IPrinterFactory {
         return new IPrinter() {
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() {
                 arg.second = inputType.getTypeTag();
             }
 
             @Override
-            public void print(byte[] b, int start, int l, PrintStream ps) throws AlgebricksException {
+            public void print(byte[] b, int start, int l, PrintStream ps) throws HyracksDataException {
                 try {
                     recAccessor.set(b, start, l);
                     arg.first = ps;
                     recAccessor.accept(printVisitor, arg);
-                } catch (Exception ioe) {
-                    throw new AlgebricksException(ioe);
+                } catch (AsterixException e) {
+                    throw new HyracksDataException(e);
                 }
             }
         };

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARectanglePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARectanglePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARectanglePrinter.java
index cdd232d..07449cf 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARectanglePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ARectanglePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ARectanglePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ARectanglePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("\"[ [");
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
         ps.print(", ");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AStringPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AStringPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AStringPrinter.java
index 8c6337e..709929d 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AStringPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AStringPrinter.java
@@ -22,8 +22,8 @@ import java.io.IOException;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AStringPrinter implements IPrinter {
 
@@ -31,15 +31,14 @@ public class AStringPrinter implements IPrinter {
 
     @Override
     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 {
             PrintTools.writeUTF8StringAsCSV(b, s + 1, l - 1, ps);
         } catch (IOException e) {
-            throw new AlgebricksException(e);
+            throw new HyracksDataException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ATimePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ATimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ATimePrinter.java
index b23430d..dfd5501 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ATimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ATimePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ATimePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ATimePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("\"");
         PrintTools.printTimeString(b, s, l, ps);
         ps.print("\"");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUUIDPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUUIDPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUUIDPrinter.java
index 89f5e31..34998e5 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUUIDPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUUIDPrinter.java
@@ -22,19 +22,19 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.om.base.AUUID;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AUUIDPrinter implements IPrinter {
 
     public static final AUUIDPrinter INSTANCE = new AUUIDPrinter();
 
     @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 {
         StringBuilder buf = new StringBuilder(AUUID.UUID_CHARS + 2);
         buf.append('"');
         AUUID.appendLiteralOnly(b, s + 1, buf).append('"');

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUnionPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUnionPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUnionPrinterFactory.java
index 34e63c6..6fc691d 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUnionPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AUnionPrinterFactory.java
@@ -25,9 +25,9 @@ import org.apache.asterix.formats.nontagged.AqlCSVPrinterFactoryProvider;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.IAType;
-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;
 
 public class AUnionPrinterFactory implements IPrinterFactory {
 
@@ -48,26 +48,27 @@ public class AUnionPrinterFactory implements IPrinterFactory {
             private List<IAType> unionList;
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() throws HyracksDataException {
                 unionList = unionType.getUnionList();
                 printers = new IPrinter[unionType.getUnionList().size()];
                 for (int i = 0; i < printers.length; i++) {
-                    printers[i] = (AqlCSVPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getUnionList()
-                            .get(i))).createPrinter();
+                    printers[i] = (AqlCSVPrinterFactoryProvider.INSTANCE
+                            .getPrinterFactory(unionType.getUnionList().get(i))).createPrinter();
                     printers[i].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 {
                 ATypeTag tag = unionList.get(b[s + 1]).getTypeTag();
-                if (tag == ATypeTag.UNION)
+                if (tag == ATypeTag.UNION) {
                     printers[b[s + 1]].print(b, s + 1, l, ps);
-                else {
-                    if (tag == ATypeTag.ANY)
+                } else {
+                    if (tag == ATypeTag.ANY) {
                         printers[b[s + 1]].print(b, s + 2, l, ps);
-                    else
+                    } else {
                         printers[b[s + 1]].print(b, s + 1, l, ps);
+                    }
                 }
             }
         };

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AYearMonthDurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AYearMonthDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AYearMonthDurationPrinter.java
index 567e5ce..497bf3d 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AYearMonthDurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AYearMonthDurationPrinter.java
@@ -21,19 +21,19 @@ package org.apache.asterix.dataflow.data.nontagged.printers.csv;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AYearMonthDurationPrinter implements IPrinter {
 
     public static final AYearMonthDurationPrinter INSTANCE = new AYearMonthDurationPrinter();
 
     @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 {
 
         int months = AInt32SerializerDeserializer.getInt(b, s + 1);
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABinaryHexPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABinaryHexPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABinaryHexPrinter.java
index ee82826..1bbf0f0 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABinaryHexPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABinaryHexPrinter.java
@@ -22,8 +22,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 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.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
 import org.apache.hyracks.util.bytes.HexPrinter;
 
@@ -34,12 +34,11 @@ public class ABinaryHexPrinter implements IPrinter {
     public static final ABinaryHexPrinter INSTANCE = new ABinaryHexPrinter();
 
     @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 {
 
         int validLength = ByteArrayPointable.getContentLength(b, s + 1);
         int start = s + 1 + ByteArrayPointable.getNumberBytesToStoreMeta(validLength);
@@ -48,7 +47,7 @@ public class ABinaryHexPrinter implements IPrinter {
             HexPrinter.printHexString(b, start, validLength, ps);
             ps.print("\"");
         } catch (IOException e) {
-            throw new AlgebricksException(e);
+            throw new HyracksDataException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABooleanPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABooleanPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABooleanPrinter.java
index 4a67f2a..0f06bbb 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABooleanPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ABooleanPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ABooleanSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ABooleanPrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ABooleanPrinter implements IPrinter {
 
     @Override
     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 {
         ps.print(ABooleanSerializerDeserializer.getBoolean(b, s + 1));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ACirclePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ACirclePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ACirclePrinter.java
index b81878a..70b0ff8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ACirclePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ACirclePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ACirclePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ACirclePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("[ [");
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
         ps.print(", ");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADatePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADatePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADatePrinter.java
index 4e85b3e..43ee994 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADatePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADatePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ADatePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ADatePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("\"");
         PrintTools.printDateString(b, s, l, ps);
         ps.print("\"");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADateTimePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADateTimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADateTimePrinter.java
index f340a17..7c1a746 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADateTimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADateTimePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ADateTimePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ADateTimePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("\"");
         PrintTools.printDateTimeString(b, s, l, ps);
         ps.print("\"");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADayTimeDurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADayTimeDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADayTimeDurationPrinter.java
index 0679f41..d7ce053 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADayTimeDurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADayTimeDurationPrinter.java
@@ -21,20 +21,19 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ADayTimeDurationPrinter implements IPrinter {
 
     public static final ADayTimeDurationPrinter INSTANCE = new ADayTimeDurationPrinter();
 
     @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 {
         ps.print("\"");
         PrintTools.printDayTimeDurationString(b, s, l, ps);
         ps.print("\")");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADoublePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADoublePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADoublePrinter.java
index bab9f01..c652b48 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADoublePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADoublePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ADoublePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ADoublePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADurationPrinter.java
index ed7b3ed..163fd26 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ADurationPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ADurationPrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ADurationPrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("\"");
         PrintTools.printDurationString(b, s, l, ps);
         ps.print("\"");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AFloatPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AFloatPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AFloatPrinter.java
index ee9373e..adb2e67 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AFloatPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AFloatPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AFloatSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AFloatPrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class AFloatPrinter implements IPrinter {
 
     @Override
     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 {
         ps.print(AFloatSerializerDeserializer.getFloat(b, s + 1));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt16Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt16Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt16Printer.java
index 992f422..57aff95 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt16Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt16Printer.java
@@ -21,19 +21,18 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AInt16Printer implements IPrinter {
     public static final AInt16Printer INSTANCE = new AInt16Printer();
 
     @Override
     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 {
         short i = AInt16SerializerDeserializer.getShort(b, s + 1);
         ps.print(i);
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt32Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt32Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt32Printer.java
index 03a5615..996be35 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt32Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt32Printer.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AInt32Printer implements IPrinter {
 
@@ -30,11 +30,10 @@ public class AInt32Printer implements IPrinter {
 
     @Override
     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 {
         int d = AInt32SerializerDeserializer.getInt(b, s + 1);
         ps.print(d);
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt64Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt64Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt64Printer.java
index edff119..564e920 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt64Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt64Printer.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AInt64Printer implements IPrinter {
     public static final AInt64Printer INSTANCE = new AInt64Printer();
@@ -32,7 +32,7 @@ public class AInt64Printer implements 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 {
         long d = AInt64SerializerDeserializer.getLong(b, s + 1);
         ps.print(d);
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt8Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt8Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt8Printer.java
index 7bdc127..2ed1341 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt8Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AInt8Printer.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt8SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AInt8Printer implements IPrinter {
 
@@ -30,11 +30,10 @@ public class AInt8Printer implements IPrinter {
 
     @Override
     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 {
         byte o = AInt8SerializerDeserializer.getByte(b, s + 1);
         ps.print(o);
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AIntervalPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AIntervalPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AIntervalPrinter.java
index 3f8a647..b5cdbb8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AIntervalPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AIntervalPrinter.java
@@ -26,8 +26,8 @@ import org.apache.asterix.dataflow.data.nontagged.printers.adm.ATimePrinter;
 import org.apache.asterix.dataflow.data.nontagged.serde.AIntervalSerializerDeserializer;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AIntervalPrinter implements IPrinter {
 
@@ -37,14 +37,14 @@ public class AIntervalPrinter implements IPrinter {
      * @see org.apache.hyracks.algebricks.data.IPrinter#init()
      */
     @Override
-    public void init() throws AlgebricksException {
+    public void init() {
     }
 
     /* (non-Javadoc)
      * @see org.apache.hyracks.algebricks.data.IPrinter#print(byte[], int, int, java.io.PrintStream)
      */
     @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("{ \"interval\": { \"start\": ");
 
         byte typetag = AIntervalSerializerDeserializer.getIntervalTimeType(b, s + 1);
@@ -66,7 +66,7 @@ public class AIntervalPrinter implements IPrinter {
                 timeInstancePrinter = ADateTimePrinter.INSTANCE;
                 break;
             default:
-                throw new AlgebricksException("Unsupport internal time types in interval: " + typetag);
+                throw new HyracksDataException("Unsupport internal time types in interval: " + typetag);
         }
 
         timeInstancePrinter.print(b, startOffset, startSize, ps);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ALinePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ALinePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ALinePrinter.java
index 9927b20..6b3ea36 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ALinePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ALinePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ALinePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ALinePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("[ [");
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
         ps.print(", ");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullPrinter.java
index 79dc018..a9d68d5 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullPrinter.java
@@ -20,8 +20,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 
 import java.io.PrintStream;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ANullPrinter implements IPrinter {
 
@@ -29,11 +29,10 @@ public class ANullPrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("null");
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullableFieldPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullableFieldPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullableFieldPrinterFactory.java
index 406a9e4..b1319c8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullableFieldPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullableFieldPrinterFactory.java
@@ -18,15 +18,15 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 
+import java.io.PrintStream;
+
 import org.apache.asterix.formats.nontagged.AqlCleanJSONPrinterFactoryProvider;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
-
-import java.io.PrintStream;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ANullableFieldPrinterFactory implements IPrinterFactory {
 
@@ -45,20 +45,21 @@ public class ANullableFieldPrinterFactory implements IPrinterFactory {
             private IPrinter fieldPrinter;
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() throws HyracksDataException {
                 nullPrinter = (AqlCleanJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.ANULL))
                         .createPrinter();
-                fieldPrinter = (AqlCleanJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getNullableType()))
-                        .createPrinter();
+                fieldPrinter = (AqlCleanJSONPrinterFactoryProvider.INSTANCE
+                        .getPrinterFactory(unionType.getNullableType())).createPrinter();
             }
 
             @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 {
                 fieldPrinter.init();
-                if (b[s] == ATypeTag.NULL.serialize())
+                if (b[s] == ATypeTag.NULL.serialize()) {
                     nullPrinter.print(b, s, l, ps);
-                else
+                } else {
                     fieldPrinter.print(b, s, l, ps);
+                }
             }
 
         };

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AObjectPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AObjectPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AObjectPrinter.java
index 2d5a8f6..f3fa4a0 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AObjectPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AObjectPrinter.java
@@ -22,9 +22,9 @@ import java.io.PrintStream;
 
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AObjectPrinter implements IPrinter {
 
@@ -35,12 +35,11 @@ public class AObjectPrinter implements IPrinter {
     private IPrinter unorderedListPrinter = new AUnorderedlistPrinterFactory(null).createPrinter();
 
     @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 {
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(b[s]);
         switch (typeTag) {
             case INT8: {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AOrderedlistPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AOrderedlistPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AOrderedlistPrinterFactory.java
index 00d59f6..d911594 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AOrderedlistPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AOrderedlistPrinterFactory.java
@@ -20,6 +20,7 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 
 import java.io.PrintStream;
 
+import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.pointables.PointableAllocator;
 import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
 import org.apache.asterix.om.pointables.base.IVisitablePointable;
@@ -27,10 +28,10 @@ import org.apache.asterix.om.pointables.printer.json.clean.APrintVisitor;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AOrderedlistPrinterFactory implements IPrinterFactory {
 
@@ -54,18 +55,18 @@ public class AOrderedlistPrinterFactory implements IPrinterFactory {
         return new IPrinter() {
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() {
                 arg.second = inputType.getTypeTag();
             }
 
             @Override
-            public void print(byte[] b, int start, int l, PrintStream ps) throws AlgebricksException {
+            public void print(byte[] b, int start, int l, PrintStream ps) throws HyracksDataException {
                 try {
                     listAccessor.set(b, start, l);
                     arg.first = ps;
                     listAccessor.accept(printVisitor, arg);
-                } catch (Exception ioe) {
-                    throw new AlgebricksException(ioe);
+                } catch (AsterixException e) {
+                    throw new HyracksDataException(e);
                 }
             }
         };

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APoint3DPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APoint3DPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APoint3DPrinter.java
index 169c799..4271695 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APoint3DPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APoint3DPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class APoint3DPrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class APoint3DPrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("[");
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
         ps.print(", ");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APointPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APointPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APointPrinter.java
index 7cd4eef..1a6b327 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APointPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APointPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class APointPrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class APointPrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("[");
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
         ps.print(", ");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APolygonPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APolygonPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APolygonPrinter.java
index 350f214..5e8aea8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APolygonPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/APolygonPrinter.java
@@ -22,8 +22,8 @@ import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class APolygonPrinter implements IPrinter {
 
@@ -31,11 +31,10 @@ public class APolygonPrinter implements IPrinter {
 
     @Override
     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 {
         short numberOfPoints = AInt16SerializerDeserializer.getShort(b, s + 1);
         s += 3;
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARecordPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARecordPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARecordPrinterFactory.java
index 0d1e089..bf459e3 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARecordPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARecordPrinterFactory.java
@@ -20,6 +20,7 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 
 import java.io.PrintStream;
 
+import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.pointables.PointableAllocator;
 import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
 import org.apache.asterix.om.pointables.base.IVisitablePointable;
@@ -27,10 +28,10 @@ import org.apache.asterix.om.pointables.printer.json.clean.APrintVisitor;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ARecordPrinterFactory implements IPrinterFactory {
 
@@ -54,18 +55,18 @@ public class ARecordPrinterFactory implements IPrinterFactory {
         return new IPrinter() {
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() {
                 arg.second = inputType.getTypeTag();
             }
 
             @Override
-            public void print(byte[] b, int start, int l, PrintStream ps) throws AlgebricksException {
+            public void print(byte[] b, int start, int l, PrintStream ps) throws HyracksDataException {
                 try {
                     recAccessor.set(b, start, l);
                     arg.first = ps;
                     recAccessor.accept(printVisitor, arg);
-                } catch (Exception ioe) {
-                    throw new AlgebricksException(ioe);
+                } catch (AsterixException e) {
+                    throw new HyracksDataException(e);
                 }
             }
         };

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARectanglePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARectanglePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARectanglePrinter.java
index 253d2e4..73a9e5d 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARectanglePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ARectanglePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ARectanglePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ARectanglePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("[ [");
         ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
         ps.print(", ");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AStringPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AStringPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AStringPrinter.java
index 04fb8a0..de59073 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AStringPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AStringPrinter.java
@@ -22,8 +22,8 @@ import java.io.IOException;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AStringPrinter implements IPrinter {
 
@@ -31,15 +31,14 @@ public class AStringPrinter implements IPrinter {
 
     @Override
     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 {
             PrintTools.writeUTF8StringAsJSON(b, s + 1, l - 1, ps);
         } catch (IOException e) {
-            throw new AlgebricksException(e);
+            throw new HyracksDataException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ATimePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ATimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ATimePrinter.java
index b65c2da..cda475d 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ATimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ATimePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.dataflow.data.nontagged.printers.PrintTools;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class ATimePrinter implements IPrinter {
 
@@ -30,11 +30,10 @@ public class ATimePrinter implements IPrinter {
 
     @Override
     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 {
         ps.print("\"");
         PrintTools.printTimeString(b, s, l, ps);
         ps.print("\"");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUUIDPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUUIDPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUUIDPrinter.java
index 2a59fe4..3990dd4 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUUIDPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUUIDPrinter.java
@@ -22,19 +22,19 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 import java.io.PrintStream;
 
 import org.apache.asterix.om.base.AUUID;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AUUIDPrinter implements IPrinter {
 
     public static final AUUIDPrinter INSTANCE = new AUUIDPrinter();
 
     @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 {
         StringBuilder buf = new StringBuilder(AUUID.UUID_CHARS + 2);
         buf.append('"');
         AUUID.appendLiteralOnly(b, s + 1, buf).append('"');

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnionPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnionPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnionPrinterFactory.java
index e3e835e..d19035e 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnionPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnionPrinterFactory.java
@@ -18,16 +18,16 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.printers.json.clean;
 
+import java.io.PrintStream;
+import java.util.List;
+
 import org.apache.asterix.formats.nontagged.AqlCleanJSONPrinterFactoryProvider;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
-
-import java.io.PrintStream;
-import java.util.List;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AUnionPrinterFactory implements IPrinterFactory {
 
@@ -48,26 +48,27 @@ public class AUnionPrinterFactory implements IPrinterFactory {
             private List<IAType> unionList;
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() throws HyracksDataException {
                 unionList = unionType.getUnionList();
                 printers = new IPrinter[unionType.getUnionList().size()];
                 for (int i = 0; i < printers.length; i++) {
-                    printers[i] = (AqlCleanJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getUnionList()
-                            .get(i))).createPrinter();
+                    printers[i] = (AqlCleanJSONPrinterFactoryProvider.INSTANCE
+                            .getPrinterFactory(unionType.getUnionList().get(i))).createPrinter();
                     printers[i].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 {
                 ATypeTag tag = unionList.get(b[s + 1]).getTypeTag();
-                if (tag == ATypeTag.UNION)
+                if (tag == ATypeTag.UNION) {
                     printers[b[s + 1]].print(b, s + 1, l, ps);
-                else {
-                    if (tag == ATypeTag.ANY)
+                } else {
+                    if (tag == ATypeTag.ANY) {
                         printers[b[s + 1]].print(b, s + 2, l, ps);
-                    else
+                    } else {
                         printers[b[s + 1]].print(b, s + 1, l, ps);
+                    }
                 }
             }
         };

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnorderedlistPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnorderedlistPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnorderedlistPrinterFactory.java
index 8004c75..3c4bcb5 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnorderedlistPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AUnorderedlistPrinterFactory.java
@@ -27,10 +27,10 @@ import org.apache.asterix.om.pointables.printer.json.clean.APrintVisitor;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnorderedListType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AUnorderedlistPrinterFactory implements IPrinterFactory {
 
@@ -45,8 +45,8 @@ public class AUnorderedlistPrinterFactory implements IPrinterFactory {
     public IPrinter createPrinter() {
 
         PointableAllocator allocator = new PointableAllocator();
-        final IAType inputType = unorderedlistType == null ? DefaultOpenFieldType
-                .getDefaultOpenFieldType(ATypeTag.UNORDEREDLIST) : unorderedlistType;
+        final IAType inputType = unorderedlistType == null
+                ? DefaultOpenFieldType.getDefaultOpenFieldType(ATypeTag.UNORDEREDLIST) : unorderedlistType;
         final IVisitablePointable listAccessor = allocator.allocateListValue(inputType);
         final APrintVisitor printVisitor = new APrintVisitor();
         final Pair<PrintStream, ATypeTag> arg = new Pair<PrintStream, ATypeTag>(null, null);
@@ -54,18 +54,18 @@ public class AUnorderedlistPrinterFactory implements IPrinterFactory {
         return new IPrinter() {
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() {
                 arg.second = inputType.getTypeTag();
             }
 
             @Override
-            public void print(byte[] b, int start, int l, PrintStream ps) throws AlgebricksException {
+            public void print(byte[] b, int start, int l, PrintStream ps) throws HyracksDataException {
                 try {
                     listAccessor.set(b, start, l);
                     arg.first = ps;
                     listAccessor.accept(printVisitor, arg);
-                } catch (Exception ioe) {
-                    throw new AlgebricksException(ioe);
+                } catch (Exception e) {
+                    throw new HyracksDataException(e);
                 }
             }
         };



Mime
View raw message