Yingyi Bu has submitted this change and it was merged. Change subject: Add Error code for unknown pending operation ......................................................................
Add Error code for unknown pending operation Change-Id: I41d0bed5afdfee9b2c29d0218e794247f13e6350 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1739 Reviewed-by: Yingyi Bu <[email protected]> Tested-by: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> --- M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java M asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties M asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexModificationOperatorDescriptor.java 3 files changed, 5 insertions(+), 3 deletions(-) Approvals: Yingyi Bu: Looks good to me, approved Jenkins: Verified; Verified Objections: Jenkins: Violations found; Violations found 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 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 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 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 @@ 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 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 @@ 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(); -- To view, visit https://asterix-gerrit.ics.uci.edu/1739 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41d0bed5afdfee9b2c29d0218e794247f13e6350 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]>
