Fixed framesize resetting issue during bulk-loading
- issue 800 -> https://code.google.com/p/asterixdb/issues/detail?id=800
- added an user-friendly exception message
commit 8cc94c2de864b6f2ab2b0cf237b0d942841959c6
Author: Young-Seok <kisskys@gmail.com>
Date: Mon Aug 25 14:13:43 2014 -0700
Change-Id: I2dd9d67fdc150ae8af655baa741d8d3c711b5ca0
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/130
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
index c61c0b0..4100d44 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
@@ -2365,7 +2365,6 @@
private JobId runJob(IHyracksClientConnection hcc, JobSpecification spec, boolean waitForCompletion)
throws Exception {
- spec.setFrameSize(OptimizationConfUtil.getPhysicalOptimizationConfig().getFrameSize());
JobId[] jobIds = executeJobArray(hcc, new Job[] { new Job(spec) }, out, pdf, waitForCompletion);
return jobIds[0];
}
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AbstractTupleParser.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AbstractTupleParser.java
index 9e5a591..13305b1 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AbstractTupleParser.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AbstractTupleParser.java
@@ -22,6 +22,7 @@
import edu.uci.ics.asterix.common.exceptions.AsterixException;
import edu.uci.ics.asterix.om.types.ARecordType;
+import edu.uci.ics.asterix.om.util.AsterixAppContextInfo;
import edu.uci.ics.hyracks.api.comm.IFrameWriter;
import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
@@ -89,7 +90,8 @@
FrameUtils.flushFrame(frame, writer);
appender.reset(frame, true);
if (!appender.append(tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize())) {
- throw new IllegalStateException();
+ throw new IllegalStateException("Tuple size(" + tb.getSize() + ") is greater than frame size("
+ + AsterixAppContextInfo.getInstance().getCompilerProperties().getFrameSize() + ")");
}
}