asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject [1/3] incubator-asterixdb git commit: IPrinters and IAWriters throw HyracksDataException
Date Wed, 10 Feb 2016 04:59:25 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master 6084e3b21 -> a1c45ff45


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/AYearMonthDurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AYearMonthDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AYearMonthDurationPrinter.java
index 8f7c86b..2620afc 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AYearMonthDurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AYearMonthDurationPrinter.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 AYearMonthDurationPrinter implements IPrinter {
 
@@ -32,14 +32,14 @@ public class AYearMonthDurationPrinter 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 {
 
         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/lossless/ABinaryHexPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ABinaryHexPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ABinaryHexPrinter.java
index 70a5d1c..74f3353 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ABinaryHexPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ABinaryHexPrinter.java
@@ -22,8 +22,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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);
         try {
@@ -47,7 +46,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/lossless/ABooleanPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ABooleanPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ABooleanPrinter.java
index 1ea3195..2b9471f 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ABooleanPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ABooleanPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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/lossless/ACirclePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ACirclePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ACirclePrinter.java
index c7f179b..eb42de6 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ACirclePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ACirclePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"circle\": [ { \"point\": [");
         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/lossless/ADatePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADatePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADatePrinter.java
index 7d0ce75..c9a2beb 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADatePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADatePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"date\": \"");
         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/lossless/ADateTimePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADateTimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADateTimePrinter.java
index 7195edd..78f75d8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADateTimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADateTimePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"datetime\": \"");
         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/lossless/ADayTimeDurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADayTimeDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADayTimeDurationPrinter.java
index d376e10..4730cd9 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADayTimeDurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADayTimeDurationPrinter.java
@@ -21,20 +21,19 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"day-time-duration\": ");
         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/lossless/ADoublePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADoublePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADoublePrinter.java
index 8fcf64d..7d8d3de 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADoublePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADoublePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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/lossless/ADurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADurationPrinter.java
index 248490a..3b5a1a2 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ADurationPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"duration\": \"");
         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/lossless/AFloatPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AFloatPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AFloatPrinter.java
index 6954282..8f1ad37 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AFloatPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AFloatPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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/lossless/AInt16Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt16Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt16Printer.java
index 7b09ec8..a791cf0 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt16Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt16Printer.java
@@ -21,19 +21,18 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"int16\": ");

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/lossless/AInt32Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt32Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt32Printer.java
index a757a35..437208b 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt32Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt32Printer.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"int32\": ");

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/lossless/AInt64Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt64Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt64Printer.java
index f01a5d5..f77ab29 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt64Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt64Printer.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"int64\": ");
         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/lossless/AInt8Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt8Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt8Printer.java
index a1afc3f..f4fa7d8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt8Printer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AInt8Printer.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"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/lossless/AIntervalPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AIntervalPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AIntervalPrinter.java
index 84bf23c..d955d90 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AIntervalPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/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/lossless/ALinePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ALinePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ALinePrinter.java
index 24dd017..8dce1e8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ALinePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ALinePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"line\": ");
         ps.print(" [ { \"point\": [");
         ps.print(ADoubleSerializerDeserializer.getDouble(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/lossless/ANullPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullPrinter.java
index e3663fc..b3c04e0 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullPrinter.java
@@ -20,8 +20,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 
 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/lossless/ANullableFieldPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullableFieldPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullableFieldPrinterFactory.java
index f05f55c..1d495b1 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullableFieldPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullableFieldPrinterFactory.java
@@ -24,9 +24,9 @@ import org.apache.asterix.formats.nontagged.AqlLosslessJSONPrinterFactoryProvide
 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,20 +45,21 @@ public class ANullableFieldPrinterFactory implements IPrinterFactory {
             private IPrinter fieldPrinter;
 
             @Override
-            public void init() throws AlgebricksException {
+            public void init() throws HyracksDataException {
                 nullPrinter = (AqlLosslessJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.ANULL))
                         .createPrinter();
-                fieldPrinter = (AqlLosslessJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getNullableType()))
-                        .createPrinter();
+                fieldPrinter = (AqlLosslessJSONPrinterFactoryProvider.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/lossless/AObjectPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AObjectPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AObjectPrinter.java
index 561b5d9..b2975eb 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AObjectPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/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/lossless/AOrderedlistPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AOrderedlistPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AOrderedlistPrinterFactory.java
index 7e4152f..c3d6e76 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AOrderedlistPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AOrderedlistPrinterFactory.java
@@ -20,6 +20,7 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 
 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.lossless.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/lossless/APoint3DPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APoint3DPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APoint3DPrinter.java
index fb21c8d..7d47713 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APoint3DPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APoint3DPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"point3d\": [");
         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/lossless/APointPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APointPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APointPrinter.java
index 8edf6d7..cce6983 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APointPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APointPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"point\": [");
         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/lossless/APolygonPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APolygonPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APolygonPrinter.java
index c94e19e..c1495c4 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/APolygonPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/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/lossless/ARecordPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ARecordPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ARecordPrinterFactory.java
index c4c1e23..ab52e86 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ARecordPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ARecordPrinterFactory.java
@@ -20,6 +20,7 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 
 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.lossless.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/lossless/ARectanglePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ARectanglePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ARectanglePrinter.java
index 4393650..ce203c3 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ARectanglePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ARectanglePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"rectangle\": [");
         ps.print("{ \"point\": [");
         ps.print(ADoubleSerializerDeserializer.getDouble(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/lossless/AStringPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AStringPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AStringPrinter.java
index fdc85be..f1835ad 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AStringPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/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/lossless/ATimePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ATimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ATimePrinter.java
index e3c85b2..aefb2b0 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ATimePrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ATimePrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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("{ \"time\": \"");
         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/lossless/AUUIDPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUUIDPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUUIDPrinter.java
index c36de3a..d20c8ad 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUUIDPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUUIDPrinter.java
@@ -22,19 +22,18 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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/lossless/AUnionPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUnionPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUnionPrinterFactory.java
index 6be1207..a0435c6 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUnionPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUnionPrinterFactory.java
@@ -25,9 +25,9 @@ import org.apache.asterix.formats.nontagged.AqlLosslessJSONPrinterFactoryProvide
 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] = (AqlLosslessJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getUnionList()
-                            .get(i))).createPrinter();
+                    printers[i] = (AqlLosslessJSONPrinterFactoryProvider.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/lossless/AUnorderedlistPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUnorderedlistPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUnorderedlistPrinterFactory.java
index cad45e1..c77115b 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUnorderedlistPrinterFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AUnorderedlistPrinterFactory.java
@@ -27,10 +27,10 @@ import org.apache.asterix.om.pointables.printer.json.lossless.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);
                 }
             }
         };

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/lossless/AYearMonthDurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AYearMonthDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AYearMonthDurationPrinter.java
index d138678..7e4d176 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AYearMonthDurationPrinter.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AYearMonthDurationPrinter.java
@@ -21,8 +21,8 @@ package org.apache.asterix.dataflow.data.nontagged.printers.json.lossless;
 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 {
 
@@ -32,14 +32,14 @@ public class AYearMonthDurationPrinter 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 {
 
         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/formats/nontagged/AqlADMPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlADMPrinterFactoryProvider.java b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlADMPrinterFactoryProvider.java
index b51b4a4..c29e18f 100644
--- a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlADMPrinterFactoryProvider.java
+++ b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlADMPrinterFactoryProvider.java
@@ -66,7 +66,7 @@ public class AqlADMPrinterFactoryProvider implements IPrinterFactoryProvider {
     }
 
     @Override
-    public IPrinterFactory getPrinterFactory(Object type) throws AlgebricksException {
+    public IPrinterFactory getPrinterFactory(Object type) {
         IAType aqlType = (IAType) type;
 
         if (aqlType != null) {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCSVPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCSVPrinterFactoryProvider.java b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCSVPrinterFactoryProvider.java
index 103e3ee..d57445b 100644
--- a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCSVPrinterFactoryProvider.java
+++ b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCSVPrinterFactoryProvider.java
@@ -50,6 +50,7 @@ import org.apache.asterix.om.types.ARecordType;
 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.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.algebricks.data.IPrinterFactoryProvider;
 
@@ -61,7 +62,7 @@ public class AqlCSVPrinterFactoryProvider implements IPrinterFactoryProvider {
     }
 
     @Override
-    public IPrinterFactory getPrinterFactory(Object type) throws AlgebricksException {
+    public IPrinterFactory getPrinterFactory(Object type) {
         IAType aqlType = (IAType) type;
 
         if (aqlType != null) {
@@ -113,9 +114,9 @@ public class AqlCSVPrinterFactoryProvider implements IPrinterFactoryProvider {
                 case RECORD:
                     return new ARecordPrinterFactory((ARecordType) aqlType);
                 case ORDEREDLIST:
-                    throw new AlgebricksException("'Orderedlist' type unsupported for CSV output");
+                    throw new NotImplementedException("'Orderedlist' type unsupported for CSV output");
                 case UNORDEREDLIST:
-                    throw new AlgebricksException("'Unorderedlist' type unsupported for CSV output");
+                    throw new NotImplementedException("'Unorderedlist' type unsupported for CSV output");
                 case UNION: {
                     if (((AUnionType) aqlType).isNullableType())
                         return new ANullableFieldPrinterFactory((AUnionType) aqlType);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCleanJSONPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCleanJSONPrinterFactoryProvider.java b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCleanJSONPrinterFactoryProvider.java
index 7eff19b..c1eb434 100644
--- a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCleanJSONPrinterFactoryProvider.java
+++ b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCleanJSONPrinterFactoryProvider.java
@@ -66,7 +66,7 @@ public class AqlCleanJSONPrinterFactoryProvider implements IPrinterFactoryProvid
     }
 
     @Override
-    public IPrinterFactory getPrinterFactory(Object type) throws AlgebricksException {
+    public IPrinterFactory getPrinterFactory(Object type) {
         IAType aqlType = (IAType) type;
 
         if (aqlType != null) {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlLosslessJSONPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlLosslessJSONPrinterFactoryProvider.java b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlLosslessJSONPrinterFactoryProvider.java
index c79ecbd..aad912c 100644
--- a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlLosslessJSONPrinterFactoryProvider.java
+++ b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlLosslessJSONPrinterFactoryProvider.java
@@ -66,7 +66,7 @@ public class AqlLosslessJSONPrinterFactoryProvider implements IPrinterFactoryPro
     }
 
     @Override
-    public IPrinterFactory getPrinterFactory(Object type) throws AlgebricksException {
+    public IPrinterFactory getPrinterFactory(Object type) {
         IAType aqlType = (IAType) type;
 
         if (aqlType != null) {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a1c45ff4/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java b/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java
index 881ad50..4989025 100644
--- a/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java
+++ b/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java
@@ -28,7 +28,7 @@ import java.util.Arrays;
 import javax.xml.bind.DatatypeConverter;
 
 import org.apache.asterix.dataflow.data.nontagged.printers.adm.ABinaryHexPrinter;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
 import org.junit.Test;
 
@@ -42,7 +42,7 @@ public class ABinaryPrinterTest {
         return ret;
     }
 
-    public static void testOneInputString(String input) throws AlgebricksException {
+    public static void testOneInputString(String input) throws HyracksDataException {
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         PrintStream ps = new PrintStream(baos);


Mime
View raw message