http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf 
b/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
new file mode 100644
index 0000000..776a89a
--- /dev/null
+++ b/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
@@ -0,0 +1,51 @@
+; 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.
+
+[nc/asterix_nc1]
+txn.log.dir=../asterix-server/target/tmp/asterix_nc1/txnlog
+core.dump.dir=../asterix-server/target/tmp/asterix_nc1/coredump
+iodevices=../asterix-server/target/tmp/asterix_nc1/iodevice1,../asterix-server/target/tmp/asterix_nc1/iodevice2
+#jvm.args=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006
+replication.listen.port=2001
+nc.api.port=19004
+
+[nc/asterix_nc2]
+ncservice.port=9091
+txn.log.dir=../asterix-server/target/tmp/asterix_nc2/txnlog
+core.dump.dir=../asterix-server/target/tmp/asterix_nc2/coredump
+iodevices=../asterix-server/target/tmp/asterix_nc2/iodevice1,../asterix-server/target/tmp/asterix_nc2/iodevice2
+#jvm.args=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5007
+replication.listen.port=2002
+nc.api.port=19005
+
+[nc]
+address=127.0.0.1
+command=asterixnc
+app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
+jvm.args=-Xmx4096m 
-Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
+storage.subdir=test_storage
+storage.memorycomponent.globalbudget = 1073741824
+
+[cc]
+address = 127.0.0.1
+app.class=org.apache.asterix.hyracks.bootstrap.CCApplication
+heartbeat.period=2000
+
+[common]
+log.level = INFO
+replication.enabled=true
+replication.factor=2

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/ReplicationIT/ncservice1.conf
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/ReplicationIT/ncservice1.conf 
b/asterixdb/asterix-server/src/test/resources/ReplicationIT/ncservice1.conf
new file mode 100644
index 0000000..ba10142
--- /dev/null
+++ b/asterixdb/asterix-server/src/test/resources/ReplicationIT/ncservice1.conf
@@ -0,0 +1,20 @@
+; 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.
+
+[ncservice]
+logdir=../asterix-server/target/failsafe-reports
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/ReplicationIT/ncservice2.conf
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/ReplicationIT/ncservice2.conf 
b/asterixdb/asterix-server/src/test/resources/ReplicationIT/ncservice2.conf
new file mode 100644
index 0000000..2036584
--- /dev/null
+++ b/asterixdb/asterix-server/src/test/resources/ReplicationIT/ncservice2.conf
@@ -0,0 +1,21 @@
+; 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.
+
+[ncservice]
+logdir=../asterix-server/target/failsafe-reports
+port=9091
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/asterix-configuration.xml
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/asterix-configuration.xml
 
b/asterixdb/asterix-server/src/test/resources/integrationts/asterix-configuration.xml
new file mode 100644
index 0000000..9583485
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/asterix-configuration.xml
@@ -0,0 +1,261 @@
+<!--
+ ! 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.
+ !-->
+<asterixConfiguration xmlns="asterixconf">
+
+  <property>
+    <name>nc.java.opts</name>
+    <value>-Xmx4096m 
-Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"</value>
+    <description>JVM parameters for each Node Contoller (NC)</description>
+  </property>
+
+  <property>
+    <name>cc.java.opts</name>
+    <value>-Xmx1024m 
-Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"</value>
+    <description>JVM parameters for each Cluster Contoller (CC)
+    </description>
+  </property>
+
+  <property>
+    <name>max.wait.active.cluster</name>
+    <value>60</value>
+    <description>Maximum wait (in seconds) for a cluster to be ACTIVE (all 
nodes are available)
+      before a submitted query/statement can be executed. (Default = 60 
seconds)
+    </description>
+  </property>
+
+  <property>
+    <name>storage.buffercache.pagesize</name>
+    <value>128KB</value>
+    <description>The page size in bytes for pages in the buffer cache.
+      (Default = "131072" // 128KB)
+    </description>
+  </property>
+
+  <property>
+    <name>storage.buffercache.size</name>
+    <value>512MB</value>
+    <description>The size of memory allocated to the disk buffer cache.
+      The value should be a multiple of the buffer cache page size(Default
+      = "536870912" // 512MB)
+    </description>
+  </property>
+
+  <property>
+    <name>storage.buffercache.maxopenfiles</name>
+    <value>214748364</value>
+    <description>The maximum number of open files in the buffer cache.
+      (Default = "214748364")
+    </description>
+  </property>
+
+  <property>
+    <name>storage.memorycomponent.pagesize</name>
+    <value>128KB</value>
+    <description>The page size in bytes for pages allocated to memory
+      components. (Default = "131072" // 128KB)
+    </description>
+  </property>
+
+  <property>
+    <name>storage.memorycomponent.numpages</name>
+    <value>256</value>
+    <description>The number of pages to allocate for a memory component.
+      This budget is shared by all the memory components of the primary
+      index and all its secondary indexes across all I/O devices on a node.
+      Note: in-memory components usually has fill factor of 75% since
+      the pages are 75% full and the remaining 25% is un-utilized. (Default = 
256)
+    </description>
+  </property>
+
+  <property>
+    <name>storage.metadata.memorycomponent.numpages</name>
+    <value>64</value>
+    <description>The number of pages to allocate for a memory component.
+      (Default = 64)
+    </description>
+  </property>
+
+  <property>
+    <name>storage.memorycomponent.numcomponents</name>
+    <value>2</value>
+    <description>The number of memory components to be used per lsm index.
+      (Default = 2)
+    </description>
+  </property>
+
+  <property>
+    <name>storage.memorycomponent.globalbudget</name>
+    <value>1GB</value>
+    <description>The total size of memory in bytes that the sum of all open 
memory
+      components cannot exceed. Consider this as the buffer cache for all 
memory
+      components of all indexes in a node. When this budget is fully used, a 
victim
+      dataset will be chosen. The chosen dataset must be evicted and closed to 
make
+      a space for another dataset. (Default = 512MB)
+    </description>
+  </property>
+
+  <property>
+    <name>storage.lsm.bloomfilter.falsepositiverate</name>
+    <value>0.01</value>
+    <description>The maximum acceptable false positive rate for bloom
+      filters associated with LSM indexes. (Default = "0.01" // 1%)
+    </description>
+  </property>
+
+  <property>
+    <name>txn.log.buffer.numpages</name>
+    <value>8</value>
+    <description>The number of in-memory log buffer pages. (Default = "8")
+    </description>
+  </property>
+
+  <property>
+    <name>txn.log.buffer.pagesize</name>
+    <value>512KB</value>
+    <description>The size of pages in the in-memory log buffer. (Default =
+      "524288" // 512KB)
+    </description>
+  </property>
+
+  <property>
+    <name>txn.log.partitionsize</name>
+    <value>2GB</value>
+    <description>The maximum size of a log file partition allowed before
+      rotating the log to the next partition. (Default = "2147483648" //
+      2GB)
+    </description>
+  </property>
+
+  <property>
+    <name>txn.log.checkpoint.lsnthreshold</name>
+    <value>67108864</value>
+    <description>The size of the window that the maximum LSN is allowed to
+      be ahead of the checkpoint LSN by. (Default = ""67108864" // 64M)
+    </description>
+  </property>
+
+  <property>
+    <name>txn.log.checkpoint.pollfrequency</name>
+    <value>120</value>
+    <description>The time in seconds between that the checkpoint thread
+      waits between polls. (Default = "120" // 120s)
+    </description>
+  </property>
+
+  <property>
+    <name>txn.log.checkpoint.history</name>
+    <value>0</value>
+    <description>The number of old log partition files to keep before
+      discarding. (Default = "0")
+    </description>
+  </property>
+
+  <property>
+    <name>txn.lock.escalationthreshold</name>
+    <value>1000</value>
+    <description>The number of entity level locks that need to be acquired
+      before the locks are coalesced and escalated into a dataset level
+      lock. (Default = "1000")
+    </description>
+  </property>
+
+  <property>
+    <name>txn.lock.shrinktimer</name>
+    <value>5000</value>
+    <description>The time in milliseconds to wait before deallocating
+      unused lock manager memory. (Default = "5000" // 5s)
+    </description>
+  </property>
+
+  <property>
+    <name>txn.lock.timeout.waitthreshold</name>
+    <value>60000</value>
+    <description>The time in milliseconds to wait before labeling a
+      transaction which has been waiting for a lock timed-out. (Default =
+      "60000" // 60s)
+    </description>
+  </property>
+
+  <property>
+    <name>txn.lock.timeout.sweepthreshold</name>
+    <value>10000</value>
+    <description>The time in milliseconds the timeout thread waits between
+      sweeps to detect timed-out transactions. (Default = "10000" // 10s)
+    </description>
+  </property>
+
+  <property>
+    <name>compiler.sortmemory</name>
+    <value>32MB</value>
+    <description>The amount of memory in bytes given to sort operations.
+      (Default = "33554432" // 32MB)
+    </description>
+  </property>
+
+  <property>
+    <name>compiler.joinmemory</name>
+    <value>32MB</value>
+    <description>The amount of memory in bytes given to join operations.
+      (Default = "33554432" // 32MB)
+    </description>
+  </property>
+
+  <property>
+    <name>compiler.groupmemory</name>
+    <value>32MB</value>
+    <description>The amount of memory in bytes given to group-by operations.
+      (Default = "33554432" // 32MB)
+    </description>
+  </property>
+
+  <property>
+    <name>compiler.framesize</name>
+    <value>128KB</value>
+    <description>The Hyracks frame size that the compiler configures per
+      job. (Default = "131072" // 128KB)
+    </description>
+  </property>
+
+  <property>
+    <name>compiler.pregelix.home</name>
+    <value>~/pregelix</value>
+  </property>
+
+  <property>
+    <name>web.port</name>
+    <value>19001</value>
+    <description>The port for the ASTERIX web interface. (Default = 19001)
+    </description>
+  </property>
+
+  <property>
+    <name>api.port</name>
+    <value>19002</value>
+    <description>The port for the ASTERIX API server. (Default = 19002)
+    </description>
+  </property>
+
+  <property>
+    <name>log.level</name>
+    <value>INFO</value>
+    <description>The minimum log level to be displayed. (Default = INFO)
+    </description>
+  </property>
+
+</asterixConfiguration>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.1.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.1.ddl.aql
new file mode 100644
index 0000000..f188629
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.1.ddl.aql
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a feed dataset that uses the feed simulator adapter.
+                  The feed simulator simulates feed from a file in the local 
fs.
+                  Associate with the feed an external user-defined function. 
The UDF 
+                  finds topics in each tweet. A topic is identified by a #. 
+                  Begin ingestion and apply external user defined function
+ * Expected Res : Success
+ * Date         : 23rd Apr 2013
+ */
+use dataverse externallibtest;
+
+create type TestTypedAdapterOutputType as closed {
+  tweetid: int64,
+  message-text: string
+}
+
+create dataset TweetsTestAdapter(TestTypedAdapterOutputType)
+primary key tweetid;
+
+create feed TestTypedAdapterFeed
+using "testlib#test_typed_adapter" (
+("num_output_records"="5"),
+("type-name"="TestTypedAdapterOutputType"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.2.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.2.update.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.2.update.aql
new file mode 100644
index 0000000..40aec53
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.2.update.aql
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a feed dataset that uses the feed simulator adapter.
+                  The feed simulator simulates feed from a file in the local 
fs.
+                  Associate with the feed an external user-defined function. 
The UDF 
+                  finds topics in each tweet. A topic is identified by a #. 
+                  Begin ingestion and apply external user defined function
+ * Expected Res : Success
+ * Date         : 23rd Apr 2013
+ */
+use dataverse externallibtest;
+
+set wait-for-completion-feed "true";
+
+connect feed TestTypedAdapterFeed to dataset TweetsTestAdapter;
+
+start feed TestTypedAdapterFeed;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.3.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.3.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.3.query.aql
new file mode 100644
index 0000000..3df9d2b
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-adapters/typed_adapter/typed_adapter.3.query.aql
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a feed dataset that uses the feed simulator adapter.
+                  The feed simulator simulates feed from a file in the local 
fs.
+                  Associate with the feed an external user-defined function. 
The UDF 
+                  finds topics in each tweet. A topic is identified by a #. 
+                  Begin ingestion and apply external user defined function
+ * Expected Res : Success
+ * Date         : 23rd Apr 2013
+ */
+use dataverse externallibtest;
+
+for $x in dataset TweetsTestAdapter
+order by $x.tweetid
+return $x

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.1.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.1.ddl.aql
new file mode 100644
index 0000000..5f3d322
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.1.ddl.aql
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a feed dataset that uses the feed simulator adapter.
+                  The feed simulator simulates feed from a file in the local 
fs.
+                  Associate with the feed an external user-defined function. 
The UDF
+                  finds topics in each tweet. A topic is identified by a #.
+                  Begin ingestion and apply external user defined function
+ * Expected Res : Success
+ * Date         : 23rd Apr 2013
+ */
+use dataverse externallibtest;
+
+create type TweetInputType as closed {
+  id: string,
+  username : string,
+  location : string,
+  text : string,
+  timestamp : string
+}
+
+create type TweetOutputType as closed {
+  id: string,
+  username : string,
+  location : string,
+  text : string,
+  timestamp : string,
+  topics : {{string}}
+}
+
+create feed TweetFeed
+using localfs
+(("type-name"="TweetInputType"),
+("path"="asterix_nc1://../../../../../../asterix-app/data/twitter/obamatweets.adm"),
+("format"="adm"));
+
+create dataset TweetsFeedIngest(TweetOutputType)
+primary key id;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.2.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.2.update.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.2.update.aql
new file mode 100644
index 0000000..9642992
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.2.update.aql
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a feed dataset that uses the feed simulator adapter.
+                  The feed simulator simulates feed from a file in the local 
fs.
+                  Associate with the feed an external user-defined function. 
The UDF
+                  finds topics in each tweet. A topic is identified by a #.
+                  Begin ingestion and apply external user defined function
+ * Expected Res : Success
+ * Date         : 23rd Apr 2013
+ */
+use dataverse externallibtest;
+
+set wait-for-completion-feed "true";
+
+connect feed TweetFeed to dataset TweetsFeedIngest
+apply function testlib#parseTweet;
+
+start feed TweetFeed;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.3.sleep.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.3.sleep.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.3.sleep.aql
new file mode 100644
index 0000000..18bbbbc
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.3.sleep.aql
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a socket feed with a client that pushes
+ * 10 records. The feed is connected to a dataset that is then
+ * queried for the data.
+ * Expected Res : Success
+ * Date         : 24th Feb 2016
+ */
+10000
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.4.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.4.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.4.query.aql
new file mode 100644
index 0000000..8879fa8
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-feeds/feed_ingest/feed_ingest.4.query.aql
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a feed dataset that uses the feed simulator adapter.
+                  The feed simulator simulates feed from a file in the local 
fs.
+                  Associate with the feed an external user-defined function. 
The UDF
+                  finds topics in each tweet. A topic is identified by a #.
+                  Begin ingestion and apply external user defined function
+ * Expected Res : Success
+ * Date         : 23rd Apr 2013
+ */
+use dataverse externallibtest;
+
+for $x in dataset TweetsFeedIngest
+order by $x.id
+return $x

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/getCapital/getCapital.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/getCapital/getCapital.1.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/getCapital/getCapital.1.ddl.aql
new file mode 100644
index 0000000..db88912
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/getCapital/getCapital.1.ddl.aql
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+use dataverse externallibtest;
+
+create type CountryCapitalType if not exists as closed {
+country: string,
+capital: string
+};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/getCapital/getCapital.2.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/getCapital/getCapital.2.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/getCapital/getCapital.2.query.aql
new file mode 100644
index 0000000..863da20
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/getCapital/getCapital.2.query.aql
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+use dataverse externallibtest;
+
+let $input:=["England","Italy","China","United States","India","Jupiter"]
+for $country in $input
+return testlib#getCapital($country)

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.1.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.1.ddl.aql
new file mode 100644
index 0000000..ab247b4
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.1.ddl.aql
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+use dataverse externallibtest;
+
+create type TextType if not exists as closed {
+id: int32,
+text: string
+};
+
+create dataset Check(TextType)
+primary key id;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.2.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.2.update.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.2.update.aql
new file mode 100644
index 0000000..eaf3f09
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.2.update.aql
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+use dataverse externallibtest;
+
+insert into dataset Check (
+{"id": 1, "text":"university of california, irvine"}
+);
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.3.update.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.3.update.aql
new file mode 100644
index 0000000..df0d2e2
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.3.update.aql
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+use dataverse externallibtest;
+
+insert into dataset Check (
+  for $x in dataset Check
+  let $y:=testlib#toUpper($x)
+  return $y
+);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.4.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.4.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.4.query.aql
new file mode 100644
index 0000000..a1ced1e
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/insert-from-select/insert-from-select.4.query.aql
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+use dataverse externallibtest;
+
+for $x in  dataset Check 
+where $x.id < 0
+order by $x.id
+return $x

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/mysum/mysum.1.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/mysum/mysum.1.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/mysum/mysum.1.query.aql
new file mode 100644
index 0000000..616df0d
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/mysum/mysum.1.query.aql
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+use dataverse externallibtest;
+
+let $x:=testlib#mysum(3,4)
+return $x

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/toUpper/toUpper.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/toUpper/toUpper.1.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/toUpper/toUpper.1.ddl.aql
new file mode 100644
index 0000000..c6ccb43
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/toUpper/toUpper.1.ddl.aql
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+use dataverse externallibtest;
+
+create type TextType if not exists as closed {
+id: int32,
+text: string
+};
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/toUpper/toUpper.2.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/toUpper/toUpper.2.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/toUpper/toUpper.2.query.aql
new file mode 100644
index 0000000..08661d6
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-functions/toUpper/toUpper.2.query.aql
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+use dataverse externallibtest;
+
+let $input:={"id": int32("1"), "text":"university of california, irvine"}
+let $x:=testlib#toUpper($input)
+return $x

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/dataverseDataset/dataverseDataset.1.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/dataverseDataset/dataverseDataset.1.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/dataverseDataset/dataverseDataset.1.query.aql
new file mode 100644
index 0000000..341fbc2
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/dataverseDataset/dataverseDataset.1.query.aql
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+for $x in dataset Metadata.Dataverse
+order by $x.DataverseName
+return $x

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/functionDataset/functionDataset.1.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/functionDataset/functionDataset.1.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/functionDataset/functionDataset.1.query.aql
new file mode 100644
index 0000000..ca06e3b
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/functionDataset/functionDataset.1.query.aql
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+for $x in dataset Metadata.Function
+order by $x.Name
+return $x

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/libraryDataset/libraryDataset.1.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/libraryDataset/libraryDataset.1.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/libraryDataset/libraryDataset.1.query.aql
new file mode 100644
index 0000000..70b6668
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-metadata/libraryDataset/libraryDataset.1.query.aql
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+for $x in dataset Metadata.Library
+order by $x.Name
+return $x

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.1.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.1.ddl.aql
new file mode 100644
index 0000000..09db37c
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.1.ddl.aql
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create an adapter that uses external parser to parse data 
from files
+ * Expected Res : Success
+ * Date         : Feb, 09, 2016
+ */
+use dataverse externallibtest;
+
+create type Classad as open {
+  GlobalJobId: string
+}
+
+create external dataset Condor(Classad) using localfs(
+("path"="asterix_nc1://../../../../data/jobads.new"),
+("format"="semi-structured"),
+("record-start"="["),
+("record-end"="]"),
+("parser"="testlib#org.apache.asterix.external.library.ClassAdParserFactory"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.2.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.2.query.aql
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.2.query.aql
new file mode 100644
index 0000000..26f980f
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/queries/library-parsers/record-parser/record-parser.2.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create an adapter that uses external parser to parse data 
from files
+ * Expected Res : Success
+ * Date         : Feb, 09, 2016
+ */
+use dataverse externallibtest;
+
+for $x in dataset Condor
+order by $x.GlobalJobId
+return $x;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-adapters/typed_adapter/typed_adapter.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-adapters/typed_adapter/typed_adapter.1.adm
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-adapters/typed_adapter/typed_adapter.1.adm
new file mode 100644
index 0000000..6a3fbcd
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-adapters/typed_adapter/typed_adapter.1.adm
@@ -0,0 +1,5 @@
+{ "tweetid": 1, "message-text": "1" }
+{ "tweetid": 2, "message-text": "2" }
+{ "tweetid": 3, "message-text": "3" }
+{ "tweetid": 4, "message-text": "4" }
+{ "tweetid": 5, "message-text": "5" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-feeds/feed_ingest/feed_ingest.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-feeds/feed_ingest/feed_ingest.1.adm
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-feeds/feed_ingest/feed_ingest.1.adm
new file mode 100644
index 0000000..1291213
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-feeds/feed_ingest/feed_ingest.1.adm
@@ -0,0 +1,12 @@
+{ "id": "nc1:1", "username": "BronsonMike", "location": "", "text": 
"@GottaLaff @reutersus Christie and obama just foul weather friends", 
"timestamp": "Thu Dec 06 16:53:06 PST 2012", "topics": {{  }} }
+{ "id": "nc1:100", "username": "KidrauhlProuds", "location": "", "text": "RT 
@01Direclieber: A filha do Michael Jackson  uma Belieber,a filha do Eminem e 
uma Belieber,as filhas de Obama sao Beliebers, e a filha do meu pai e 
Belieber", "timestamp": "Thu Dec 06 16:53:16 PST 2012", "topics": {{  }} }
+{ "id": "nc1:102", "username": "jaysauce82", "location": "", "text": "Not 
voting for President Obama #BadDecision", "timestamp": "Thu Dec 06 16:53:16 PST 
2012", "topics": {{ "#BadDecision" }} }
+{ "id": "nc1:104", "username": "princeofsupras", "location": "", "text": "RT 
@01Direclieber: A filha do Michael Jackson e uma Belieber,a filha do Eminem e 
uma Belieber,as filhas de Obama sao Beliebers, e a filha do meu pai e 
Belieber", "timestamp": "Thu Dec 06 16:53:15 PST 2012", "topics": {{  }} }
+{ "id": "nc1:106", "username": "GulfDogs", "location": "", "text": "Obama 
Admin Knew Libyan Terrorists Had US-Provided Weaponsteaparty #tcot #ccot 
#NewGuards #BreitbartArmy #patriotwttp://t.co/vJxzrQUE", "timestamp": "Thu Dec 
06 16:53:14 PST 2012", "topics": {{ "#tcot", "#ccot", "#NewGuards", 
"#BreitbartArmy", "#patriotwttp://t.co/vJxzrQUE" }} }
+{ "id": "nc1:108", "username": "Laugzpz", "location": "", "text": 
"@AlfredoJalife Maestro Obama se hace de la vista gorda, es un acuerdo de 
siempre creo yo.", "timestamp": "Thu Dec 06 16:53:14 PST 2012", "topics": {{  
}} }
+{ "id": "nc1:11", "username": "magarika", "location": "", "text": "RT 
@ken24xavier: Obama tells SOROS - our plan is ALMOST finished 
http://t.co/WvzK0GtU";, "timestamp": "Thu Dec 06 16:53:05 PST 2012", "topics": 
{{  }} }
+{ "id": "nc1:111", "username": "ToucanMall", "location": "", "text": "RT 
@WorldWar3Watch: Michelle Obama Gets More Grammy Nominations Than Justin ...  
#Obama #WW3 http://t.co/0Wv2GKij";, "timestamp": "Thu Dec 06 16:53:13 PST 2012", 
"topics": {{ "#Obama", "#WW3" }} }
+{ "id": "nc1:113", "username": "ToucanMall", "location": "", "text": "RT 
@ObamaPalooza: Tiffany Shared What $2,000 Meant to Her ... and the President 
Stopped by to Talk About It http://t.co/sgT7lsNV #Obama", "timestamp": "Thu Dec 
06 16:53:12 PST 2012", "topics": {{ "#Obama" }} }
+{ "id": "nc1:115", "username": "thewildpitch", "location": "", "text": "RT 
@RevkahJC: Dennis Miller: Obama Should Just Say He Wants To Tax Successful 
People http://t.co/Ihlemy9Y";, "timestamp": "Thu Dec 06 16:53:11 PST 2012", 
"topics": {{  }} }
+{ "id": "nc1:117", "username": "Rnugent24", "location": "", "text": "RT 
@ConservativeQuo: unemployment is above 8% again. I wonder how long it will 
take for Obama to start blaming Bush? 3-2-1 #tcot #antiobama", "timestamp": 
"Thu Dec 06 16:53:10 PST 2012", "topics": {{ "#tcot", "#antiobama" }} }
+{ "id": "nc1:119", "username": "ToucanMall", "location": "", "text": "RT 
@Newitrsdotcom: I hope #Obama will win re-election... Other four years without 
meaningless #wars", "timestamp": "Thu Dec 06 16:53:09 PST 2012", "topics": {{ 
"#Obama", "#wars" }} }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/getCapital/getCapital.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/getCapital/getCapital.1.adm
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/getCapital/getCapital.1.adm
new file mode 100644
index 0000000..16e9591
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/getCapital/getCapital.1.adm
@@ -0,0 +1,6 @@
+{ "country": "England", "capital": "London" }
+{ "country": "Italy", "capital": "Rome" }
+{ "country": "China", "capital": "Beijing" }
+{ "country": "United States", "capital": "Washington D.C." }
+{ "country": "India", "capital": "New Delhi" }
+{ "country": "Jupiter", "capital": "NOT_FOUND" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/insert-from-select/insert-from-select.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/insert-from-select/insert-from-select.1.adm
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/insert-from-select/insert-from-select.1.adm
new file mode 100644
index 0000000..a839cbc
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/insert-from-select/insert-from-select.1.adm
@@ -0,0 +1 @@
+{ "id": -1, "text": "UNIVERSITY OF CALIFORNIA, IRVINE" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/mysum/mysum.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/mysum/mysum.1.adm
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/mysum/mysum.1.adm
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/mysum/mysum.1.adm
@@ -0,0 +1 @@
+7

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/toUpper/toUpper.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/toUpper/toUpper.1.adm
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/toUpper/toUpper.1.adm
new file mode 100644
index 0000000..a839cbc
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-functions/toUpper/toUpper.1.adm
@@ -0,0 +1 @@
+{ "id": -1, "text": "UNIVERSITY OF CALIFORNIA, IRVINE" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/dataverseDataset/dataverseDataset.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/dataverseDataset/dataverseDataset.1.adm
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/dataverseDataset/dataverseDataset.1.adm
new file mode 100644
index 0000000..122cf71
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/dataverseDataset/dataverseDataset.1.adm
@@ -0,0 +1,3 @@
+{ "DataverseName": "Default", "DataFormat": 
"org.apache.asterix.runtime.formats.NonTaggedDataFormat", "Timestamp": "Thu Sep 
15 03:11:25 UTC 2016", "PendingOp": 0 }
+{ "DataverseName": "Metadata", "DataFormat": 
"org.apache.asterix.runtime.formats.NonTaggedDataFormat", "Timestamp": "Mon Jun 
27 17:22:24 PDT 2016", "PendingOp": 0 }
+{ "DataverseName": "externallibtest", "DataFormat": 
"org.apache.asterix.runtime.formats.NonTaggedDataFormat", "Timestamp": "Mon Jun 
27 17:22:44 PDT 2016", "PendingOp": 0 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/functionDataset/functionDataset.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/functionDataset/functionDataset.1.adm
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/functionDataset/functionDataset.1.adm
new file mode 100644
index 0000000..ef563f1
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/functionDataset/functionDataset.1.adm
@@ -0,0 +1,8 @@
+{ "DataverseName": "externallibtest", "Name": "testlib#addHashTags", "Arity": 
"1", "Params": [ "Tweet" ], "ReturnType": "ProcessedTweet", "Definition": 
"org.apache.asterix.external.library.AddHashTagsFactory", "Language": "JAVA", 
"Kind": "SCALAR" }
+{ "DataverseName": "externallibtest", "Name": "testlib#addHashTagsInPlace", 
"Arity": "1", "Params": [ "Tweet" ], "ReturnType": "ProcessedTweet", 
"Definition": "org.apache.asterix.external.library.AddHashTagsInPlaceFactory", 
"Language": "JAVA", "Kind": "SCALAR" }
+{ "DataverseName": "externallibtest", "Name": "testlib#allTypes", "Arity": 
"1", "Params": [ "AllType" ], "ReturnType": "AllType", "Definition": 
"org.apache.asterix.external.library.AllTypesFactory", "Language": "JAVA", 
"Kind": "SCALAR" }
+{ "DataverseName": "externallibtest", "Name": "testlib#echoDelay", "Arity": 
"1", "Params": [ "TweetMessageType" ], "ReturnType": "TweetMessageType", 
"Definition": "org.apache.asterix.external.library.EchoDelayFactory", 
"Language": "JAVA", "Kind": "SCALAR" }
+{ "DataverseName": "externallibtest", "Name": "testlib#getCapital", "Arity": 
"1", "Params": [ "ASTRING" ], "ReturnType": "CountryCapitalType", "Definition": 
"org.apache.asterix.external.library.CapitalFinderFactory", "Language": "JAVA", 
"Kind": "SCALAR" }
+{ "DataverseName": "externallibtest", "Name": "testlib#mysum", "Arity": "2", 
"Params": [ "AINT32", "AINT32" ], "ReturnType": "AINT32", "Definition": 
"org.apache.asterix.external.library.SumFactory", "Language": "JAVA", "Kind": 
"SCALAR" }
+{ "DataverseName": "externallibtest", "Name": "testlib#parseTweet", "Arity": 
"1", "Params": [ "TweetInputType" ], "ReturnType": "TweetOutputType", 
"Definition": "org.apache.asterix.external.library.ParseTweetFactory", 
"Language": "JAVA", "Kind": "SCALAR" }
+{ "DataverseName": "externallibtest", "Name": "testlib#toUpper", "Arity": "1", 
"Params": [ "TextType" ], "ReturnType": "TextType", "Definition": 
"org.apache.asterix.external.library.UpperCaseFactory", "Language": "JAVA", 
"Kind": "SCALAR" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/libraryDataset/libraryDataset.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/libraryDataset/libraryDataset.1.adm
 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/libraryDataset/libraryDataset.1.adm
new file mode 100644
index 0000000..d395ae5
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/integrationts/library/results/library-metadata/libraryDataset/libraryDataset.1.adm
@@ -0,0 +1 @@
+{ "DataverseName": "externallibtest", "Name": "testlib", "Timestamp": "Mon Jun 
27 17:22:44 PDT 2016" }

Reply via email to