asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject [13/13] asterixdb git commit: Cleanup storage exceptions
Date Sat, 15 Apr 2017 21:44:56 GMT
Cleanup storage exceptions

Change-Id: I020d2b4b1f4ae48fc2df0b720e70a1ce95867d34
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1619
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/3b3319a9
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/3b3319a9
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/3b3319a9

Branch: refs/heads/master
Commit: 3b3319a9a45bc810be685cd61e2a31363fbe1593
Parents: 0e7bb92
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Fri Apr 14 06:44:50 2017 +0300
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Sat Apr 15 14:43:45 2017 -0700

----------------------------------------------------------------------
 .../src/test/resources/runtimets/testsuite.xml  |   6 +-
 .../resources/runtimets/testsuite_sqlpp.xml     |   4 +-
 .../context/CorrelatedPrefixMergePolicy.java    |   6 +-
 .../indexing/ExternalFileIndexAccessor.java     |   8 +-
 ...lDatasetIndexesCommitOperatorDescriptor.java |  32 +-
 .../ExternalFilesIndexOperatorDescriptor.java   |  26 +-
 ...rnalIndexBulkModifyOperatorNodePushable.java |  11 +-
 .../apache/asterix/metadata/MetadataNode.java   | 590 +++++++++++--------
 .../api/IMetadataEntityTupleTranslator.java     |   9 +-
 .../asterix/metadata/api/IValueExtractor.java   |   4 +-
 .../CompactionPolicyTupleTranslator.java        |   6 +-
 .../DatasetTupleTranslator.java                 |  84 +--
 .../DatasourceAdapterTupleTranslator.java       |   8 +-
 .../DatatypeTupleTranslator.java                |  30 +-
 .../DataverseTupleTranslator.java               |  11 +-
 .../ExternalFileTupleTranslator.java            |  20 +-
 .../FeedConnectionTupleTranslator.java          |  36 +-
 .../FeedPolicyTupleTranslator.java              |   7 +-
 .../FeedTupleTranslator.java                    |  26 +-
 .../FunctionTupleTranslator.java                |  13 +-
 .../IndexTupleTranslator.java                   |  52 +-
 .../LibraryTupleTranslator.java                 |  10 +-
 .../NodeGroupTupleTranslator.java               |  23 +-
 .../NodeTupleTranslator.java                    |  11 +-
 .../MetadataEntityValueExtractor.java           |   6 +-
 .../NestedDatatypeNameValueExtractor.java       |  21 +-
 .../TupleCopyValueExtractor.java                |   4 +-
 .../LSMPrimaryUpsertOperatorNodePushable.java   |   5 +-
 .../ExternalRTreeLocalResourceMetadata.java     |  20 +-
 .../LSMInvertedIndexLocalResourceMetadata.java  |  46 +-
 .../resource/LSMRTreeLocalResourceMetadata.java |  20 +-
 .../meta/AlgebricksMetaOperatorDescriptor.java  |  22 +-
 .../hyracks/api/exceptions/ErrorCode.java       |  16 +
 .../src/main/resources/errormsg/en.properties   |  16 +
 .../am/rtree/AbstractRTreeOperatorTest.java     |   5 +-
 .../RTreeSecondaryIndexInsertOperatorTest.java  |   4 +-
 .../RTreeSecondaryIndexSearchOperatorTest.java  |   4 +-
 .../am/bloomfilter/impls/BloomFilter.java       |  15 +-
 .../storage/am/btree/api/IBTreeFrame.java       |   5 +-
 .../storage/am/btree/api/IBTreeLeafFrame.java   |   5 +-
 .../am/btree/exceptions/BTreeException.java     |  35 --
 .../exceptions/BTreeNotUpdateableException.java |  32 -
 .../frames/BTreeFieldPrefixNSMLeafFrame.java    | 129 ++--
 .../am/btree/frames/BTreeNSMInteriorFrame.java  |  49 +-
 .../am/btree/frames/BTreeNSMLeafFrame.java      |  73 +--
 .../hyracks/storage/am/btree/impls/BTree.java   | 238 ++++----
 .../btree/impls/BTreeCountingSearchCursor.java  |  23 +-
 .../am/btree/impls/BTreeRangeSearchCursor.java  |  10 +-
 .../storage/am/btree/impls/RangePredicate.java  |  24 +
 .../storage/am/btree/test/FramewriterTest.java  |  19 +-
 .../hyracks/storage/am/common/api/IIndex.java   |   2 +-
 .../storage/am/common/api/IIndexAccessor.java   |  10 +-
 .../storage/am/common/api/IIndexBulkLoader.java |   4 +-
 .../storage/am/common/api/IIndexCursor.java     |  46 +-
 .../storage/am/common/api/ITreeIndexFrame.java  |   2 +-
 .../am/common/api/ITwoPCIndexBulkLoader.java    |   2 +-
 .../storage/am/common/api/IndexException.java   |  32 -
 .../am/common/api/TreeIndexException.java       |  42 --
 .../am/common/api/UnsortedInputException.java   |  35 --
 .../IndexBulkLoadOperatorNodePushable.java      |   8 +-
 ...xInsertUpdateDeleteOperatorNodePushable.java |  19 +-
 .../TreeIndexDuplicateKeyException.java         |  34 --
 .../TreeIndexNonExistentKeyException.java       |  35 --
 .../am/common/impls/AbstractTreeIndex.java      |  30 +-
 .../am/lsm/btree/impls/ExternalBTree.java       | 100 ++--
 .../lsm/btree/impls/ExternalBTreeWithBuddy.java | 121 ++--
 .../storage/am/lsm/btree/impls/LSMBTree.java    |  67 +--
 .../am/lsm/btree/impls/LSMBTreeFileManager.java |   3 +-
 .../lsm/btree/impls/LSMBTreeFlushOperation.java |   3 +-
 .../lsm/btree/impls/LSMBTreeMergeOperation.java |   3 +-
 .../btree/impls/LSMBTreePointSearchCursor.java  |   5 +-
 .../btree/impls/LSMBTreeRangeSearchCursor.java  |   8 +-
 .../lsm/btree/impls/LSMBTreeSearchCursor.java   |  37 +-
 .../impls/LSMBTreeWithBuddyAbstractCursor.java  |   4 +-
 .../impls/LSMBTreeWithBuddyFileManager.java     |  22 +-
 .../impls/LSMBTreeWithBuddyMergeOperation.java  |   3 +-
 .../impls/LSMBTreeWithBuddySearchCursor.java    |  15 +-
 .../impls/LSMBTreeWithBuddySortedCursor.java    |  50 +-
 .../btree/impls/LSMBuddyBTreeMergeCursor.java   |  22 +-
 .../storage/am/lsm/common/api/ILSMHarness.java  |  17 +-
 .../am/lsm/common/api/ILSMIOOperation.java      |   3 +-
 .../storage/am/lsm/common/api/ILSMIndex.java    |  13 +-
 .../am/lsm/common/api/ILSMIndexAccessor.java    |  28 +-
 .../am/lsm/common/api/ILSMIndexFileManager.java |   3 +-
 .../am/lsm/common/api/ILSMMergePolicy.java      |   5 +-
 .../storage/am/lsm/common/api/ITwoPCIndex.java  |  13 +-
 .../impls/AbstractLSMIndexFileManager.java      |   8 +-
 .../lsm/common/impls/ConstantMergePolicy.java   |   8 +-
 .../lsm/common/impls/ExternalIndexHarness.java  |  35 +-
 .../storage/am/lsm/common/impls/LSMHarness.java |  36 +-
 .../lsm/common/impls/LSMIndexSearchCursor.java  |  15 +-
 .../lsm/common/impls/LSMTreeIndexAccessor.java  |  41 +-
 .../am/lsm/common/impls/NoMergePolicy.java      |   4 +-
 .../am/lsm/common/impls/PrefixMergePolicy.java  |  10 +-
 .../lsm/invertedindex/api/IInvertedIndex.java   |   3 +-
 .../api/IInvertedIndexAccessor.java             |   6 +-
 .../api/IInvertedIndexSearcher.java             |   5 +-
 .../invertedindex/api/IInvertedListCursor.java  |   9 +-
 .../api/IPartitionedInvertedIndex.java          |   5 +-
 .../LSMInvertedIndexDataflowHelper.java         |  35 +-
 ...rtitionedLSMInvertedIndexDataflowHelper.java |  34 +-
 .../exceptions/InvertedIndexException.java      |  34 --
 .../OccurrenceThresholdPanicException.java      |  30 -
 .../invertedindex/impls/LSMInvertedIndex.java   | 114 ++--
 .../impls/LSMInvertedIndexAccessor.java         |  42 +-
 ...nvertedIndexDeletedKeysBTreeMergeCursor.java |   9 +-
 .../impls/LSMInvertedIndexFileManager.java      |  18 +-
 .../impls/LSMInvertedIndexFlushOperation.java   |   3 +-
 .../impls/LSMInvertedIndexMergeOperation.java   |   3 +-
 .../LSMInvertedIndexRangeSearchCursor.java      |  11 +-
 .../impls/LSMInvertedIndexSearchCursor.java     |  22 +-
 .../impls/PartitionedLSMInvertedIndex.java      |  25 +-
 .../inmemory/InMemoryInvertedIndex.java         |  30 +-
 .../inmemory/InMemoryInvertedIndexAccessor.java |  16 +-
 .../inmemory/InMemoryInvertedListCursor.java    |  28 +-
 .../PartitionedInMemoryInvertedIndex.java       |   7 +-
 .../ondisk/OnDiskInvertedIndex.java             |  50 +-
 .../OnDiskInvertedIndexRangeSearchCursor.java   |  19 +-
 .../ondisk/PartitionedOnDiskInvertedIndex.java  |   5 +-
 .../search/AbstractTOccurrenceSearcher.java     |  15 +-
 .../search/InvertedListMerger.java              |  37 +-
 .../search/PartitionedTOccurrenceSearcher.java  |  10 +-
 .../search/TOccurrenceSearcher.java             |  10 +-
 .../invertedindex/util/InvertedIndexUtils.java  |  26 +-
 .../dataflow/ExternalRTreeDataflowHelper.java   |  16 +-
 .../rtree/dataflow/LSMRTreeDataflowHelper.java  |  18 +-
 ...RTreeWithAntiMatterTuplesDataflowHelper.java |  17 +-
 .../am/lsm/rtree/impls/AbstractLSMRTree.java    |  26 +-
 .../am/lsm/rtree/impls/ExternalRTree.java       |  98 +--
 .../storage/am/lsm/rtree/impls/LSMRTree.java    |  75 +--
 .../LSMRTreeDeletedKeysBTreeMergeCursor.java    |   8 +-
 .../am/lsm/rtree/impls/LSMRTreeFileManager.java |  21 +-
 .../lsm/rtree/impls/LSMRTreeFlushOperation.java |   3 +-
 .../lsm/rtree/impls/LSMRTreeMergeOperation.java |   3 +-
 .../lsm/rtree/impls/LSMRTreeSearchCursor.java   |   9 +-
 .../lsm/rtree/impls/LSMRTreeSortedCursor.java   |  43 +-
 .../impls/LSMRTreeWithAntiMatterTuples.java     |  55 +-
 ...SMRTreeWithAntiMatterTuplesSearchCursor.java |  43 +-
 .../am/lsm/rtree/utils/LSMRTreeUtils.java       | 115 ++--
 .../am/rtree/api/IRTreeInteriorFrame.java       |   3 +-
 .../am/rtree/frames/RTreeNSMInteriorFrame.java  |  36 +-
 .../hyracks/storage/am/rtree/impls/RTree.java   | 187 +++---
 .../am/btree/OrderedIndexExamplesTest.java      | 120 ++--
 .../am/btree/OrderedIndexMultiThreadTest.java   |  17 +-
 .../storage/am/btree/OrderedIndexTestUtils.java |  49 +-
 .../am/common/AbstractIndexTestWorker.java      |   7 +-
 .../storage/am/common/ITreeIndexTestWorker.java |   4 +-
 .../am/common/IndexMultiThreadTestDriver.java   |   5 +-
 .../storage/am/common/TreeIndexTestUtils.java   |  36 +-
 .../am/rtree/AbstractRTreeExamplesTest.java     | 113 ++--
 .../am/rtree/AbstractRTreeMultiThreadTest.java  |  42 +-
 .../storage/am/rtree/RTreeTestUtils.java        |  28 +-
 .../storage/am/btree/BTreeSearchCursorTest.java | 115 ++--
 .../storage/am/btree/BTreeStatsTest.java        |  38 +-
 .../storage/am/btree/BTreeUpdateSearchTest.java |  28 +-
 .../storage/am/btree/FieldPrefixNSMTest.java    |  12 +-
 .../am/btree/multithread/BTreeTestWorker.java   |  33 +-
 .../am/lsm/btree/LSMBTreeExamplesTest.java      |  26 +-
 .../multithread/LSMBTreeMultiThreadTest.java    |  43 +-
 .../btree/multithread/LSMBTreeTestWorker.java   |  30 +-
 .../am/lsm/btree/perf/BTreeBulkLoadRunner.java  |   3 +-
 .../storage/am/lsm/btree/perf/BTreeRunner.java  |   9 +-
 .../am/lsm/btree/perf/InMemoryBTreeRunner.java  |  10 +-
 .../am/lsm/btree/perf/LSMTreeRunner.java        |  18 +-
 .../am/lsm/common/DummyLSMIndexFileManager.java |   3 +-
 .../am/lsm/common/LSMIndexFileManagerTest.java  |  33 +-
 .../LSMInvertedIndexMergeTest.java              |   8 +-
 .../PartitionedLSMInvertedIndexMergeTest.java   |  10 +-
 .../common/AbstractInvertedIndexDeleteTest.java |  38 +-
 .../common/AbstractInvertedIndexLoadTest.java   |  30 +-
 .../common/AbstractInvertedIndexSearchTest.java |  38 +-
 .../common/AbstractInvertedIndexTest.java       |   7 +-
 .../LSMInvertedIndexMultiThreadTest.java        |  49 +-
 .../multithread/LSMInvertedIndexTestWorker.java |  15 +-
 .../util/LSMInvertedIndexTestContext.java       |  70 ++-
 .../util/LSMInvertedIndexTestUtils.java         |  96 +--
 .../lsm/rtree/AbstractLSMRTreeExamplesTest.java |  35 +-
 .../am/lsm/rtree/LSMRTreeExamplesTest.java      |  19 +-
 ...SMRTreeWithAntiMatterTuplesExamplesTest.java |   8 +-
 .../multithread/AbstractLSMRTreeTestWorker.java |   3 +-
 .../multithread/LSMRTreeMultiThreadTest.java    |  24 +-
 .../rtree/multithread/LSMRTreeTestWorker.java   |   5 +-
 ...TreeWithAntiMatterTuplesMultiThreadTest.java |  14 +-
 .../LSMRTreeWithAntiMatterTuplesTestWorker.java |   7 +-
 .../storage/am/rtree/RTreeExamplesTest.java     |   3 +-
 .../storage/am/rtree/RTreeSearchCursorTest.java |  27 +-
 .../rtree/multithread/RTreeMultiThreadTest.java |   7 +-
 .../am/rtree/multithread/RTreeTestWorker.java   |   3 +-
 .../common/BufferCacheRegressionTest.java       |  16 +-
 189 files changed, 2540 insertions(+), 3133 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b3319a9/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
index b962ce8..d2379c5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -1650,7 +1650,7 @@
     <test-case FilePath="dml">
       <compilation-unit name="insert-duplicated-keys-from-query">
         <output-dir compare="Text">insert-duplicated-keys-from-query</output-dir>
-        <expected-error>Failed to insert key since key already exists</expected-error>
+        <expected-error>Inserting duplicate keys into the primary storage</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">
@@ -1833,7 +1833,7 @@
     <test-case FilePath="dml">
       <compilation-unit name="insert-duplicated-keys">
         <output-dir compare="Text">insert-duplicated-keys</output-dir>
-        <expected-error>org.apache.hyracks.storage.am.common.exceptions.TreeIndexDuplicateKeyException:
Failed to insert key since key already exists</expected-error>
+        <expected-error>Inserting duplicate keys into the primary storage</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">
@@ -6742,7 +6742,7 @@
     <test-case FilePath="load">
       <compilation-unit name="duplicate-key-error">
         <output-dir compare="Text">none</output-dir>
-        <expected-error>Input stream given to BTree bulk load has duplicates</expected-error>
+        <expected-error>Loading duplicate keys into the primary storage</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="load">

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b3319a9/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index 3c075e4..6f8b094 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -1719,7 +1719,7 @@
     <test-case FilePath="dml">
       <compilation-unit name="insert-duplicated-keys">
         <output-dir compare="Text">insert-duplicated-keys</output-dir>
-        <expected-error>Failed to insert key since key already exists</expected-error>
+        <expected-error>Inserting duplicate keys into the primary storage</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">
@@ -7785,7 +7785,7 @@
     <test-case FilePath="load">
       <compilation-unit name="duplicate-key-error">
         <output-dir compare="Text">none</output-dir>
-        <expected-error>Input stream given to BTree bulk load has duplicates</expected-error>
+        <expected-error>Loading duplicate keys into the primary storage</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="load">

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b3319a9/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/CorrelatedPrefixMergePolicy.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/CorrelatedPrefixMergePolicy.java
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/CorrelatedPrefixMergePolicy.java
index e16ce78..17da26a 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/CorrelatedPrefixMergePolicy.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/CorrelatedPrefixMergePolicy.java
@@ -28,11 +28,10 @@ import java.util.Set;
 import org.apache.asterix.common.api.IDatasetLifecycleManager;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.storage.am.common.api.IResourceLifecycleManager;
-import org.apache.hyracks.storage.am.common.api.IndexException;
 import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallback;
-import org.apache.hyracks.storage.am.lsm.common.api.ILSMDiskComponent;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent.ComponentState;
+import org.apache.hyracks.storage.am.lsm.common.api.ILSMDiskComponent;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMIndex;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMIndexAccessor;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicy;
@@ -51,8 +50,7 @@ public class CorrelatedPrefixMergePolicy implements ILSMMergePolicy {
     }
 
     @Override
-    public void diskComponentAdded(final ILSMIndex index, boolean fullMergeIsRequested)
-            throws HyracksDataException, IndexException {
+    public void diskComponentAdded(final ILSMIndex index, boolean fullMergeIsRequested) throws
HyracksDataException {
         // This merge policy will only look at primary indexes in order to evaluate if a
merge operation is needed. If it decides that
         // a merge operation is needed, then it will merge *all* the indexes that belong
to the dataset. The criteria to decide if a merge
         // is needed is the same as the one that is used in the prefix merge policy:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b3319a9/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java
index a3f277a..cdb40d8 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/ExternalFileIndexAccessor.java
@@ -43,7 +43,6 @@ import org.apache.hyracks.storage.am.btree.impls.RangePredicate;
 import org.apache.hyracks.storage.am.btree.util.BTreeUtils;
 import org.apache.hyracks.storage.am.common.api.IIndexCursor;
 import org.apache.hyracks.storage.am.common.api.ISearchOperationCallback;
-import org.apache.hyracks.storage.am.common.api.IndexException;
 import org.apache.hyracks.storage.am.common.ophelpers.MultiComparator;
 import org.apache.hyracks.storage.am.lsm.btree.dataflow.ExternalBTreeDataflowHelper;
 import org.apache.hyracks.storage.am.lsm.btree.impls.ExternalBTree;
@@ -97,7 +96,7 @@ public class ExternalFileIndexAccessor {
         fileIndexSearchCursor = fileIndexAccessor.createSearchCursor(false);
     }
 
-    public void lookup(int fileId, ExternalFile file) throws HyracksDataException, IndexException
{
+    public void lookup(int fileId, ExternalFile file) throws HyracksDataException {
         // Set search parameters
         currentFileNumber.setValue(fileId);
         searchKeyTupleBuilder.reset();
@@ -130,8 +129,9 @@ public class ExternalFileIndexAccessor {
                         .getStringValue());
         file.setSize(((AInt64) externalFileRecord.getValueByPos(FilesIndexDescription.EXTERNAL_FILE_SIZE_FIELD_INDEX))
                 .getLongValue());
-        file.setLastModefiedTime(new Date(((ADateTime) externalFileRecord
-                .getValueByPos(FilesIndexDescription.EXTERNAL_FILE_MOD_DATE_FIELD_INDEX)).getChrononTime()));
+        file.setLastModefiedTime(new Date(
+                ((ADateTime) externalFileRecord.getValueByPos(FilesIndexDescription.EXTERNAL_FILE_MOD_DATE_FIELD_INDEX))
+                        .getChrononTime()));
     }
 
     public void close() throws HyracksDataException {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b3319a9/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalDatasetIndexesCommitOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalDatasetIndexesCommitOperatorDescriptor.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalDatasetIndexesCommitOperatorDescriptor.java
index 2ddb646..1559469 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalDatasetIndexesCommitOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalDatasetIndexesCommitOperatorDescriptor.java
@@ -26,7 +26,6 @@ import org.apache.hyracks.api.io.FileReference;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
 import org.apache.hyracks.storage.am.common.api.IIndex;
 import org.apache.hyracks.storage.am.common.api.IIndexDataflowHelper;
-import org.apache.hyracks.storage.am.common.api.IndexException;
 import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
 import org.apache.hyracks.storage.am.common.util.IndexFileNameUtil;
 import org.apache.hyracks.storage.am.lsm.common.api.ITwoPCIndex;
@@ -41,28 +40,23 @@ public class ExternalDatasetIndexesCommitOperatorDescriptor extends AbstractExte
             IIndexDataflowHelperFactory filesIndexDataflowHelperFactory, IndexInfoOperatorDescriptor
fileIndexesInfo,
             List<IIndexDataflowHelperFactory> indexesDataflowHelperFactories,
             List<IndexInfoOperatorDescriptor> indexesInfos) {
-        super(spec, filesIndexDataflowHelperFactory, fileIndexesInfo, indexesDataflowHelperFactories,
-                indexesInfos);
+        super(spec, filesIndexDataflowHelperFactory, fileIndexesInfo, indexesDataflowHelperFactories,
indexesInfos);
     }
 
     @Override
     protected void performOpOnIndex(IIndexDataflowHelperFactory indexDataflowHelperFactory,
IHyracksTaskContext ctx,
-            IndexInfoOperatorDescriptor fileIndexInfo, int partition) {
-        try {
-            FileReference resourecePath =
-                    IndexFileNameUtil.getIndexAbsoluteFileRef(fileIndexInfo, partition, ctx.getIOManager());
-            LOGGER.warn("performing the operation on " + resourecePath.getFile().getAbsolutePath());
-            // Get DataflowHelper
-            IIndexDataflowHelper indexHelper =
-                    indexDataflowHelperFactory.createIndexDataflowHelper(fileIndexInfo, ctx,
partition);
-            // Get index
-            IIndex index = indexHelper.getIndexInstance();
-            // commit transaction
-            ((ITwoPCIndex) index).commitTransaction();
-            LOGGER.warn("operation on " + resourecePath.getFile().getAbsolutePath() + " Succeded");
-        } catch (HyracksDataException | IndexException e) {
-            throw new IllegalStateException(e);
-        }
+            IndexInfoOperatorDescriptor fileIndexInfo, int partition) throws HyracksDataException
{
+        FileReference resourecePath =
+                IndexFileNameUtil.getIndexAbsoluteFileRef(fileIndexInfo, partition, ctx.getIOManager());
+        LOGGER.warn("performing the operation on " + resourecePath.getFile().getAbsolutePath());
+        // Get DataflowHelper
+        IIndexDataflowHelper indexHelper =
+                indexDataflowHelperFactory.createIndexDataflowHelper(fileIndexInfo, ctx,
partition);
+        // Get index
+        IIndex index = indexHelper.getIndexInstance();
+        // commit transaction
+        ((ITwoPCIndex) index).commitTransaction();
+        LOGGER.warn("operation on " + resourecePath.getFile().getAbsolutePath() + " Succeded");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b3319a9/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java
index 2bb986d..556fb51 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalFilesIndexOperatorDescriptor.java
@@ -18,7 +18,6 @@
  */
 package org.apache.asterix.external.operators;
 
-import java.io.IOException;
 import java.util.List;
 
 import org.apache.asterix.external.indexing.ExternalFile;
@@ -39,7 +38,6 @@ import org.apache.hyracks.storage.am.common.api.IIndexBulkLoader;
 import org.apache.hyracks.storage.am.common.api.IIndexDataflowHelper;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
 import org.apache.hyracks.storage.am.common.api.IMetadataPageManagerFactory;
-import org.apache.hyracks.storage.am.common.api.IndexException;
 import org.apache.hyracks.storage.am.common.dataflow.AbstractTreeIndexOperatorDescriptor;
 import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
 import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallbackFactory;
@@ -61,9 +59,9 @@ public class ExternalFilesIndexOperatorDescriptor extends AbstractTreeIndexOpera
     private boolean createNewIndex;
     private List<ExternalFile> files;
 
-    public ExternalFilesIndexOperatorDescriptor(IOperatorDescriptorRegistry spec,
-            IStorageManager storageManager, IIndexLifecycleManagerProvider lifecycleManagerProvider,
-            IFileSplitProvider fileSplitProvider, IIndexDataflowHelperFactory dataflowHelperFactory,
+    public ExternalFilesIndexOperatorDescriptor(IOperatorDescriptorRegistry spec, IStorageManager
storageManager,
+            IIndexLifecycleManagerProvider lifecycleManagerProvider, IFileSplitProvider fileSplitProvider,
+            IIndexDataflowHelperFactory dataflowHelperFactory,
             ILocalResourceFactoryProvider localResourceFactoryProvider, List<ExternalFile>
files,
             boolean createNewIndex, IMetadataPageManagerFactory metadataPageManagerFactory)
{
         super(spec, 0, 0, null, storageManager, lifecycleManagerProvider, fileSplitProvider,
@@ -79,8 +77,8 @@ public class ExternalFilesIndexOperatorDescriptor extends AbstractTreeIndexOpera
     @Override
     public IOperatorNodePushable createPushRuntime(IHyracksTaskContext ctx,
             IRecordDescriptorProvider recordDescProvider, int partition, int nPartitions)
throws HyracksDataException {
-        final IIndexDataflowHelper indexHelper = getIndexDataflowHelperFactory().createIndexDataflowHelper(this,
ctx,
-                partition);
+        final IIndexDataflowHelper indexHelper =
+                getIndexDataflowHelperFactory().createIndexDataflowHelper(this, ctx, partition);
         return new AbstractOperatorNodePushable() {
 
             @SuppressWarnings("incomplete-switch")
@@ -95,15 +93,13 @@ public class ExternalFilesIndexOperatorDescriptor extends AbstractTreeIndexOpera
                     try {
                         IIndex index = indexHelper.getIndexInstance();
                         // Create bulk loader
-                        IIndexBulkLoader bulkLoader = index.createBulkLoader(BTree.DEFAULT_FILL_FACTOR,
false,
-                                files.size(), false);
+                        IIndexBulkLoader bulkLoader =
+                                index.createBulkLoader(BTree.DEFAULT_FILL_FACTOR, false,
files.size(), false);
                         // Load files
                         for (ExternalFile file : files) {
                             bulkLoader.add(filesTupleTranslator.getTupleFromFile(file));
                         }
                         bulkLoader.end();
-                    } catch (IndexException | IOException e) {
-                        throw new HyracksDataException(e);
                     } finally {
                         indexHelper.close();
                     }
@@ -114,8 +110,8 @@ public class ExternalFilesIndexOperatorDescriptor extends AbstractTreeIndexOpera
                     IIndex index = indexHelper.getIndexInstance();
                     LSMTwoPCBTreeBulkLoader bulkLoader = null;
                     try {
-                        bulkLoader = (LSMTwoPCBTreeBulkLoader) ((ExternalBTree) index).createTransactionBulkLoader(
-                                BTree.DEFAULT_FILL_FACTOR, false, files.size(), false);
+                        bulkLoader = (LSMTwoPCBTreeBulkLoader) ((ExternalBTree) index)
+                                .createTransactionBulkLoader(BTree.DEFAULT_FILL_FACTOR, false,
files.size(), false);
                         // Load files
                         // The files must be ordered according to their numbers
                         for (ExternalFile file : files) {
@@ -130,11 +126,11 @@ public class ExternalFilesIndexOperatorDescriptor extends AbstractTreeIndexOpera
                             }
                         }
                         bulkLoader.end();
-                    } catch (IndexException | IOException e) {
+                    } catch (Exception e) {
                         if (bulkLoader != null) {
                             bulkLoader.abort();
                         }
-                        throw new HyracksDataException(e);
+                        throw HyracksDataException.create(e);
                     } finally {
                         indexHelper.close();
                     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3b3319a9/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorNodePushable.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorNodePushable.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorNodePushable.java
index c95a4a7..d3bd2bb 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorNodePushable.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalIndexBulkModifyOperatorNodePushable.java
@@ -30,7 +30,6 @@ import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleReference;
 import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor;
 import org.apache.hyracks.storage.am.common.api.ITwoPCIndexBulkLoader;
-import org.apache.hyracks.storage.am.common.api.IndexException;
 import org.apache.hyracks.storage.am.common.dataflow.IndexBulkLoadOperatorNodePushable;
 import org.apache.hyracks.storage.am.lsm.common.api.ITwoPCIndex;
 
@@ -38,8 +37,8 @@ public class ExternalIndexBulkModifyOperatorNodePushable extends IndexBulkLoadOp
 
     private final FilesIndexDescription filesIndexDescription = new FilesIndexDescription();
     private final int[] deletedFiles;
-    private ArrayTupleBuilder buddyBTreeTupleBuilder = new ArrayTupleBuilder(
-            filesIndexDescription.FILE_BUDDY_BTREE_RECORD_DESCRIPTOR.getFieldCount());
+    private ArrayTupleBuilder buddyBTreeTupleBuilder =
+            new ArrayTupleBuilder(filesIndexDescription.FILE_BUDDY_BTREE_RECORD_DESCRIPTOR.getFieldCount());
     private AMutableInt32 fileNumber = new AMutableInt32(0);
     private ArrayTupleReference deleteTuple = new ArrayTupleReference();
 
@@ -81,11 +80,7 @@ public class ExternalIndexBulkModifyOperatorNodePushable extends IndexBulkLoadOp
         int tupleCount = accessor.getTupleCount();
         for (int i = 0; i < tupleCount; i++) {
             tuple.reset(accessor, i);
-            try {
-                bulkLoader.add(tuple);
-            } catch (IndexException e) {
-                throw new HyracksDataException(e);
-            }
+            bulkLoader.add(tuple);
         }
     }
 


Mime
View raw message