Repository: asterixdb Updated Branches: refs/heads/master bacf0c595 -> b13c991f5
Add Error code for unknown pending operation Change-Id: I41d0bed5afdfee9b2c29d0218e794247f13e6350 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1739 Reviewed-by: Yingyi Bu <buyin...@gmail.com> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/b13c991f Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/b13c991f Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/b13c991f Branch: refs/heads/master Commit: b13c991f5ae5439761dff05322362d63fb917d31 Parents: bacf0c5 Author: Abdullah Alamoudi <bamou...@gmail.com> Authored: Thu May 11 17:21:34 2017 -0700 Committer: Yingyi Bu <buyin...@gmail.com> Committed: Thu May 11 22:06:45 2017 -0700 ---------------------------------------------------------------------- .../java/org/apache/asterix/common/exceptions/ErrorCode.java | 1 + .../src/main/resources/asx_errormsg/en.properties | 1 + .../ExternalFilesIndexModificationOperatorDescriptor.java | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/b13c991f/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java index 2a6efd5..e59c379 100644 --- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java +++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java @@ -57,6 +57,7 @@ public class ErrorCode { public static final int PROPERTY_NOT_SET = 14; public static final int ROOT_LOCAL_RESOURCE_EXISTS = 15; public static final int ROOT_LOCAL_RESOURCE_COULD_NOT_BE_CREATED = 16; + public static final int UNKNOWN_EXTERNAL_FILE_PENDING_OP = 17; public static final int INSTANTIATION_ERROR = 100; // Compilation errors http://git-wip-us.apache.org/repos/asf/asterixdb/blob/b13c991f/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties index 9b2ad8a..487758c 100644 --- a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties +++ b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties @@ -50,6 +50,7 @@ 14 = Property %1$s not set 15 = Storage metadata directory of %1$s in %2$s already exists 16 = Storage metadata directory of %1$s in %2$s couldn't be created +17 = Unknown external file pending operation %1$s 100 = Unable to instantiate class %1$s # Compile-time check errors http://git-wip-us.apache.org/repos/asf/asterixdb/blob/b13c991f/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexModificationOperatorDescriptor.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexModificationOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexModificationOperatorDescriptor.java index 684cb15..f4fb455 100644 --- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexModificationOperatorDescriptor.java +++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexModificationOperatorDescriptor.java @@ -20,6 +20,7 @@ package org.apache.asterix.external.operators; import java.util.List; +import org.apache.asterix.common.exceptions.ErrorCode; import org.apache.asterix.external.indexing.ExternalFile; import org.apache.asterix.external.indexing.FileIndexTupleTranslator; import org.apache.hyracks.api.comm.IFrameWriter; @@ -59,8 +60,6 @@ public class ExternalFilesIndexModificationOperatorDescriptor extends AbstractSi public IOperatorNodePushable createPushRuntime(IHyracksTaskContext ctx, IRecordDescriptorProvider recordDescProvider, int partition, int nPartitions) throws HyracksDataException { return new AbstractOperatorNodePushable() { - - @SuppressWarnings("incomplete-switch") @Override public void initialize() throws HyracksDataException { final IIndexDataflowHelper indexHelper = dataflowHelperFactory.create(ctx, partition); @@ -86,7 +85,8 @@ public class ExternalFilesIndexModificationOperatorDescriptor extends AbstractSi case NO_OP: break; default: - throw new HyracksDataException("Unknown pending op " + file.getPendingOp()); + throw HyracksDataException.create(ErrorCode.UNKNOWN_EXTERNAL_FILE_PENDING_OP, + file.getPendingOp()); } } bulkLoader.end();