Fixed exception handling
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 cb05529..f463577 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
@@ -43,7 +43,7 @@
protected final ARecordType recType;
protected final IHyracksTaskContext ctx;
- public AbstractTupleParser(IHyracksTaskContext ctx, ARecordType recType) {
+ public AbstractTupleParser(IHyracksTaskContext ctx, ARecordType recType) throws HyracksDataException {
appender = new FrameTupleAppender(ctx.getFrameSize());
frame = ctx.allocateFrame();
this.recType = recType;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmSchemafullRecordParserFactory.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmSchemafullRecordParserFactory.java
index a9287c8..98c4cfc 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmSchemafullRecordParserFactory.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmSchemafullRecordParserFactory.java
@@ -16,6 +16,7 @@
import edu.uci.ics.asterix.om.types.ARecordType;
import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParser;
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParserFactory;
@@ -34,7 +35,7 @@
}
@Override
- public ITupleParser createTupleParser(final IHyracksTaskContext ctx) {
+ public ITupleParser createTupleParser(final IHyracksTaskContext ctx) throws HyracksDataException {
return new AdmTupleParser(ctx, recType);
}
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmTupleParser.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmTupleParser.java
index 9be4c00..674693d 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmTupleParser.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/AdmTupleParser.java
@@ -16,6 +16,7 @@
import edu.uci.ics.asterix.om.types.ARecordType;
import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
/**
* An extension of AbstractTupleParser that provides functionality for
@@ -23,7 +24,7 @@
*/
public class AdmTupleParser extends AbstractTupleParser {
- public AdmTupleParser(IHyracksTaskContext ctx, ARecordType recType) {
+ public AdmTupleParser(IHyracksTaskContext ctx, ARecordType recType) throws HyracksDataException {
super(ctx, recType);
}
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/DelimitedDataTupleParser.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/DelimitedDataTupleParser.java
index c029b64..f6ed906 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/DelimitedDataTupleParser.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/DelimitedDataTupleParser.java
@@ -16,6 +16,7 @@
import edu.uci.ics.asterix.om.types.ARecordType;
import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
import edu.uci.ics.hyracks.dataflow.common.data.parsers.IValueParserFactory;
/**
@@ -27,7 +28,7 @@
private final DelimitedDataParser dataParser;
public DelimitedDataTupleParser(IHyracksTaskContext ctx, ARecordType recType,
- IValueParserFactory[] valueParserFactories, char fieldDelimter) {
+ IValueParserFactory[] valueParserFactories, char fieldDelimter) throws HyracksDataException {
super(ctx, recType);
dataParser = new DelimitedDataParser(recType, valueParserFactories, fieldDelimter);
}
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/NtDelimitedDataTupleParserFactory.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/NtDelimitedDataTupleParserFactory.java
index 86fba12..060f087 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/NtDelimitedDataTupleParserFactory.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/operators/file/NtDelimitedDataTupleParserFactory.java
@@ -16,6 +16,7 @@
import edu.uci.ics.asterix.om.types.ARecordType;
import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
import edu.uci.ics.hyracks.dataflow.common.data.parsers.IValueParserFactory;
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParser;
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParserFactory;
@@ -38,7 +39,7 @@
}
@Override
- public ITupleParser createTupleParser(final IHyracksTaskContext ctx) {
+ public ITupleParser createTupleParser(final IHyracksTaskContext ctx) throws HyracksDataException {
return new DelimitedDataTupleParser(ctx, recordType, valueParserFactories, fieldDelimiter);
}
diff --git a/asterix-tools/src/main/java/edu/uci/ics/asterix/tools/external/data/RateControlledFileSystemBasedAdapter.java b/asterix-tools/src/main/java/edu/uci/ics/asterix/tools/external/data/RateControlledFileSystemBasedAdapter.java
index 84b989d..9808fe4 100644
--- a/asterix-tools/src/main/java/edu/uci/ics/asterix/tools/external/data/RateControlledFileSystemBasedAdapter.java
+++ b/asterix-tools/src/main/java/edu/uci/ics/asterix/tools/external/data/RateControlledFileSystemBasedAdapter.java
@@ -126,7 +126,8 @@
}
- protected ITupleParser getRateControlledDelimitedDataTupleParser(ARecordType recordType) throws AsterixException {
+ protected ITupleParser getRateControlledDelimitedDataTupleParser(ARecordType recordType) throws AsterixException,
+ HyracksDataException {
ITupleParser parser;
int n = recordType.getFieldTypes().length;
IValueParserFactory[] fieldParserFactories = new IValueParserFactory[n];
@@ -205,7 +206,7 @@
}
@Override
- public ITupleParser createTupleParser(IHyracksTaskContext ctx) {
+ public ITupleParser createTupleParser(IHyracksTaskContext ctx) throws HyracksDataException {
return new RateControlledTupleParser(ctx, recordType, dataParser, configuration);
}
@@ -221,7 +222,7 @@
public static final String INTER_TUPLE_INTERVAL = "tuple-interval";
public RateControlledTupleParser(IHyracksTaskContext ctx, ARecordType recType, IDataParser dataParser,
- Map<String, String> configuration) {
+ Map<String, String> configuration) throws HyracksDataException {
super(ctx, recType);
this.dataParser = dataParser;
String propValue = configuration.get(INTER_TUPLE_INTERVAL);
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexResourceManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexResourceManager.java
index 7ecfa69..201d25a 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexResourceManager.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexResourceManager.java
@@ -68,10 +68,9 @@
newTuple.resetByTupleOffset(logLocator.getBuffer().getByteBuffer(), offset);
offset += newValueSize;
- ILSMIndexAccessor indexAccessor = (ILSMIndexAccessor) index.createAccessor(NoOpOperationCallback.INSTANCE,
- NoOpOperationCallback.INSTANCE);
-
try {
+ ILSMIndexAccessor indexAccessor = (ILSMIndexAccessor) index.createAccessor(NoOpOperationCallback.INSTANCE, NoOpOperationCallback.INSTANCE);
+
if (resourceType == ResourceType.LSM_BTREE) {
/* old operation */
@@ -135,10 +134,9 @@
newTuple.resetByTupleOffset(logLocator.getBuffer().getByteBuffer(), offset);
offset += newValueSize;
- ILSMIndexAccessor indexAccessor = (ILSMIndexAccessor) index.createAccessor(NoOpOperationCallback.INSTANCE,
- NoOpOperationCallback.INSTANCE);
-
try {
+ ILSMIndexAccessor indexAccessor = (ILSMIndexAccessor) index.createAccessor(NoOpOperationCallback.INSTANCE, NoOpOperationCallback.INSTANCE);
+
if (newOperation == IndexOperation.INSERT.ordinal()) {
indexAccessor.insert(newTuple);
} else if (newOperation == IndexOperation.DELETE.ordinal()) {