asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject incubator-asterixdb git commit: Remove Test Classes From Production Binaries
Date Thu, 02 Jun 2016 19:03:17 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master 58b518cb5 -> 88485b436


Remove Test Classes From Production Binaries

Change-Id: I1da72566e7d140a1fb965c893dcea6881b99ca26
Reviewed-on: https://asterix-gerrit.ics.uci.edu/901
Reviewed-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>


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

Branch: refs/heads/master
Commit: 88485b436ee328a2ab8d3ed210cf1a87e5d58296
Parents: 58b518c
Author: Michael Blow <mblow@apache.org>
Authored: Thu Jun 2 14:21:29 2016 -0400
Committer: Michael Blow <michael.blow@couchbase.com>
Committed: Thu Jun 2 12:02:55 2016 -0700

----------------------------------------------------------------------
 asterixdb/asterix-app/pom.xml                   |   7 +
 .../change-feed-with-meta-pk-in-meta.1.ddl.aql  |   2 +-
 .../feeds/change-feed/change-feed.1.ddl.aql     |   4 +-
 .../asterix/test/base/AsterixTestHelper.java    |  80 --------
 .../asterix/test/base/AsterixTestHelper.java    |  80 ++++++++
 .../reader/RecordWithPKTestReaderFactory.java   |  55 ------
 .../record/reader/TestAsterixMembersReader.java |  93 ----------
 .../input/record/reader/kv/KVTestReader.java    | 184 -------------------
 .../record/reader/kv/KVTestReaderFactory.java   |  80 --------
 .../external/parser/TestRecordWithPKParser.java |  49 -----
 .../factory/TestRecordWithPKParserFactory.java  |  77 --------
 .../provider/DatasourceFactoryProvider.java     |  14 +-
 .../provider/ParserFactoryProvider.java         |  16 +-
 .../external/util/ExternalDataConstants.java    |   2 -
 .../reader/RecordWithPKTestReaderFactory.java   |  55 ++++++
 .../record/reader/TestAsterixMembersReader.java |  93 ++++++++++
 .../input/record/reader/kv/KVTestReader.java    | 184 +++++++++++++++++++
 .../record/reader/kv/KVTestReaderFactory.java   |  80 ++++++++
 .../external/parser/TestRecordWithPKParser.java |  49 +++++
 .../factory/TestRecordWithPKParserFactory.java  |  77 ++++++++
 .../dataset-with-meta-record.2.ddl.aql          |   2 +-
 asterixdb/asterix-tools/pom.xml                 |   7 +
 .../locking/TestRuntimeContextProvider.java     | 102 ----------
 .../locking/TestRuntimeContextProvider.java     | 102 ++++++++++
 24 files changed, 755 insertions(+), 739 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-app/pom.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/pom.xml b/asterixdb/asterix-app/pom.xml
index 3b5025b..9b71a7b 100644
--- a/asterixdb/asterix-app/pom.xml
+++ b/asterixdb/asterix-app/pom.xml
@@ -229,6 +229,13 @@
     </dependency>
     <dependency>
       <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-external-data</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
       <artifactId>asterix-transactions</artifactId>
       <version>${project.version}</version>
       <scope>compile</scope>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql
index d3317e4..31d6ea8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql
@@ -47,7 +47,7 @@ create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."ke
 create feed KVChangeStream using adapter(
     ("type-name"="DocumentType"),
     ("meta-type-name"="KVMetaType"),
-    ("reader"="kv_test"),
+    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
     ("parser"="record-with-metadata"),
     ("format"="dcp"),
     ("record-format"="json"),

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql
index 2dad901..e78327a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql
@@ -37,7 +37,7 @@ create feed ChangeFeed using test_change_feed(
     ("format"="test-csv"),
     ("delimiter"=","),
     ("key-indexes"="0"),
-    ("reader"="test-record-with-pk"),
-    ("parser"="test-record-with-pk"),
+    ("reader"="org.apache.asterix.external.input.record.reader.RecordWithPKTestReaderFactory"),
+    ("parser"="org.apache.asterix.external.parser.factory.TestRecordWithPKParserFactory"),
     ("change-feed"="true")
 );
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-common/src/main/java/org/apache/asterix/test/base/AsterixTestHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/test/base/AsterixTestHelper.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/test/base/AsterixTestHelper.java
deleted file mode 100644
index e7e7b61..0000000
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/test/base/AsterixTestHelper.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.test.base;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-
-public class AsterixTestHelper {
-
-    public static String extToResExt(String fname, String resultExt) {
-        int dot = fname.lastIndexOf('.');
-        return fname.substring(0, dot + 1) + resultExt;
-    }
-
-    public static ArrayList<String> readFile(String fileName, String basePath) {
-        ArrayList<String> list = new ArrayList<String>();
-        BufferedReader result;
-        try {
-            result = new BufferedReader(new FileReader(basePath + fileName));
-            while (true) {
-                String line = result.readLine();
-                if (line == null) {
-                    break;
-                }
-                if (line.length() == 0) {
-                    continue;
-                } else {
-                    list.add(line);
-                }
-            }
-            result.close();
-        } catch (FileNotFoundException e) {
-        } catch (IOException e) {
-        }
-        return list;
-    }
-
-    public static void readFileToString(File file, StringBuilder buf) throws Exception {
-        BufferedReader result = new BufferedReader(new FileReader(file));
-        while (true) {
-            String s = result.readLine();
-            if (s == null) {
-                break;
-            } else {
-                buf.append(s);
-                buf.append('\n');
-            }
-        }
-        result.close();
-    }
-
-    public static void deleteRec(File path) {
-        if (path.isDirectory()) {
-            for (File f : path.listFiles()) {
-                deleteRec(f);
-            }
-        }
-        path.delete();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/base/AsterixTestHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/base/AsterixTestHelper.java b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/base/AsterixTestHelper.java
new file mode 100644
index 0000000..e7e7b61
--- /dev/null
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/base/AsterixTestHelper.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.test.base;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+
+public class AsterixTestHelper {
+
+    public static String extToResExt(String fname, String resultExt) {
+        int dot = fname.lastIndexOf('.');
+        return fname.substring(0, dot + 1) + resultExt;
+    }
+
+    public static ArrayList<String> readFile(String fileName, String basePath) {
+        ArrayList<String> list = new ArrayList<String>();
+        BufferedReader result;
+        try {
+            result = new BufferedReader(new FileReader(basePath + fileName));
+            while (true) {
+                String line = result.readLine();
+                if (line == null) {
+                    break;
+                }
+                if (line.length() == 0) {
+                    continue;
+                } else {
+                    list.add(line);
+                }
+            }
+            result.close();
+        } catch (FileNotFoundException e) {
+        } catch (IOException e) {
+        }
+        return list;
+    }
+
+    public static void readFileToString(File file, StringBuilder buf) throws Exception {
+        BufferedReader result = new BufferedReader(new FileReader(file));
+        while (true) {
+            String s = result.readLine();
+            if (s == null) {
+                break;
+            } else {
+                buf.append(s);
+                buf.append('\n');
+            }
+        }
+        result.close();
+    }
+
+    public static void deleteRec(File path) {
+        if (path.isDirectory()) {
+            for (File f : path.listFiles()) {
+                deleteRec(f);
+            }
+        }
+        path.delete();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/RecordWithPKTestReaderFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/RecordWithPKTestReaderFactory.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/RecordWithPKTestReaderFactory.java
deleted file mode 100644
index 87c187a..0000000
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/RecordWithPKTestReaderFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.external.input.record.reader;
-
-import java.util.Map;
-
-import org.apache.asterix.external.api.IExternalDataSourceFactory;
-import org.apache.asterix.external.api.IRecordReader;
-import org.apache.asterix.external.api.IRecordReaderFactory;
-import org.apache.asterix.external.input.record.RecordWithPK;
-import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-
-public class RecordWithPKTestReaderFactory implements IRecordReaderFactory<RecordWithPK<char[]>> {
-
-    private static final long serialVersionUID = 1L;
-    private transient AlgebricksAbsolutePartitionConstraint clusterLocations;
-
-    @Override
-    public AlgebricksAbsolutePartitionConstraint getPartitionConstraint() {
-        clusterLocations = IExternalDataSourceFactory.getPartitionConstraints(clusterLocations, 1);
-        return clusterLocations;
-    }
-
-    @Override
-    public void configure(final Map<String, String> configuration) {
-    }
-
-    @Override
-    public IRecordReader<? extends RecordWithPK<char[]>> createRecordReader(final IHyracksTaskContext ctx,
-            final int partition) {
-        return new TestAsterixMembersReader();
-    }
-
-    @Override
-    public Class<?> getRecordClass() {
-        return RecordWithPK.class;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/TestAsterixMembersReader.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/TestAsterixMembersReader.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/TestAsterixMembersReader.java
deleted file mode 100644
index 665d50b..0000000
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/TestAsterixMembersReader.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.external.input.record.reader;
-
-import java.io.IOException;
-
-import org.apache.asterix.external.api.IRawRecord;
-import org.apache.asterix.external.api.IRecordReader;
-import org.apache.asterix.external.dataflow.AbstractFeedDataFlowController;
-import org.apache.asterix.external.input.record.CharArrayRecord;
-import org.apache.asterix.external.input.record.GenericRecord;
-import org.apache.asterix.external.input.record.RecordWithPK;
-import org.apache.asterix.external.util.FeedLogManager;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
-
-public class TestAsterixMembersReader implements IRecordReader<RecordWithPK<char[]>> {
-
-    private final CharArrayRecord rawRecord;
-    private final GenericRecord<RecordWithPK<char[]>> record;
-    private final ArrayBackedValueStorage[] pkFieldValueBuffers;
-    private int counter = 0;
-    private final int numOfRecords = 10;
-    private final StringBuilder builder = new StringBuilder();
-    private static final String[] names = { "Abdullah", "Michael", "Till", "Yingyi", "Ildar", "Taewoo", "Young-Seok",
-            "Murtadha", "Ian", "Steven" };
-
-    public TestAsterixMembersReader() {
-        rawRecord = new CharArrayRecord();
-        pkFieldValueBuffers = new ArrayBackedValueStorage[1];
-        pkFieldValueBuffers[0] = new ArrayBackedValueStorage();
-        record = new GenericRecord<RecordWithPK<char[]>>(new RecordWithPK<char[]>(rawRecord, pkFieldValueBuffers));
-    }
-
-    @Override
-    public void close() throws IOException {
-    }
-
-    @Override
-    public boolean hasNext() throws Exception {
-        return counter < numOfRecords;
-    }
-
-    @Override
-    public IRawRecord<RecordWithPK<char[]>> next() throws IOException, InterruptedException {
-        if (counter < numOfRecords) {
-            record.get().reset();
-            builder.setLength(0);
-            builder.append("{\"id\":" + counter + ",\"name\":\"" + names[counter % names.length] + "\"}");
-            rawRecord.set(builder);
-            rawRecord.endRecord();
-            pkFieldValueBuffers[0].getDataOutput().writeByte(ATypeTag.SERIALIZED_INT64_TYPE_TAG);
-            pkFieldValueBuffers[0].getDataOutput().writeLong(counter);
-            counter++;
-            return record;
-        }
-        return null;
-    }
-
-    @Override
-    public boolean stop() {
-        return false;
-    }
-
-    @Override
-    public void setController(final AbstractFeedDataFlowController controller) {
-    }
-
-    @Override
-    public void setFeedLogManager(final FeedLogManager feedLogManager) {
-    }
-
-    @Override
-    public boolean handleException(Throwable th) {
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/kv/KVTestReader.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/kv/KVTestReader.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/kv/KVTestReader.java
deleted file mode 100644
index f7fe77f..0000000
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/kv/KVTestReader.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.external.input.record.reader.kv;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-
-import org.apache.asterix.external.api.IRawRecord;
-import org.apache.asterix.external.api.IRecordReader;
-import org.apache.asterix.external.dataflow.AbstractFeedDataFlowController;
-import org.apache.asterix.external.input.record.GenericRecord;
-import org.apache.asterix.external.util.ExternalDataConstants;
-import org.apache.asterix.external.util.FeedLogManager;
-import org.apache.log4j.Logger;
-
-import com.couchbase.client.core.message.dcp.DCPRequest;
-import com.couchbase.client.core.message.dcp.MutationMessage;
-import com.couchbase.client.core.message.dcp.RemoveMessage;
-import com.couchbase.client.deps.io.netty.buffer.ByteBuf;
-import com.couchbase.client.deps.io.netty.buffer.ByteBufAllocator;
-
-public class KVTestReader implements IRecordReader<DCPRequest> {
-
-    private final GenericRecord<DCPRequest> record;
-    private static final Logger LOGGER = Logger.getLogger(KVTestReader.class);
-    // Test variables
-    private final String bucket;
-    private final ArrayList<Short> assigned;
-    private final int numberOfMutations;
-    private int counter = 0;
-    private int upsertCounter = 0;
-    private boolean stopped = false;
-    // for deterministic data generation
-    private int expiration = 7999;
-    private long seq = 16L;
-    private int lockTime = 158;
-    private long cas = 0L;
-    private int deleteCycle;
-    private int upsertCycle;
-    private String nextDeleteKey;
-    private short nextDeletePartition;
-    private String nextUpsertKey;
-    private short nextUpsertPartition;
-    private final ByteBuf byteBuff;
-    private final StringBuilder strBuilder = new StringBuilder();
-    private final String[] names = { "Michael Carey", "Till Westmann", "Michael Blow", "Chris Hillary", "Yingyi Bu",
-            "Ian Maxon", "Abdullah Alamoudi" };
-
-    public KVTestReader(final int partition, final String bucket, final int[] schedule, final int numberOfMutations,
-            final int deleteCycle, final int upsertCycle, int counterStart) {
-        this.bucket = bucket;
-        this.numberOfMutations = numberOfMutations + counterStart;
-        this.assigned = new ArrayList<>();
-        this.deleteCycle = deleteCycle;
-        this.upsertCycle = upsertCycle;
-        if ((deleteCycle < 5) || (upsertCycle < 5)) {
-            this.deleteCycle = 5;
-            this.upsertCycle = 6;
-        }
-        for (int i = 0; i < schedule.length; i++) {
-            if (schedule[i] == partition) {
-                assigned.add((short) i);
-            }
-        }
-        this.byteBuff = ByteBufAllocator.DEFAULT.buffer(ExternalDataConstants.DEFAULT_BUFFER_SIZE);
-        this.record = new GenericRecord<DCPRequest>();
-        this.counter = counterStart;
-    }
-
-    private String generateKey() {
-        final short vbucket = assigned.get(counter % assigned.size());
-        final String next = vbucket + "-" + counter;
-        counter++;
-        if ((counter % deleteCycle) == 0) {
-            nextDeleteKey = next;
-            nextDeletePartition = vbucket;
-        }
-        if ((counter % upsertCycle) == 3) {
-            nextUpsertKey = next;
-            nextUpsertPartition = vbucket;
-        }
-        return next;
-    }
-
-    @Override
-    public void close() throws IOException {
-        stop();
-    }
-
-    @Override
-    public boolean hasNext() throws Exception {
-        return !stopped;
-    }
-
-    @Override
-    public IRawRecord<DCPRequest> next() throws IOException, InterruptedException {
-        if (stopped) {
-            return null;
-        }
-        try {
-            final DCPRequest dcpRequest = generateNextDCPMessage();
-            record.set(dcpRequest);
-            if (counter >= numberOfMutations) {
-                stop();
-            }
-        } catch (final Throwable th) {
-            LOGGER.error(th.getMessage(), th);
-        }
-        return record;
-    }
-
-    private DCPRequest generateNextDCPMessage() {
-        if ((counter % deleteCycle) == (deleteCycle - 1)) {
-            if (nextDeleteKey != null) {
-                final String key = nextDeleteKey;
-                nextDeleteKey = null;
-                return new RemoveMessage(0, nextDeletePartition, key, cas++, seq++, 0L, bucket);
-            }
-        }
-        generateNextDocument();
-        if ((counter % upsertCycle) == (upsertCycle - 1)) {
-            if (nextUpsertKey != null) {
-                final String key = nextUpsertKey;
-                nextUpsertKey = null;
-                upsertCounter++;
-                return new MutationMessage(byteBuff.readableBytes(), nextUpsertPartition, key, byteBuff, expiration++,
-                        seq++, 0, 0, lockTime++, cas++, bucket);
-            }
-        }
-        return new MutationMessage(byteBuff.readableBytes(), assigned.get(counter % assigned.size()), generateKey(),
-                byteBuff, expiration++, seq++, 0, 0, lockTime++, cas++, bucket);
-    }
-
-    private void generateNextDocument() {
-        byteBuff.retain();
-        // reset the string
-        strBuilder.setLength(0);
-        strBuilder.append("{\"id\":" + (counter + upsertCounter) + ",\"name\":\""
-                + names[(counter + upsertCounter) % names.length] + "\",\"exp\":" + ((counter + upsertCounter) * 3)
-                + "}");
-        byteBuff.clear();
-        byteBuff.writeBytes(strBuilder.toString().getBytes(StandardCharsets.UTF_8));
-    }
-
-    @Override
-    public boolean stop() {
-        if (!stopped) {
-            stopped = true;
-            byteBuff.release();
-        }
-        return stopped;
-    }
-
-    @Override
-    public void setController(final AbstractFeedDataFlowController controller) {
-    }
-
-    @Override
-    public void setFeedLogManager(final FeedLogManager feedLogManager) {
-    }
-
-    @Override
-    public boolean handleException(Throwable th) {
-        return false;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/kv/KVTestReaderFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/kv/KVTestReaderFactory.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/kv/KVTestReaderFactory.java
deleted file mode 100644
index f5afef6..0000000
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/kv/KVTestReaderFactory.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.external.input.record.reader.kv;
-
-import java.util.Map;
-
-import org.apache.asterix.external.api.IRecordReader;
-import org.apache.asterix.external.api.IRecordReaderFactory;
-import org.apache.asterix.om.util.AsterixClusterProperties;
-import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-
-import com.couchbase.client.core.message.dcp.DCPRequest;
-
-public class KVTestReaderFactory implements IRecordReaderFactory<DCPRequest> {
-
-    private static final long serialVersionUID = 1L;
-    private final String bucket = "TestBucket";
-    private final int numOfVBuckets = 1024;
-    private final int[] schedule = new int[numOfVBuckets];
-    private int numOfRecords = 1000; // default = 1 Million
-    private int deleteCycle = 0;
-    private int upsertCycle = 0;
-    private int numOfReaders;
-    private transient AlgebricksAbsolutePartitionConstraint clusterLocations;
-
-    @Override
-    public AlgebricksAbsolutePartitionConstraint getPartitionConstraint() {
-        clusterLocations = AsterixClusterProperties.INSTANCE.getClusterLocations();
-        numOfReaders = clusterLocations.getLocations().length;
-        return clusterLocations;
-    }
-
-    @Override
-    public void configure(final Map<String, String> configuration) {
-        if (configuration.containsKey("num-of-records")) {
-            numOfRecords = Integer.parseInt(configuration.get("num-of-records"));
-        }
-        final int numOfReaders = getPartitionConstraint().getLocations().length;
-        for (int i = 0; i < numOfVBuckets; i++) {
-            schedule[i] = i % numOfReaders;
-        }
-
-        if (configuration.containsKey("delete-cycle")) {
-            deleteCycle = Integer.parseInt(configuration.get("delete-cycle"));
-        }
-
-        if (configuration.containsKey("upsert-cycle")) {
-            upsertCycle = Integer.parseInt(configuration.get("upsert-cycle"));
-        }
-    }
-
-    @Override
-    public IRecordReader<? extends DCPRequest> createRecordReader(final IHyracksTaskContext ctx, final int partition) {
-        return new KVTestReader(partition, bucket, schedule,
-                (int) Math.ceil((double) numOfRecords / (double) numOfReaders), deleteCycle, upsertCycle,
-                (numOfRecords / numOfReaders) * partition);
-    }
-
-    @Override
-    public Class<?> getRecordClass() {
-        return DCPRequest.class;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TestRecordWithPKParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TestRecordWithPKParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TestRecordWithPKParser.java
deleted file mode 100644
index 3d86abd..0000000
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TestRecordWithPKParser.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.external.parser;
-
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.asterix.external.api.IRawRecord;
-import org.apache.asterix.external.api.IRecordDataParser;
-import org.apache.asterix.external.api.IRecordWithPKDataParser;
-import org.apache.asterix.external.input.record.RecordWithPK;
-import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
-
-public class TestRecordWithPKParser<T> implements IRecordWithPKDataParser<RecordWithPK<T>> {
-
-    private final IRecordDataParser<T> recordParser;
-
-    public TestRecordWithPKParser(final IRecordDataParser<T> recordParser) {
-        this.recordParser = recordParser;
-    }
-
-    @Override
-    public void parse(final IRawRecord<? extends RecordWithPK<T>> record, final DataOutput out) throws IOException {
-        recordParser.parse(record.get().getRecord(), out);
-    }
-
-    @Override
-    public void appendKeys(final ArrayTupleBuilder tb, final IRawRecord<? extends RecordWithPK<T>> record)
-            throws IOException {
-        record.get().appendPk(tb);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/TestRecordWithPKParserFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/TestRecordWithPKParserFactory.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/TestRecordWithPKParserFactory.java
deleted file mode 100644
index dae8a8f..0000000
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/TestRecordWithPKParserFactory.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.external.parser.factory;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.external.api.IRecordDataParser;
-import org.apache.asterix.external.api.IRecordDataParserFactory;
-import org.apache.asterix.external.input.record.RecordWithPK;
-import org.apache.asterix.external.parser.TestRecordWithPKParser;
-import org.apache.asterix.external.provider.ParserFactoryProvider;
-import org.apache.asterix.external.util.ExternalDataConstants;
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-
-@SuppressWarnings({ "unchecked" })
-public class TestRecordWithPKParserFactory<T> implements IRecordDataParserFactory<RecordWithPK<T>> {
-
-    private static final long serialVersionUID = 1L;
-    private ARecordType recordType;
-    private IRecordDataParserFactory<char[]> recordParserFactory;
-    private String format;
-    @SuppressWarnings("unused")
-    private IAType[] pkTypes;
-    @SuppressWarnings("unused")
-    private int[][] pkIndexes;
-
-    @Override
-    public void configure(Map<String, String> configuration) throws AsterixException {
-        TreeMap<String, String> parserConf = new TreeMap<String, String>();
-        format = configuration.get(ExternalDataConstants.KEY_RECORD_FORMAT);
-        parserConf.put(ExternalDataConstants.KEY_FORMAT, format);
-        recordParserFactory = (IRecordDataParserFactory<char[]>) ParserFactoryProvider.getDataParserFactory(parserConf);
-        recordParserFactory.setRecordType(recordType);
-        recordParserFactory.configure(configuration);
-    }
-
-    @Override
-    public void setRecordType(ARecordType recordType) {
-        this.recordType = recordType;
-    }
-
-    @SuppressWarnings("rawtypes")
-    @Override
-    public IRecordDataParser<RecordWithPK<T>> createRecordParser(IHyracksTaskContext ctx) throws HyracksDataException {
-        return new TestRecordWithPKParser(recordParserFactory.createRecordParser(ctx));
-    }
-
-    @Override
-    public Class<?> getRecordClass() {
-        return RecordWithPK.class;
-    }
-
-    @Override
-    public void setMetaType(ARecordType metaType) {
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java
index f71e9a0..452ac6e 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java
@@ -26,8 +26,6 @@ import org.apache.asterix.external.api.IExternalDataSourceFactory.DataSourceType
 import org.apache.asterix.external.api.IInputStreamFactory;
 import org.apache.asterix.external.api.IRecordReaderFactory;
 import org.apache.asterix.external.input.HDFSDataSourceFactory;
-import org.apache.asterix.external.input.record.reader.RecordWithPKTestReaderFactory;
-import org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory;
 import org.apache.asterix.external.input.record.reader.rss.RSSRecordReaderFactory;
 import org.apache.asterix.external.input.record.reader.stream.StreamRecordReaderFactory;
 import org.apache.asterix.external.input.record.reader.twitter.TwitterRecordReaderFactory;
@@ -40,6 +38,9 @@ import org.apache.asterix.external.util.ExternalDataUtils;
 
 public class DatasourceFactoryProvider {
 
+    private DatasourceFactoryProvider() {
+    }
+
     public static IExternalDataSourceFactory getExternalDataSourceFactory(Map<String, String> configuration)
             throws AsterixException {
         if (ExternalDataUtils.getDataSourceType(configuration).equals(DataSourceType.RECORDS)) {
@@ -90,8 +91,6 @@ public class DatasourceFactoryProvider {
             return ExternalDataUtils.createExternalRecordReaderFactory(configuration);
         }
         switch (reader) {
-            case ExternalDataConstants.READER_KV_TEST:
-                return new KVTestReaderFactory();
             case ExternalDataConstants.READER_HDFS:
                 return new HDFSDataSourceFactory();
             case ExternalDataConstants.ALIAS_LOCALFS_ADAPTER:
@@ -101,8 +100,6 @@ public class DatasourceFactoryProvider {
             case ExternalDataConstants.READER_PUSH_TWITTER:
             case ExternalDataConstants.READER_PULL_TWITTER:
                 return new TwitterRecordReaderFactory();
-            case ExternalDataConstants.TEST_RECORD_WITH_PK:
-                return new RecordWithPKTestReaderFactory();
             case ExternalDataConstants.ALIAS_TWITTER_FIREHOSE_ADAPTER:
                 return new StreamRecordReaderFactory(new TwitterFirehoseStreamFactory());
             case ExternalDataConstants.ALIAS_SOCKET_ADAPTER:
@@ -115,8 +112,9 @@ public class DatasourceFactoryProvider {
             default:
                 try {
                     return (IRecordReaderFactory<?>) Class.forName(reader).newInstance();
-                } catch (Exception e) {
-                    throw new AsterixException("unknown record reader factory: " + reader, e);
+                } catch (IllegalAccessException | ClassNotFoundException | InstantiationException
+                        | ClassCastException e) {
+                    throw new AsterixException("Unknown record reader factory: " + reader, e);
                 }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/ParserFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/ParserFactoryProvider.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/ParserFactoryProvider.java
index 682fb89..2e1a5a7 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/ParserFactoryProvider.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/ParserFactoryProvider.java
@@ -29,14 +29,17 @@ import org.apache.asterix.external.parser.factory.DelimitedDataParserFactory;
 import org.apache.asterix.external.parser.factory.HiveDataParserFactory;
 import org.apache.asterix.external.parser.factory.RSSParserFactory;
 import org.apache.asterix.external.parser.factory.RecordWithMetadataParserFactory;
-import org.apache.asterix.external.parser.factory.TestRecordWithPKParserFactory;
 import org.apache.asterix.external.parser.factory.TweetParserFactory;
 import org.apache.asterix.external.util.ExternalDataConstants;
 import org.apache.asterix.external.util.ExternalDataUtils;
 
 public class ParserFactoryProvider {
+
+    private ParserFactoryProvider() {
+    }
+
     public static IDataParserFactory getDataParserFactory(Map<String, String> configuration) throws AsterixException {
-        IDataParserFactory parserFactory = null;
+        IDataParserFactory parserFactory;
         String parserFactoryName = configuration.get(ExternalDataConstants.KEY_DATA_PARSER);
         if ((parserFactoryName != null) && ExternalDataUtils.isExternal(parserFactoryName)) {
             return ExternalDataUtils.createExternalParserFactory(ExternalDataUtils.getDataverse(configuration),
@@ -67,10 +70,13 @@ public class ParserFactoryProvider {
                 return new RSSParserFactory();
             case ExternalDataConstants.FORMAT_RECORD_WITH_METADATA:
                 return new RecordWithMetadataParserFactory();
-            case ExternalDataConstants.TEST_RECORD_WITH_PK:
-                return new TestRecordWithPKParserFactory();
             default:
-                throw new AsterixException("Unknown format: " + parser);
+                try {
+                    return (IDataParserFactory) Class.forName(parser).newInstance();
+                } catch (IllegalAccessException | ClassNotFoundException | InstantiationException
+                        | ClassCastException e) {
+                    throw new AsterixException("Unknown format: " + parser, e);
+                }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
index 81f8377..c992723 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
@@ -221,10 +221,8 @@ public class ExternalDataConstants {
     public static final String KEY_STREAM_SOURCE = "stream-source";
     public static final String EXTERNAL = "external";
     public static final String KEY_READER_FACTORY = "reader-factory";
-    public static final String READER_KV_TEST = "kv_test";
     public static final String READER_RSS = "rss";
     public static final String FORMAT_CSV = "csv";
-    public static final String TEST_RECORD_WITH_PK = "test-record-with-pk";
 
     public static final String ERROR_PARSE_RECORD = "Parser failed to parse record";
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/RecordWithPKTestReaderFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/RecordWithPKTestReaderFactory.java b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/RecordWithPKTestReaderFactory.java
new file mode 100644
index 0000000..87c187a
--- /dev/null
+++ b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/RecordWithPKTestReaderFactory.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.external.input.record.reader;
+
+import java.util.Map;
+
+import org.apache.asterix.external.api.IExternalDataSourceFactory;
+import org.apache.asterix.external.api.IRecordReader;
+import org.apache.asterix.external.api.IRecordReaderFactory;
+import org.apache.asterix.external.input.record.RecordWithPK;
+import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+
+public class RecordWithPKTestReaderFactory implements IRecordReaderFactory<RecordWithPK<char[]>> {
+
+    private static final long serialVersionUID = 1L;
+    private transient AlgebricksAbsolutePartitionConstraint clusterLocations;
+
+    @Override
+    public AlgebricksAbsolutePartitionConstraint getPartitionConstraint() {
+        clusterLocations = IExternalDataSourceFactory.getPartitionConstraints(clusterLocations, 1);
+        return clusterLocations;
+    }
+
+    @Override
+    public void configure(final Map<String, String> configuration) {
+    }
+
+    @Override
+    public IRecordReader<? extends RecordWithPK<char[]>> createRecordReader(final IHyracksTaskContext ctx,
+            final int partition) {
+        return new TestAsterixMembersReader();
+    }
+
+    @Override
+    public Class<?> getRecordClass() {
+        return RecordWithPK.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/TestAsterixMembersReader.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/TestAsterixMembersReader.java b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/TestAsterixMembersReader.java
new file mode 100644
index 0000000..665d50b
--- /dev/null
+++ b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/TestAsterixMembersReader.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.external.input.record.reader;
+
+import java.io.IOException;
+
+import org.apache.asterix.external.api.IRawRecord;
+import org.apache.asterix.external.api.IRecordReader;
+import org.apache.asterix.external.dataflow.AbstractFeedDataFlowController;
+import org.apache.asterix.external.input.record.CharArrayRecord;
+import org.apache.asterix.external.input.record.GenericRecord;
+import org.apache.asterix.external.input.record.RecordWithPK;
+import org.apache.asterix.external.util.FeedLogManager;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
+
+public class TestAsterixMembersReader implements IRecordReader<RecordWithPK<char[]>> {
+
+    private final CharArrayRecord rawRecord;
+    private final GenericRecord<RecordWithPK<char[]>> record;
+    private final ArrayBackedValueStorage[] pkFieldValueBuffers;
+    private int counter = 0;
+    private final int numOfRecords = 10;
+    private final StringBuilder builder = new StringBuilder();
+    private static final String[] names = { "Abdullah", "Michael", "Till", "Yingyi", "Ildar", "Taewoo", "Young-Seok",
+            "Murtadha", "Ian", "Steven" };
+
+    public TestAsterixMembersReader() {
+        rawRecord = new CharArrayRecord();
+        pkFieldValueBuffers = new ArrayBackedValueStorage[1];
+        pkFieldValueBuffers[0] = new ArrayBackedValueStorage();
+        record = new GenericRecord<RecordWithPK<char[]>>(new RecordWithPK<char[]>(rawRecord, pkFieldValueBuffers));
+    }
+
+    @Override
+    public void close() throws IOException {
+    }
+
+    @Override
+    public boolean hasNext() throws Exception {
+        return counter < numOfRecords;
+    }
+
+    @Override
+    public IRawRecord<RecordWithPK<char[]>> next() throws IOException, InterruptedException {
+        if (counter < numOfRecords) {
+            record.get().reset();
+            builder.setLength(0);
+            builder.append("{\"id\":" + counter + ",\"name\":\"" + names[counter % names.length] + "\"}");
+            rawRecord.set(builder);
+            rawRecord.endRecord();
+            pkFieldValueBuffers[0].getDataOutput().writeByte(ATypeTag.SERIALIZED_INT64_TYPE_TAG);
+            pkFieldValueBuffers[0].getDataOutput().writeLong(counter);
+            counter++;
+            return record;
+        }
+        return null;
+    }
+
+    @Override
+    public boolean stop() {
+        return false;
+    }
+
+    @Override
+    public void setController(final AbstractFeedDataFlowController controller) {
+    }
+
+    @Override
+    public void setFeedLogManager(final FeedLogManager feedLogManager) {
+    }
+
+    @Override
+    public boolean handleException(Throwable th) {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/kv/KVTestReader.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/kv/KVTestReader.java b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/kv/KVTestReader.java
new file mode 100644
index 0000000..f7fe77f
--- /dev/null
+++ b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/kv/KVTestReader.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.external.input.record.reader.kv;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+
+import org.apache.asterix.external.api.IRawRecord;
+import org.apache.asterix.external.api.IRecordReader;
+import org.apache.asterix.external.dataflow.AbstractFeedDataFlowController;
+import org.apache.asterix.external.input.record.GenericRecord;
+import org.apache.asterix.external.util.ExternalDataConstants;
+import org.apache.asterix.external.util.FeedLogManager;
+import org.apache.log4j.Logger;
+
+import com.couchbase.client.core.message.dcp.DCPRequest;
+import com.couchbase.client.core.message.dcp.MutationMessage;
+import com.couchbase.client.core.message.dcp.RemoveMessage;
+import com.couchbase.client.deps.io.netty.buffer.ByteBuf;
+import com.couchbase.client.deps.io.netty.buffer.ByteBufAllocator;
+
+public class KVTestReader implements IRecordReader<DCPRequest> {
+
+    private final GenericRecord<DCPRequest> record;
+    private static final Logger LOGGER = Logger.getLogger(KVTestReader.class);
+    // Test variables
+    private final String bucket;
+    private final ArrayList<Short> assigned;
+    private final int numberOfMutations;
+    private int counter = 0;
+    private int upsertCounter = 0;
+    private boolean stopped = false;
+    // for deterministic data generation
+    private int expiration = 7999;
+    private long seq = 16L;
+    private int lockTime = 158;
+    private long cas = 0L;
+    private int deleteCycle;
+    private int upsertCycle;
+    private String nextDeleteKey;
+    private short nextDeletePartition;
+    private String nextUpsertKey;
+    private short nextUpsertPartition;
+    private final ByteBuf byteBuff;
+    private final StringBuilder strBuilder = new StringBuilder();
+    private final String[] names = { "Michael Carey", "Till Westmann", "Michael Blow", "Chris Hillary", "Yingyi Bu",
+            "Ian Maxon", "Abdullah Alamoudi" };
+
+    public KVTestReader(final int partition, final String bucket, final int[] schedule, final int numberOfMutations,
+            final int deleteCycle, final int upsertCycle, int counterStart) {
+        this.bucket = bucket;
+        this.numberOfMutations = numberOfMutations + counterStart;
+        this.assigned = new ArrayList<>();
+        this.deleteCycle = deleteCycle;
+        this.upsertCycle = upsertCycle;
+        if ((deleteCycle < 5) || (upsertCycle < 5)) {
+            this.deleteCycle = 5;
+            this.upsertCycle = 6;
+        }
+        for (int i = 0; i < schedule.length; i++) {
+            if (schedule[i] == partition) {
+                assigned.add((short) i);
+            }
+        }
+        this.byteBuff = ByteBufAllocator.DEFAULT.buffer(ExternalDataConstants.DEFAULT_BUFFER_SIZE);
+        this.record = new GenericRecord<DCPRequest>();
+        this.counter = counterStart;
+    }
+
+    private String generateKey() {
+        final short vbucket = assigned.get(counter % assigned.size());
+        final String next = vbucket + "-" + counter;
+        counter++;
+        if ((counter % deleteCycle) == 0) {
+            nextDeleteKey = next;
+            nextDeletePartition = vbucket;
+        }
+        if ((counter % upsertCycle) == 3) {
+            nextUpsertKey = next;
+            nextUpsertPartition = vbucket;
+        }
+        return next;
+    }
+
+    @Override
+    public void close() throws IOException {
+        stop();
+    }
+
+    @Override
+    public boolean hasNext() throws Exception {
+        return !stopped;
+    }
+
+    @Override
+    public IRawRecord<DCPRequest> next() throws IOException, InterruptedException {
+        if (stopped) {
+            return null;
+        }
+        try {
+            final DCPRequest dcpRequest = generateNextDCPMessage();
+            record.set(dcpRequest);
+            if (counter >= numberOfMutations) {
+                stop();
+            }
+        } catch (final Throwable th) {
+            LOGGER.error(th.getMessage(), th);
+        }
+        return record;
+    }
+
+    private DCPRequest generateNextDCPMessage() {
+        if ((counter % deleteCycle) == (deleteCycle - 1)) {
+            if (nextDeleteKey != null) {
+                final String key = nextDeleteKey;
+                nextDeleteKey = null;
+                return new RemoveMessage(0, nextDeletePartition, key, cas++, seq++, 0L, bucket);
+            }
+        }
+        generateNextDocument();
+        if ((counter % upsertCycle) == (upsertCycle - 1)) {
+            if (nextUpsertKey != null) {
+                final String key = nextUpsertKey;
+                nextUpsertKey = null;
+                upsertCounter++;
+                return new MutationMessage(byteBuff.readableBytes(), nextUpsertPartition, key, byteBuff, expiration++,
+                        seq++, 0, 0, lockTime++, cas++, bucket);
+            }
+        }
+        return new MutationMessage(byteBuff.readableBytes(), assigned.get(counter % assigned.size()), generateKey(),
+                byteBuff, expiration++, seq++, 0, 0, lockTime++, cas++, bucket);
+    }
+
+    private void generateNextDocument() {
+        byteBuff.retain();
+        // reset the string
+        strBuilder.setLength(0);
+        strBuilder.append("{\"id\":" + (counter + upsertCounter) + ",\"name\":\""
+                + names[(counter + upsertCounter) % names.length] + "\",\"exp\":" + ((counter + upsertCounter) * 3)
+                + "}");
+        byteBuff.clear();
+        byteBuff.writeBytes(strBuilder.toString().getBytes(StandardCharsets.UTF_8));
+    }
+
+    @Override
+    public boolean stop() {
+        if (!stopped) {
+            stopped = true;
+            byteBuff.release();
+        }
+        return stopped;
+    }
+
+    @Override
+    public void setController(final AbstractFeedDataFlowController controller) {
+    }
+
+    @Override
+    public void setFeedLogManager(final FeedLogManager feedLogManager) {
+    }
+
+    @Override
+    public boolean handleException(Throwable th) {
+        return false;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/kv/KVTestReaderFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/kv/KVTestReaderFactory.java b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/kv/KVTestReaderFactory.java
new file mode 100644
index 0000000..f5afef6
--- /dev/null
+++ b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/input/record/reader/kv/KVTestReaderFactory.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.external.input.record.reader.kv;
+
+import java.util.Map;
+
+import org.apache.asterix.external.api.IRecordReader;
+import org.apache.asterix.external.api.IRecordReaderFactory;
+import org.apache.asterix.om.util.AsterixClusterProperties;
+import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+
+import com.couchbase.client.core.message.dcp.DCPRequest;
+
+public class KVTestReaderFactory implements IRecordReaderFactory<DCPRequest> {
+
+    private static final long serialVersionUID = 1L;
+    private final String bucket = "TestBucket";
+    private final int numOfVBuckets = 1024;
+    private final int[] schedule = new int[numOfVBuckets];
+    private int numOfRecords = 1000; // default = 1 Million
+    private int deleteCycle = 0;
+    private int upsertCycle = 0;
+    private int numOfReaders;
+    private transient AlgebricksAbsolutePartitionConstraint clusterLocations;
+
+    @Override
+    public AlgebricksAbsolutePartitionConstraint getPartitionConstraint() {
+        clusterLocations = AsterixClusterProperties.INSTANCE.getClusterLocations();
+        numOfReaders = clusterLocations.getLocations().length;
+        return clusterLocations;
+    }
+
+    @Override
+    public void configure(final Map<String, String> configuration) {
+        if (configuration.containsKey("num-of-records")) {
+            numOfRecords = Integer.parseInt(configuration.get("num-of-records"));
+        }
+        final int numOfReaders = getPartitionConstraint().getLocations().length;
+        for (int i = 0; i < numOfVBuckets; i++) {
+            schedule[i] = i % numOfReaders;
+        }
+
+        if (configuration.containsKey("delete-cycle")) {
+            deleteCycle = Integer.parseInt(configuration.get("delete-cycle"));
+        }
+
+        if (configuration.containsKey("upsert-cycle")) {
+            upsertCycle = Integer.parseInt(configuration.get("upsert-cycle"));
+        }
+    }
+
+    @Override
+    public IRecordReader<? extends DCPRequest> createRecordReader(final IHyracksTaskContext ctx, final int partition) {
+        return new KVTestReader(partition, bucket, schedule,
+                (int) Math.ceil((double) numOfRecords / (double) numOfReaders), deleteCycle, upsertCycle,
+                (numOfRecords / numOfReaders) * partition);
+    }
+
+    @Override
+    public Class<?> getRecordClass() {
+        return DCPRequest.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/parser/TestRecordWithPKParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/parser/TestRecordWithPKParser.java b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/parser/TestRecordWithPKParser.java
new file mode 100644
index 0000000..3d86abd
--- /dev/null
+++ b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/parser/TestRecordWithPKParser.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.external.parser;
+
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.asterix.external.api.IRawRecord;
+import org.apache.asterix.external.api.IRecordDataParser;
+import org.apache.asterix.external.api.IRecordWithPKDataParser;
+import org.apache.asterix.external.input.record.RecordWithPK;
+import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
+
+public class TestRecordWithPKParser<T> implements IRecordWithPKDataParser<RecordWithPK<T>> {
+
+    private final IRecordDataParser<T> recordParser;
+
+    public TestRecordWithPKParser(final IRecordDataParser<T> recordParser) {
+        this.recordParser = recordParser;
+    }
+
+    @Override
+    public void parse(final IRawRecord<? extends RecordWithPK<T>> record, final DataOutput out) throws IOException {
+        recordParser.parse(record.get().getRecord(), out);
+    }
+
+    @Override
+    public void appendKeys(final ArrayTupleBuilder tb, final IRawRecord<? extends RecordWithPK<T>> record)
+            throws IOException {
+        record.get().appendPk(tb);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/parser/factory/TestRecordWithPKParserFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/parser/factory/TestRecordWithPKParserFactory.java b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/parser/factory/TestRecordWithPKParserFactory.java
new file mode 100644
index 0000000..dae8a8f
--- /dev/null
+++ b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/parser/factory/TestRecordWithPKParserFactory.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.external.parser.factory;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.external.api.IRecordDataParser;
+import org.apache.asterix.external.api.IRecordDataParserFactory;
+import org.apache.asterix.external.input.record.RecordWithPK;
+import org.apache.asterix.external.parser.TestRecordWithPKParser;
+import org.apache.asterix.external.provider.ParserFactoryProvider;
+import org.apache.asterix.external.util.ExternalDataConstants;
+import org.apache.asterix.om.types.ARecordType;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+@SuppressWarnings({ "unchecked" })
+public class TestRecordWithPKParserFactory<T> implements IRecordDataParserFactory<RecordWithPK<T>> {
+
+    private static final long serialVersionUID = 1L;
+    private ARecordType recordType;
+    private IRecordDataParserFactory<char[]> recordParserFactory;
+    private String format;
+    @SuppressWarnings("unused")
+    private IAType[] pkTypes;
+    @SuppressWarnings("unused")
+    private int[][] pkIndexes;
+
+    @Override
+    public void configure(Map<String, String> configuration) throws AsterixException {
+        TreeMap<String, String> parserConf = new TreeMap<String, String>();
+        format = configuration.get(ExternalDataConstants.KEY_RECORD_FORMAT);
+        parserConf.put(ExternalDataConstants.KEY_FORMAT, format);
+        recordParserFactory = (IRecordDataParserFactory<char[]>) ParserFactoryProvider.getDataParserFactory(parserConf);
+        recordParserFactory.setRecordType(recordType);
+        recordParserFactory.configure(configuration);
+    }
+
+    @Override
+    public void setRecordType(ARecordType recordType) {
+        this.recordType = recordType;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    public IRecordDataParser<RecordWithPK<T>> createRecordParser(IHyracksTaskContext ctx) throws HyracksDataException {
+        return new TestRecordWithPKParser(recordParserFactory.createRecordParser(ctx));
+    }
+
+    @Override
+    public Class<?> getRecordClass() {
+        return RecordWithPK.class;
+    }
+
+    @Override
+    public void setMetaType(ARecordType metaType) {
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-installer/src/test/resources/transactionts/queries/query_after_restart/dataset-with-meta-record/dataset-with-meta-record.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/test/resources/transactionts/queries/query_after_restart/dataset-with-meta-record/dataset-with-meta-record.2.ddl.aql b/asterixdb/asterix-installer/src/test/resources/transactionts/queries/query_after_restart/dataset-with-meta-record/dataset-with-meta-record.2.ddl.aql
index d3317e4..31d6ea8 100644
--- a/asterixdb/asterix-installer/src/test/resources/transactionts/queries/query_after_restart/dataset-with-meta-record/dataset-with-meta-record.2.ddl.aql
+++ b/asterixdb/asterix-installer/src/test/resources/transactionts/queries/query_after_restart/dataset-with-meta-record/dataset-with-meta-record.2.ddl.aql
@@ -47,7 +47,7 @@ create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."ke
 create feed KVChangeStream using adapter(
     ("type-name"="DocumentType"),
     ("meta-type-name"="KVMetaType"),
-    ("reader"="kv_test"),
+    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
     ("parser"="record-with-metadata"),
     ("format"="dcp"),
     ("record-format"="json"),

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-tools/pom.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-tools/pom.xml b/asterixdb/asterix-tools/pom.xml
index fb1f1d9..cb32004 100644
--- a/asterixdb/asterix-tools/pom.xml
+++ b/asterixdb/asterix-tools/pom.xml
@@ -108,6 +108,13 @@
     </dependency>
     <dependency>
       <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-common</artifactId>
+      <version>0.8.9-SNAPSHOT</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
       <artifactId>asterix-metadata</artifactId>
       <version>0.8.9-SNAPSHOT</version>
       <scope>compile</scope>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java
deleted file mode 100644
index 3a4a56a..0000000
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.transaction.management.service.locking;
-
-import java.util.concurrent.Executors;
-
-import org.apache.asterix.common.api.AsterixThreadExecutor;
-import org.apache.asterix.common.api.IAsterixAppRuntimeContext;
-import org.apache.asterix.common.api.IDatasetLifecycleManager;
-import org.apache.asterix.common.transactions.IAsterixAppRuntimeContextProvider;
-import org.apache.asterix.common.transactions.ITransactionSubsystem;
-import org.apache.hyracks.api.io.IIOManager;
-import org.apache.hyracks.storage.am.lsm.common.api.ILSMIOOperationScheduler;
-import org.apache.hyracks.storage.am.lsm.common.api.ILSMOperationTracker;
-import org.apache.hyracks.storage.common.buffercache.IBufferCache;
-import org.apache.hyracks.storage.common.file.IFileMapProvider;
-import org.apache.hyracks.storage.common.file.ILocalResourceRepository;
-import org.apache.hyracks.storage.common.file.ResourceIdFactory;
-
-import static org.mockito.Mockito.mock;
-
-class TestRuntimeContextProvider implements IAsterixAppRuntimeContextProvider {
-
-    AsterixThreadExecutor ate = new AsterixThreadExecutor(Executors.defaultThreadFactory());
-    IDatasetLifecycleManager dlcm = mock(IDatasetLifecycleManager.class);
-
-    @Override
-    public AsterixThreadExecutor getThreadExecutor() {
-        return ate;
-    }
-
-    @Override
-    public IBufferCache getBufferCache() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public IFileMapProvider getFileMapManager() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public ITransactionSubsystem getTransactionSubsystem() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public IDatasetLifecycleManager getDatasetLifecycleManager() {
-        return dlcm;
-    }
-
-    @Override
-    public double getBloomFilterFalsePositiveRate() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public ILSMOperationTracker getLSMBTreeOperationTracker(int datasetID) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public ILSMIOOperationScheduler getLSMIOScheduler() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public ILocalResourceRepository getLocalResourceRepository() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public ResourceIdFactory getResourceIdFactory() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public IIOManager getIOManager() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public IAsterixAppRuntimeContext getAppContext() {
-        throw new UnsupportedOperationException();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/88485b43/asterixdb/asterix-transactions/src/test/java/org/apache/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-transactions/src/test/java/org/apache/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java b/asterixdb/asterix-transactions/src/test/java/org/apache/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java
new file mode 100644
index 0000000..3a4a56a
--- /dev/null
+++ b/asterixdb/asterix-transactions/src/test/java/org/apache/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.transaction.management.service.locking;
+
+import java.util.concurrent.Executors;
+
+import org.apache.asterix.common.api.AsterixThreadExecutor;
+import org.apache.asterix.common.api.IAsterixAppRuntimeContext;
+import org.apache.asterix.common.api.IDatasetLifecycleManager;
+import org.apache.asterix.common.transactions.IAsterixAppRuntimeContextProvider;
+import org.apache.asterix.common.transactions.ITransactionSubsystem;
+import org.apache.hyracks.api.io.IIOManager;
+import org.apache.hyracks.storage.am.lsm.common.api.ILSMIOOperationScheduler;
+import org.apache.hyracks.storage.am.lsm.common.api.ILSMOperationTracker;
+import org.apache.hyracks.storage.common.buffercache.IBufferCache;
+import org.apache.hyracks.storage.common.file.IFileMapProvider;
+import org.apache.hyracks.storage.common.file.ILocalResourceRepository;
+import org.apache.hyracks.storage.common.file.ResourceIdFactory;
+
+import static org.mockito.Mockito.mock;
+
+class TestRuntimeContextProvider implements IAsterixAppRuntimeContextProvider {
+
+    AsterixThreadExecutor ate = new AsterixThreadExecutor(Executors.defaultThreadFactory());
+    IDatasetLifecycleManager dlcm = mock(IDatasetLifecycleManager.class);
+
+    @Override
+    public AsterixThreadExecutor getThreadExecutor() {
+        return ate;
+    }
+
+    @Override
+    public IBufferCache getBufferCache() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public IFileMapProvider getFileMapManager() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public ITransactionSubsystem getTransactionSubsystem() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public IDatasetLifecycleManager getDatasetLifecycleManager() {
+        return dlcm;
+    }
+
+    @Override
+    public double getBloomFilterFalsePositiveRate() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public ILSMOperationTracker getLSMBTreeOperationTracker(int datasetID) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public ILSMIOOperationScheduler getLSMIOScheduler() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public ILocalResourceRepository getLocalResourceRepository() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public ResourceIdFactory getResourceIdFactory() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public IIOManager getIOManager() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public IAsterixAppRuntimeContext getAppContext() {
+        throw new UnsupportedOperationException();
+    }
+}


Mime
View raw message