asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [01/22] asterixdb git commit: Unify runtime type exceptions by using error code and message template.
Date Tue, 01 Nov 2016 03:08:10 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 7b1447742 -> 52671a2c8


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
index 88a2f24..520465a 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
@@ -22,7 +22,6 @@ import java.io.Serializable;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime;
@@ -87,7 +86,7 @@ public class AssignRuntimeFactory extends AbstractOneInputOneOutputRuntimeFactor
 
     @Override
     public AbstractOneInputOneOutputOneFramePushRuntime createOneOutputPushRuntime(final
IHyracksTaskContext ctx)
-            throws AlgebricksException {
+            throws HyracksDataException {
         final int[] projectionToOutColumns = new int[projectionList.length];
         for (int j = 0; j < projectionList.length; j++) {
             projectionToOutColumns[j] = Arrays.binarySearch(outColumns, projectionList[j]);
@@ -108,11 +107,7 @@ public class AssignRuntimeFactory extends AbstractOneInputOneOutputRuntimeFactor
                     first = false;
                     int n = evalFactories.length;
                     for (int i = 0; i < n; i++) {
-                        try {
-                            eval[i] = evalFactories[i].createScalarEvaluator(ctx);
-                        } catch (AlgebricksException ae) {
-                            throw new HyracksDataException(ae);
-                        }
+                        eval[i] = evalFactories[i].createScalarEvaluator(ctx);
                     }
                 }
                 isOpen = true;
@@ -177,7 +172,7 @@ public class AssignRuntimeFactory extends AbstractOneInputOneOutputRuntimeFactor
                             tb.addField(accessor, tIndex, projectionList[f]);
                         }
                     }
-                } catch (HyracksDataException | AlgebricksException e) {
+                } catch (HyracksDataException e) {
                     throw new HyracksDataException(ErrorCode.HYRACKS, ErrorCode.ERROR_PROCESSING_TUPLE,
                             "Error evaluating tuple %1$s in AssignRuntime", (Throwable) e,
                             new Serializable[] { tupleIndex });

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
index bb6cc73..38fe7d1 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
@@ -21,7 +21,6 @@ package org.apache.hyracks.algebricks.runtime.operators.std;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IRunningAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IRunningAggregateEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime;
@@ -79,7 +78,7 @@ public class RunningAggregateRuntimeFactory extends AbstractOneInputOneOutputRun
 
     @Override
     public AbstractOneInputOneOutputOneFramePushRuntime createOneOutputPushRuntime(final
IHyracksTaskContext ctx)
-            throws AlgebricksException {
+            throws HyracksDataException {
         final int[] projectionToOutColumns = new int[projectionList.length];
         for (int j = 0; j < projectionList.length; j++) {
             projectionToOutColumns[j] = Arrays.binarySearch(outColumns, projectionList[j]);
@@ -99,19 +98,11 @@ public class RunningAggregateRuntimeFactory extends AbstractOneInputOneOutputRun
                     first = false;
                     int n = runningAggregates.length;
                     for (int i = 0; i < n; i++) {
-                        try {
-                            raggs[i] = runningAggregates[i].createRunningAggregateEvaluator(ctx);
-                        } catch (AlgebricksException ae) {
-                            throw new HyracksDataException(ae);
-                        }
+                        raggs[i] = runningAggregates[i].createRunningAggregateEvaluator(ctx);
                     }
                 }
                 for (int i = 0; i < runningAggregates.length; i++) {
-                    try {
-                        raggs[i].init();
-                    } catch (AlgebricksException ae) {
-                        throw new HyracksDataException(ae);
-                    }
+                    raggs[i].init();
                 }
                 isOpen = true;
                 writer.open();
@@ -148,11 +139,7 @@ public class RunningAggregateRuntimeFactory extends AbstractOneInputOneOutputRun
                 for (int f = 0; f < projectionList.length; f++) {
                     int k = projectionToOutColumns[f];
                     if (k >= 0) {
-                        try {
-                            raggs[k].step(tupleRef, p);
-                        } catch (AlgebricksException e) {
-                            throw new HyracksDataException(e);
-                        }
+                        raggs[k].step(tupleRef, p);
                         tb.addField(p.getByteArray(), p.getStartOffset(), p.getLength());
                     } else {
                         tb.addField(accessor, tIndex, projectionList[f]);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntimeFactory.java
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntimeFactory.java
index 62e3542..d52ceee 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SinkWriterRuntimeFactory.java
@@ -20,11 +20,10 @@ package org.apache.hyracks.algebricks.runtime.operators.std;
 
 import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.PrintStream;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IAWriter;
 import org.apache.hyracks.algebricks.data.IAWriterFactory;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
@@ -32,6 +31,7 @@ import org.apache.hyracks.algebricks.runtime.base.IPushRuntime;
 import org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SinkWriterRuntimeFactory implements IPushRuntimeFactory {
 
@@ -67,14 +67,13 @@ public class SinkWriterRuntimeFactory implements IPushRuntimeFactory {
     }
 
     @Override
-    public IPushRuntime createPushRuntime(IHyracksTaskContext ctx) throws AlgebricksException
{
-        PrintStream filePrintStream = null;
+    public IPushRuntime createPushRuntime(IHyracksTaskContext ctx) throws HyracksDataException
{
         try {
-            filePrintStream = new PrintStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
-        } catch (FileNotFoundException e) {
-            throw new AlgebricksException(e);
+            PrintStream filePrintStream = new PrintStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
+            IAWriter w = writerFactory.createWriter(fields, filePrintStream, printerFactories,
inputRecordDesc);
+            return new SinkWriterRuntime(w, filePrintStream, inputRecordDesc, true);
+        } catch (IOException e) {
+            throw new HyracksDataException(e);
         }
-        IAWriter w = writerFactory.createWriter(fields, filePrintStream, printerFactories,
inputRecordDesc);
-        return new SinkWriterRuntime(w, filePrintStream, inputRecordDesc, true);
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SplitOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SplitOperatorDescriptor.java
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SplitOperatorDescriptor.java
index 2215a96..be39208 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SplitOperatorDescriptor.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SplitOperatorDescriptor.java
@@ -20,7 +20,6 @@ package org.apache.hyracks.algebricks.runtime.operators.std;
 
 import java.nio.ByteBuffer;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IBinaryIntegerInspector;
 import org.apache.hyracks.algebricks.data.IBinaryIntegerInspectorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
@@ -93,11 +92,7 @@ public class SplitOperatorDescriptor extends AbstractReplicateOperatorDescriptor
             final FrameTupleReference tRef = new FrameTupleReference();;
             final IBinaryIntegerInspector intInsepctor = intInsepctorFactory.createBinaryIntegerInspector(ctx);
             final IScalarEvaluator eval;
-            try {
-                eval = brachingExprEvalFactory.createScalarEvaluator(ctx);
-            } catch (AlgebricksException ae) {
-                throw new HyracksDataException(ae);
-            }
+            eval = brachingExprEvalFactory.createScalarEvaluator(ctx);
             for (int i = 0; i < numberOfNonMaterializedOutputs; i++) {
                 appenders[i] = new FrameTupleAppender(new VSizeFrame(ctx), true);
             }
@@ -122,11 +117,7 @@ public class SplitOperatorDescriptor extends AbstractReplicateOperatorDescriptor
                     for (int i = 0; i < tupleCount; i++) {
                         // Get the output branch number from the field in the given tuple.
                         tRef.reset(accessor, i);
-                        try {
-                            eval.evaluate(tRef, p);
-                        } catch (AlgebricksException ae) {
-                            throw new HyracksDataException(ae);
-                        }
+                        eval.evaluate(tRef, p);
                         outputBranch = intInsepctor.getIntegerValue(p.getByteArray(), p.getStartOffset(),
                                 p.getLength());
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
index 11f47ac..59df402 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
@@ -20,7 +20,6 @@ package org.apache.hyracks.algebricks.runtime.operators.std;
 
 import java.nio.ByteBuffer;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IBinaryIntegerInspector;
 import org.apache.hyracks.algebricks.data.IBinaryIntegerInspectorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
@@ -76,13 +75,9 @@ public class StreamLimitRuntimeFactory extends AbstractOneInputOneOutputRuntimeF
                 writer.open();
                 if (evalMaxObjects == null) {
                     initAccessAppendRef(ctx);
-                    try {
-                        evalMaxObjects = maxObjectsEvalFactory.createScalarEvaluator(ctx);
-                        if (offsetEvalFactory != null) {
-                            evalOffset = offsetEvalFactory.createScalarEvaluator(ctx);
-                        }
-                    } catch (AlgebricksException ae) {
-                        throw new HyracksDataException(ae);
+                    evalMaxObjects = maxObjectsEvalFactory.createScalarEvaluator(ctx);
+                    if (offsetEvalFactory != null) {
+                        evalOffset = offsetEvalFactory.createScalarEvaluator(ctx);
                     }
                 }
                 afterLastTuple = false;
@@ -138,11 +133,7 @@ public class StreamLimitRuntimeFactory extends AbstractOneInputOneOutputRuntimeF
 
             private int evaluateInteger(IScalarEvaluator eval, int tIdx) throws HyracksDataException
{
                 tRef.reset(tAccess, tIdx);
-                try {
-                    eval.evaluate(tRef, p);
-                } catch (AlgebricksException ae) {
-                    throw new HyracksDataException(ae);
-                }
+                eval.evaluate(tRef, p);
                 int lim = bii.getIntegerValue(p.getByteArray(), p.getStartOffset(), p.getLength());
                 return lim;
             }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
index 43c63b5..a8ca082 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
@@ -21,7 +21,6 @@ package org.apache.hyracks.algebricks.runtime.operators.std;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime;
 import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputRuntimeFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
@@ -48,10 +47,8 @@ public class StreamProjectRuntimeFactory extends AbstractOneInputOneOutputRuntim
 
     @Override
     public AbstractOneInputOneOutputOneFramePushRuntime createOneOutputPushRuntime(final
IHyracksTaskContext ctx)
-            throws AlgebricksException {
-
+            throws HyracksDataException {
         return new AbstractOneInputOneOutputOneFramePushRuntime() {
-
             private boolean first = true;
 
             @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
index 418ea23..0f57fd7 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
@@ -21,7 +21,6 @@ package org.apache.hyracks.algebricks.runtime.operators.std;
 import java.io.DataOutput;
 import java.nio.ByteBuffer;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IBinaryBooleanInspector;
 import org.apache.hyracks.algebricks.data.IBinaryBooleanInspectorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
@@ -92,11 +91,7 @@ public class StreamSelectRuntimeFactory extends AbstractOneInputOneOutputRuntime
             public void open() throws HyracksDataException {
                 if (eval == null) {
                     initAccessAppendFieldRef(ctx);
-                    try {
-                        eval = cond.createScalarEvaluator(ctx);
-                    } catch (AlgebricksException ae) {
-                        throw new HyracksDataException(ae);
-                    }
+                    eval = cond.createScalarEvaluator(ctx);
                 }
                 isOpen = true;
                 writer.open();
@@ -135,11 +130,7 @@ public class StreamSelectRuntimeFactory extends AbstractOneInputOneOutputRuntime
                 int nTuple = tAccess.getTupleCount();
                 for (int t = 0; t < nTuple; t++) {
                     tRef.reset(tAccess, t);
-                    try {
-                        eval.evaluate(tRef, p);
-                    } catch (AlgebricksException ae) {
-                        throw new HyracksDataException(ae);
-                    }
+                    eval.evaluate(tRef, p);
                     if (bbi.getBooleanValue(p.getByteArray(), p.getStartOffset(), p.getLength()))
{
                         if (projectionList != null) {
                             appendProjectionToFrame(t, projectionList);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
index 36d3349..024f6f5 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
@@ -25,7 +25,6 @@ import java.io.InputStreamReader;
 import java.io.PrintStream;
 import java.nio.ByteBuffer;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinter;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime;
@@ -55,14 +54,13 @@ public class StringStreamingRuntimeFactory extends AbstractOneInputOneOutputRunt
 
     @Override
     public AbstractOneInputOneOutputOneFramePushRuntime createOneOutputPushRuntime(final
IHyracksTaskContext ctx)
-            throws AlgebricksException {
+            throws HyracksDataException {
         final IPrinter[] printers = new IPrinter[printerFactories.length];
         for (int i = 0; i < printerFactories.length; i++) {
             printers[i] = printerFactories[i].createPrinter();
         }
 
         return new AbstractOneInputOneOutputOneFramePushRuntime() {
-
             final class ForwardScriptOutput implements Runnable {
 
                 private InputStream inStream;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
index 300be34..2410d67 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
@@ -24,7 +24,6 @@ import java.io.DataOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IUnnestingEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IUnnestingEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IUnnestingPositionWriter;
@@ -79,16 +78,12 @@ public class UnnestRuntimeFactory extends AbstractOneInputOneOutputRuntimeFactor
 
     @Override
     public AbstractOneInputOneOutputOneFramePushRuntime createOneOutputPushRuntime(final
IHyracksTaskContext ctx)
-            throws AlgebricksException {
+            throws HyracksDataException {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         DataOutput output = new DataOutputStream(bos);
         if (missingWriterFactory != null) {
             IMissingWriter missingWriter = missingWriterFactory.createMissingWriter();
-            try {
-                missingWriter.writeMissing(output);
-            } catch (HyracksDataException e) {
-                throw new AlgebricksException(e);
-            }
+            missingWriter.writeMissing(output);
         }
         byte[] missingBytes = bos.toByteArray();
         int missingBytesLen = bos.size();
@@ -114,13 +109,13 @@ public class UnnestRuntimeFactory extends AbstractOneInputOneOutputRuntimeFactor
                     try {
                         unnest.init(tRef);
                         unnesting(t);
-                    } catch (AlgebricksException | IOException ae) {
+                    } catch (IOException ae) {
                         throw new HyracksDataException(ae);
                     }
                 }
             }
 
-            private void unnesting(int t) throws AlgebricksException, IOException {
+            private void unnesting(int t) throws IOException {
                 // Assumes that when unnesting the tuple, each step() call for each element
                 // in the tuple will increase the positionIndex, and the positionIndex will
                 // be reset when a new tuple is to be processed.

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/pom.xml b/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
index 54bf66a..42b946d 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
+++ b/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
@@ -125,11 +125,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.hyracks</groupId>
-      <artifactId>algebricks-common</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hyracks</groupId>
       <artifactId>hyracks-dataflow-common</artifactId>
       <version>${project.version}</version>
     </dependency>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntArrayUnnester.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntArrayUnnester.java
b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntArrayUnnester.java
index 7cce35e..a789ad0 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntArrayUnnester.java
+++ b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntArrayUnnester.java
@@ -20,10 +20,10 @@ package org.apache.hyracks.algebricks.tests.pushruntime;
 
 import java.io.IOException;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IUnnestingEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IUnnestingEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
@@ -39,19 +39,19 @@ public class IntArrayUnnester implements IUnnestingEvaluatorFactory {
     private static final long serialVersionUID = 1L;
 
     @Override
-    public IUnnestingEvaluator createUnnestingEvaluator(IHyracksTaskContext ctx) throws AlgebricksException
{
+    public IUnnestingEvaluator createUnnestingEvaluator(IHyracksTaskContext ctx) throws HyracksDataException
{
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         return new IUnnestingEvaluator() {
 
             private int pos;
 
             @Override
-            public void init(IFrameTupleReference tuple) throws AlgebricksException {
+            public void init(IFrameTupleReference tuple) throws HyracksDataException {
                 pos = 0;
             }
 
             @Override
-            public boolean step(IPointable result) throws AlgebricksException {
+            public boolean step(IPointable result) throws HyracksDataException {
                 try {
                     if (pos < x.length) {
                         // Writes one byte to distinguish between null
@@ -66,7 +66,7 @@ public class IntArrayUnnester implements IUnnestingEvaluatorFactory {
                     }
 
                 } catch (IOException e) {
-                    throw new AlgebricksException(e);
+                    throw new HyracksDataException(e);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerAddEvalFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerAddEvalFactory.java
b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerAddEvalFactory.java
index f7a97f4..ea332df 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerAddEvalFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerAddEvalFactory.java
@@ -24,6 +24,7 @@ import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.IntegerPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -43,7 +44,7 @@ public class IntegerAddEvalFactory implements IScalarEvaluatorFactory {
     }
 
     @Override
-    public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException
{
+    public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws HyracksDataException
{
         return new IScalarEvaluator() {
             private IPointable p = VoidPointable.FACTORY.createPointable();
             private ArrayBackedValueStorage argOut = new ArrayBackedValueStorage();
@@ -52,7 +53,7 @@ public class IntegerAddEvalFactory implements IScalarEvaluatorFactory {
             private IScalarEvaluator evalRight = evalRightFactory.createScalarEvaluator(ctx);
 
             @Override
-            public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException
{
+            public void evaluate(IFrameTupleReference tuple, IPointable result) throws HyracksDataException
{
                 evalLeft.evaluate(tuple, p);
                 int v1 = IntegerPointable.getInteger(p.getByteArray(), p.getStartOffset());
                 evalRight.evaluate(tuple, p);
@@ -62,7 +63,7 @@ public class IntegerAddEvalFactory implements IScalarEvaluatorFactory {
                     argOut.getDataOutput().writeInt(v1 + v2);
                     result.set(argOut);
                 } catch (IOException e) {
-                    throw new AlgebricksException(e);
+                    throw new HyracksDataException(e);
                 }
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerConstantEvalFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerConstantEvalFactory.java
b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerConstantEvalFactory.java
index fe5bbf6..26790c5 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerConstantEvalFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerConstantEvalFactory.java
@@ -18,7 +18,6 @@
  */
 package org.apache.hyracks.algebricks.tests.pushruntime;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
@@ -43,21 +42,17 @@ public class IntegerConstantEvalFactory implements IScalarEvaluatorFactory
{
     }
 
     @Override
-    public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException
{
+    public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws HyracksDataException
{
         return new IScalarEvaluator() {
 
             private ArrayBackedValueStorage buf = new ArrayBackedValueStorage();
 
             {
-                try {
                     IntegerSerializerDeserializer.INSTANCE.serialize(value, buf.getDataOutput());
-                } catch (HyracksDataException e) {
-                    throw new AlgebricksException(e);
-                }
             }
 
             @Override
-            public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException
{
+            public void evaluate(IFrameTupleReference tuple, IPointable result) throws HyracksDataException
{
                 result.set(buf);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerEqualsEvalFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerEqualsEvalFactory.java
b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerEqualsEvalFactory.java
index 106f611..3cdd1f0 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerEqualsEvalFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerEqualsEvalFactory.java
@@ -18,10 +18,10 @@
  */
 package org.apache.hyracks.algebricks.tests.pushruntime;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.BooleanPointable;
 import org.apache.hyracks.data.std.primitive.IntegerPointable;
@@ -40,7 +40,7 @@ public class IntegerEqualsEvalFactory implements IScalarEvaluatorFactory
{
     }
 
     @Override
-    public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException
{
+    public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws HyracksDataException
{
         return new IScalarEvaluator() {
             private IPointable p = VoidPointable.FACTORY.createPointable();
             private IScalarEvaluator eval1 = evalFact1.createScalarEvaluator(ctx);
@@ -48,7 +48,7 @@ public class IntegerEqualsEvalFactory implements IScalarEvaluatorFactory
{
             private byte[] rBytes = new byte[1];
 
             @Override
-            public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException
{
+            public void evaluate(IFrameTupleReference tuple, IPointable result) throws HyracksDataException
{
                 eval1.evaluate(tuple, p);
                 int v1 = IntegerPointable.getInteger(p.getByteArray(), p.getStartOffset());
                 eval2.evaluate(tuple, p);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerGreaterThanEvalFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerGreaterThanEvalFactory.java
b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerGreaterThanEvalFactory.java
index 400dd23..2ed4dd3 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerGreaterThanEvalFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-tests/src/main/java/org/apache/hyracks/algebricks/tests/pushruntime/IntegerGreaterThanEvalFactory.java
@@ -18,10 +18,10 @@
  */
 package org.apache.hyracks.algebricks.tests.pushruntime;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.BooleanPointable;
 import org.apache.hyracks.data.std.primitive.IntegerPointable;
@@ -40,7 +40,7 @@ public class IntegerGreaterThanEvalFactory implements IScalarEvaluatorFactory
{
     }
 
     @Override
-    public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException
{
+    public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws HyracksDataException
{
         return new IScalarEvaluator() {
             private IPointable p = VoidPointable.FACTORY.createPointable();
             private IScalarEvaluator eval1 = evalFact1.createScalarEvaluator(ctx);
@@ -48,7 +48,7 @@ public class IntegerGreaterThanEvalFactory implements IScalarEvaluatorFactory
{
             private byte[] rBytes = new byte[1];
 
             @Override
-            public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException
{
+            public void evaluate(IFrameTupleReference tuple, IPointable result) throws HyracksDataException
{
                 eval1.evaluate(tuple, p);
                 int v1 = IntegerPointable.getInteger(p.getByteArray(), p.getStartOffset());
                 eval2.evaluate(tuple, p);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/ITuplePairComparatorFactory.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/ITuplePairComparatorFactory.java
b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/ITuplePairComparatorFactory.java
index 1437087..9800f5b 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/ITuplePairComparatorFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/ITuplePairComparatorFactory.java
@@ -21,7 +21,8 @@ package org.apache.hyracks.api.dataflow.value;
 import java.io.Serializable;
 
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public interface ITuplePairComparatorFactory extends Serializable {
-    public ITuplePairComparator createTuplePairComparator(IHyracksTaskContext ctx);
+    public ITuplePairComparator createTuplePairComparator(IHyracksTaskContext ctx) throws
HyracksDataException;
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
index d17af4c..a79ab1d 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
@@ -20,12 +20,15 @@ package org.apache.hyracks.api.exceptions;
 
 import java.io.Serializable;
 import java.util.Formatter;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * The main execution time exception type for runtime errors in a hyracks environment
  */
 public class HyracksDataException extends HyracksException {
     private static final long serialVersionUID = 1L;
+    private static final Logger LOGGER = Logger.getLogger(HyracksDataException.class.getName());
 
     public static final String NONE = "";
     public static final int UNKNOWN = 0;
@@ -45,10 +48,6 @@ public class HyracksDataException extends HyracksException {
         this.params = params;
     }
 
-    public HyracksDataException() {
-        this(NONE, UNKNOWN, null, null, null, new Serializable[0]);
-    }
-
     public HyracksDataException(String message) {
         this(NONE, UNKNOWN, message, (Throwable) null, (String) null);
     }
@@ -136,6 +135,10 @@ public class HyracksDataException extends HyracksException {
             }
             fmt.format(message == null ? "null" : message, (Object[]) params);
             return fmt.out().toString();
+        } catch (Exception e) {
+            // Do not throw further exceptions during exception processing.
+            LOGGER.log(Level.WARNING, e.getLocalizedMessage(), e);
+            return e.getMessage();
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/IAggregatorDescriptor.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/IAggregatorDescriptor.java
b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/IAggregatorDescriptor.java
index 9552294..32e2f7b 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/IAggregatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/IAggregatorDescriptor.java
@@ -27,13 +27,14 @@ public interface IAggregatorDescriptor {
     /**
      * Create an aggregate state
      *
-     * @return
+     * @return an aggregate state
+     * @throws HyracksDataException
      */
-    AggregateState createAggregateStates();
+    AggregateState createAggregateStates() throws HyracksDataException;
 
     /**
      * Initialize the state based on the input tuple.
-     * 
+     *
      * @param tupleBuilder
      * @param accessor
      * @param tIndex

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoinOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoinOperatorDescriptor.java
b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoinOperatorDescriptor.java
index 4fa1498..09b7544 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoinOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoinOperatorDescriptor.java
@@ -112,7 +112,8 @@ public class NestedLoopJoinOperatorDescriptor extends AbstractOperatorDescriptor
 
         @Override
         public IOperatorNodePushable createPushRuntime(final IHyracksTaskContext ctx,
-                IRecordDescriptorProvider recordDescProvider, final int partition, int nPartitions)
{
+                IRecordDescriptorProvider recordDescProvider, final int partition, int nPartitions)
+                throws HyracksDataException {
             final RecordDescriptor rd0 = recordDescProvider.getInputRecordDescriptor(nljAid,
0);
             final RecordDescriptor rd1 = recordDescProvider.getInputRecordDescriptor(getActivityId(),
0);
             final ITuplePairComparator comparator = comparatorFactory.createTuplePairComparator(ctx);


Mime
View raw message